[Problem with AtCmdDemo Project with ELS] - Application not authorized to access the restricted API:com.cinterion.uta | Telit Cinterion IoT Developer Community
May 25, 2018 - 3:02pm, 2589 views
Please help me to fix this. The dubug result is shown as following:
-------------------------------------------------------------------------------
Constructor
java.lang.SecurityException: Application not authorized to access the restricted API:com.cinterion.uta
startApp
Sending synchronous ATI...
java.lang.NullPointerException: 0
destroyApp(true)
java.lang.NullPointerException: 0
- AtCmdDemo.AtCmdDemo.destroyApp(AtCmdDemo.java:149)
- AtCmdDemo.AtCmdDemo.startApp(AtCmdDemo.java:130)
- javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
- com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=261
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
destroyApp(true)
java.lang.NullPointerException
- java.lang.System.throwNullPointerException(), bci=4
- javax.microedition.midlet.MIDletTunnelImpl.callDestroyApp(), bci=2
- com.sun.midp.midlet.MIDletPeer.destroyApp(), bci=6
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=385
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
MIDlet:AtCmdDemo.AtCmdDemo abnormal exit
---------------------------------------------------------------------------------
Hello,
Can you write more. Have you modified the project? What is the firmware version of the module ('ATI1' command reply, please also check AT^SJAM=4 output)? Have you been using the Cinterion JDK for this module?
Regards,
Bartłomiej
Thanks for the reply, Bartłomiej
Have you modified the project?
- No. I just build the existing code to get *.jad and *.jar but I noticed something that I think it might be related to this error. When I try to run and debug the code from Eclispe, I get some error as following
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Debug RAS connection is not installed!
Please start Cinterion CMTK setup in maintenance mode and select "Repair"
Debug modem device is not installed!
If the USB interface is used please check if the module is switched on.
Otherwise start Cinterion CMTK setup in maintenance mode and select "Repair".
Passing control to external device emulator...
*** Error ***
Device "IMP_NG_ELSx_REMOTE1" not registered!
End of debug session. Emulator is closed!
++++++++++++++++++++++++++++++++++++++++++++++++++++++
For the error "Device "IMP_NG_ELSx_REMOTE1" not registered!" I have no idea why it happen although I follow step by step from Java User's Guide (10.2 Using Eclipse for Java Development)
What is the firmware version of the module ('ATI1' command reply, please also check AT^SJAM=4 output)?
- The firmware version is shown as following (ATI1)
Cinterion
ELS61-E
REVISION 01.000
A-REVISION 00.008.00
- AT^SJAM=4 output
^SJAM: "a:/AtCmdDemo.jad","AtCmdDemo MIDlet Suite","Gemalto M2M GmbH","1.0.0",0,49495,0
^SJAM: "SLAE.jad","SL Agent Module Services","Gemalto M2M GmbH","1.2.2",0,287219,0
^SJAM: "a:/JRC-1.60.03.jad","Java Remote Control MIDlet Suite","Cinterion","1.60.03",1,681943,0
Have you been using the Cinterion JDK for this module?
- I just use this module for the first time and I follow the instruction from Java User's Guide. Before use the ATCmdDemo project, I have already try RS232Demo Project and it's work properly.
Regards,
Nopparat
Hello,
According to SecurityException description the restricted API is called by unauthorized application. If it is just a standard AtCmdDemo MIDlet without any changes this should not happen. Is it a new module, have you done any modifications to it like firmware change etc.? Or maybe you may have used a wrong cwmlib library (for another module type for example). It seems that the problem occured when ATCommand class instance was being created in the MIDlet's constructor.
Could you please also check the replies to AT^SCFG? and AT^SJMSEC? commands.
This second problem is not necessarily connected but until the first problem exists we can't be sure. it might mean that there is some problem with the dialup connection that is used for debugging - 'IP connection for remote debugging of ... '. Maybe the wrong device is configured or it is disconnected or switched off.
Best regards,
Bartłomiej