Newsletter
September 21, 2017 - 6:58pm, 3139 views
Hello I have a problem, but I can't explain the details because of your spam filter...
I have a problem with developing application using Netbeans IDE. Normally I write the code and test it using "Run Project". Then I can see the output console in run window. When I change my code and recompile it, I click again "Run Project", and my running application is terminating (destroyApp() function is called in the module) and restarting. But when I execute AT command AT^SJNET by ATCommand class (no matter where, and from which thread) to set the apn name, user, and password, the application doesn't want to close (the destroyApp() function is not called). (Autostart is enabled)
Here is the output:
When AT^SJNET was executed:
Starting emulator in execution mode
Using USB port COM3.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of BGSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:27641/BGSExample.jad
BGSExample: startApp
BGSExample: startApp exit
Application Task Started
Application alive
Application alive
Application alive
Application alive
Application alive
Application alive
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of BGSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:27641/BGSExample.jad
Application alive
Application alive
....
When AT^SJNET wasn't executed:
Starting emulator in execution mode
Using USB port COM3.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of BGSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:27855/BGSExample.jad
BGSExample: startApp
BGSExample: startApp exit
Application Task Started
Application alive
Application alive
Application alive
Application alive
Application alive
Starting emulator in execution mode
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:27906/BGSExample.jad
Application alive
BGSExample: destroyApp(true)
Application interrupted
Application Task exit
BGSExample: Gracefull closed
MIDlet:Example.BGSExample terminated
BGSExample: startApp
BGSExample: startApp exit
Application Task Started
Application alive
Hello,
That is quite interesting. You start the MIDlet while the previous version is still running so the destroyApp() is called first but it's not if SJNET command was previously executed.
Have you tried to stop the debug session before starting it again? Have you tried with other AT commands?
Can you check the firmware version with ATI1 and what version if installation CD you have installed?
To work around this you can always reboot the module.
Regards,
Bartłomiej
I don't know how to stop Run, or debug session. When i cancel session, it looks like only the output stop display the messages from module, but application still works. All the other commands that I use does't make a problem (eg. sending and receiving SMS commands, NITZ, CLIP, CHUP). I am using bgs5_rev01.100_install-cd.
Module firmware version:
Cinterion
BGS5
REVISION 01.100
A-REVISION 00.000.10
OK
I know that I can simply reboot the module, but I want to know if my application can close correctly (all the resources has released).
Hello,
As for the software your version is not hte latest - there is bgs5_rev01.100_arn0000021 available.
Running or debugging from Eclipse or Netbeans is a special case where the application is controlled by external debugger. So this particular case (which I can't explain at the moment) does not mean that destroyApp() will not be called in the real life. To test if the application can close gracefully you could also call the destroyApp() from the code or stop it by AT command. Generally the codition for destroyApp() to be called by the module is that startApp() must be finished. So you should not put the application logic in the startApp() but initiate the application only. But you actually do it.
Best regards,
Bartłomiej