Gemalto is now part of the Thales Group, find out more.

You are here

ATCommand class instance is not in transparent data mode | Thales IoT Developer Community

September 14, 2016 - 10:53am, 1429 views

I long as I need to make a data call I have to open an instance of ATCommand in transparent ****.

I'm using SynchronizedAtCommand class to manage the variable but I'm still having some problems. 

I know that the link between the Java code and the board persist even after the java program is terminated. That's a problem if you are in transparent **** because there won't be chanel available if any exception occurs and you try to instantiate a new one.

Is there any way to manage this?

In this case I'm forced to have an instance of ATCommand in transparent **** because it's imposible to switch ****s as I tested in this code:

 public void testATCommands(){
    	// try with "true" and "false"
ATCommand atc_instance = new ATCommand(true); System.out.println("atc_instance = "+atc_instance); if(!atc_instance.csdSupported()){ System.out.println("Not CSD supported"); try { System.out.println("atc_instance.setDTR(true)"); atc_instance.setDTR(true); } catch (IOException e) { e.printStackTrace(); } }else { System.out.println("CDS supported"); } if(!atc_instance.csdSupported()){ System.out.println("Still not supported"); } System.out.println("atc_instance.breakConnection();"); atc_instance.breakConnection(); if(!atc_instance.csdSupported()){ System.out.println("Not CDS supported"); }else { System.out.println("CDS supported"); } }