AT Command instance has been released | Thales IoT Developer Community
January 25, 2018 - 11:29pm, 4473 views
Hello I would appreciate any help in trying to locate the cause of the following issue:
I updated the JRC firmware to JRC-56.54 on the EHS6T ****m.
However I am having issues with running previously working code in debug **** on Netbeans 7.2
The software uses embedded AT commands within Java, which previously behaved as expected.
This error is being generated after several AT commands have been issued, without error.
Commenting out sending the AT command prior to the error just shifts the problem later on indicating its probably not the 'at commands' themselves, just keeps on generating the error for subsequent 'at commands'.
I tried running the utility to try and go back to a previous version of JRC firmware but it won't let me.
Is there anything I can check to see what is happening.
Messages generated:
Error: ATCommand instance has been released
java.lang.IllegalStateException: ATCommand instance has been released
- com.cinterion.io.ATCommand.send(ATCommand.java:847)
- com.cinterion.io.ATCommand.send(ATCommand.java:772)
- ftp_gsm.Ftp_Gsm.waitUntilRegisteredOnNetwork(Ftp_Gsm.java:7625)
- ftp_gsm.Ftp_Gsm.startApp(Ftp_Gsm.java:948)
at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
at com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
at com.sun.midp.midlet.MIDletStateHandler$StartAppTimerTask.run(), bci=12
at java.util.TimerThread.mainLoop(), bci=244
at java.util.TimerThread.run(Timer.java:505)
Error: ATCommand instance has been released
java.lang.IllegalStateException: ATCommand instance has been released
I don't think it is a Netbeans issue, since I am no longer getting responses from the ****m when running my MIDlet from the firmware. Inspection via Hyperterminal with at^sjam=5 indicates my program it is being set to Autorun along with the JRC.
The previous JRC firmware installed was JRC-56.42
Tried increasing the 'at command' response period, but made no difference.
Bobg
Do you maybe create new AT object for every command that you send? Also can you show us the code where this happens?
Regards
Jure
Hello,
Are you sure that there was no change in your software that could be causing this problem?
Please check the firmware version on the module with ATI1 command. JRC is distributed together with the firmware and both should be updated.
Additionally please check which installation CD package you have. It would be recommended that you use the latest firmware and also Java libraries located in the WTK folder. There might have been some changes in Java libraries and I imagine that it could be possible that there is some conflict between old libraries and newer JRC (which implements some functionalities of the module).
Best regards,
Bartłomiej
Hello
The software was a previously working ok last time used. Only updated the EHS6T firmware for support for later cipher suites.
I hadn't re-installed the CMK, JDK, or IDE, Just the JRC firmware via the gwinswup arn0000051 utility.
Checked on another PC, using the ...arn0000051 installation CD and the library files in the WTK directory are the same as the PC on which I have the issues which was installed using the older ...arn0000007 installation CD.
Are there other files that may cause a conflict when running the program within Netbeans 7.2 and affect the generated *.jar and *.jad files just running the MIDlet on the Firmware?
ATI1 gives:
Cinterion, EHS6, REVISION 03.001, A-REVISION 00.000.51
which corresponds with the gwinswup utility version number.
I can try re-installing the the CMTK, but trying to reduce the number of changes and thus variables in trying to work out what is going on.
Unfortunately the other laptop I have is Windows 8.1 and Netbeans 7.2 won't run on this PC - starts to open and just closes - no matter is run in compatibility **** - and thus not able to use as a comparison, or as an alternative. Need utilities that run successfully / repeatable on newer OS's - the Windows 7 OS Laptop won't last forever.
Regards
Bobg
Hello,
JRC-1.56.54 is the correct version for A-REVISION 00.000.51 - with gwinswup you have updated both the firmware and JRC.
ARN0000007 is quite old and you should update the libraries - for that you don't need to install the new CD, you can just replace the "lib" and "resources" directories inside "WTK" directory (C:\Program Files (x86)\Cinterion\CMTK\EHS5\WTK) or only link the new libraries in the project configuration. Please do that even if you see that the names are equal and build the application again.
It is not clear for me if the problem only exists if you run the application from Netbeans or it doesn't matter if you start it manually or from IDE.
Regards,
Bartłomiej
Hello
Tried just copying the Resources and lib directory files across to the WTK directory, but on starting Netbeans initially 'blank'. Ended up re-installing JDK, Netbeans and CMTK, - but the CMTK indicated it was updating from 1.00.000 to 1.00.000!. How can I verify what versions I am running since library versions cannot be relied on - or do I have to uninstall everything and re-install??
Initially Netbeans seemed tempremental in running until Windows rebooted. When running the program in debug **** - still generating the 'ATCommand Instance has been Released' error.
Previously had loaded the *.jrc in autostart **** in FFS, confirmed via at^sjam=5, so not running properly either way.
Regards
Bobg
Hello,
I don't think that it was exchanging the libraries that has caused Netbeans crash. At least it should not have - I'm usually using Eclipse and such thing has never happened to me. You're right about the library version - you need to know the source of the library, from which package it comes. And you should be able to link libraries from any folder, not necessarily the one created during the Cinterion environment installation.
So as I understand you have tested that this exception happens with new libraries regardless if the MIDlet is run from Netbeans or installed manually on the module.
In such case I'd start from verifying the code for any place where the ATCommand instances are released.
You can also verify the same code on some module with the previous firmware to make sure.
Regards,
Bartłomiej