Module stops on Waiting for debug device registration of "IMP_NG_BGS5_REMOTE".. | Telit Cinterion IoT Developer Community
March 5, 2015 - 1:02pm, 3182 views
Hello,
yesterday I encountered a problem which I couldn’t explain. I took BGS5T home from work to test some things before a business meeting. I tried to start Netbeans debugger but every time module would stop at:
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"..
And then I think I got :
*** Error ***
Failed to connect to device 0!
Reason:
Emulator 0 terminated while waiting for it to register!
Same as MLERMAN in this thread: https://iot-developer.thalesgroup.com/threads/error-failed-connect-device-0-emulator-0-terminated-while-waiting-it-register
What is interesting is this that I could use AT commands and MES to access file system. I tried restarting module and my laptop but with no success. Only MIDlet running at this time was JRC. I also noticed that module would reset from time to time or I would need to replug the cable to use AT commands. MIDlet that I tried to run, uses RS232 to read temperatures and then sends them to server. And when called module answers with SMS which contains temperatures.
Because I couldn’t install and debug program with Netbeans, I installed MIDlet manually with AT commands. And before at work program worked fine, but here I got strange errors which seemed completely random.
First when uploading data to server I got exception: Could not resolve hostname. Which is read from txt file, so maybe module couldn’t access that. So I sent SMS at start at the program which contained the hostname and was correct.
All the time module would be restarting but not function properly. I had watchdog inside my Midlet which would reset the program after 5 minutes if it wouldn’t receive kick. But this happened even when I disabled watchdog.
Second exception which came after first stopped was: Unknown error -123 during socket::read. This also happened when sending data to server.
Third exception was similar and also when sending data to server was: error -121 in socket::open
Fourth problem also when uploading data to server was: Profile could not be activated.
All this four exceptions were inside same try block, so only one at the time occurred.
After a while I enabled back watchdog but it didn’t help because program would still reset a few ***** and stopped working normally.
Between this exceptions there would be some successful http POST requests.
In the morning I tried program again and I would still get “Profile could not be activated”.
What is weird is that I would take module to the meeting and there was tested and it work like it should. Yesterday I couldn’t read and send temperatures for more than 10mins but now it’s working for more than hour and all request are being sent without any exceptions.
I could understand that there is some fault in my program, but even when no program was running I couldn’t use Netbeans debugger. But when I came back to office I tried same cable and laptop on some other BGS5T which was already running with that MIDlet about which I opened exception thread, I could connect normally and run another MIDlet inside Netbeans. Unfortunately I can’t post SCFG since I don’t have module here.
Best regards,
Jure
Hello Jure,
DEBUG PROBLEM:
If you have used the same laptop and two different modules it would be very important to get the SCFG output from the module that was causing problems to the debugger (the answer should probably be there) or even from both modules for better comparison. You could aslo check the ATI1 output.
NETWORK PROBLEM:
It would be a good idea to make sure that both applications are of the same version and configuration is the same.
I can see that all of the exceptions are connected with the network transfer so the questions would be:
- are both configurations the same
- are you using the same SIM card (or at least similar from the same provider with the same services active)
- maybe there's a problem with network coverage at your home
"Profile could not be activated" means that the application was unable to attach to the data transfer service and othe exceptions may be the result of that.
WATCHDOG PROBLEM:
There are two separate and independent of each other watchdogs available:
- module's watchdog for which you have the API and you can start watchdog timers in different places and the application must kick these instances.
- terminal's watchdog which you can configure with the special commands on ASC0 interface (baudrate 1200). There is also the possibility to restart the terminal periodically.
Please make sure that you didn't use ony of them when the problem occurred.
Is it possible that the application logic was resetting the module because the network problems?
Best regards,
Bartłomiej
Now that module was tested on terain we didn't had any network problems. Module restarted a few *****, I still have to figure it out why. But sometime after midnight module shutdown it self. It still have power supply but the green light is off. I have now retrived the module and I will do some more tests. Because those resets could be softwear problems when module recives call, I am not sure yet, because most of the ***** this works OK. But here is scfg for first part of the problem:
^SCFG: "Call/ECC","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","std"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","std"
^SCFG: "Gpio/mode/DSR0","std"
^SCFG: "Gpio/mode/DTR0","std"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","std"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","std"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","BGS5"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEopMode/SoR","on"
^SCFG: "Radio/Band","15"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0059","Cinterion Wireless Modules","Cinterion BGx USB Com Port",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/Otap","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","400"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","asc1",,,,"off"
^SCFG: "Userware/Watchdog","1"
and ATI1
Cinterion
BGS5
REVISION 01.100
A-REVISION 00.000.02
OK
It could be problem with network, because today is same at home, but I only get profile error from time to time. But I have same provider for my cell phone and there GPRS looks to be ok, I have 3g connection.
I will do some more tests to see why module restarts so often, but it would be nice if we could find out why I coulden't connect to module at that time. Because today works fine.
Best regards
Jure
Hello Jure,
The SCFG seems OK. My suspicions were not confirmed here.
I don't have SCFG from the other module for comparison but I would try to set "Userware/Autostart/Delay" to 0 and disable watchdog.
Please also verify if you are able to connect to debug modem and the port is the same for both modules.
Assuming that you are using the same PC and connect both terminals to the same port and no other MIDlet is running on the module this should be working.
Regards,
Bartłomiej
Hello Bartłomiej,
at^scfg="Userware/Watchdog","0"
at^scfg="Userware/Watchdog","0"
javaWatchdogDoNothing
^SCFG: "Userware/Watchdog","0"
OK
at^scfg="Userware/Autostart/Delay","","0"
at^scfg="Userware/Autostart/Delay","","0"
^SCFG: "Userware/Autostart/Delay","0"
OK
after this I still can't connect. I will later try to get you scfg from one of the other modules.
EDIT: After your advice didn't help I turned back watchdog and autostart delay. Now I could again connect to module with netbeans debuger. I didn't even restart the module, so this is quite weird.
EDIT2: Problems again :/
Best regards.
Jure
Hello,
Good to hear that it's working.
Regards,
Bartłomiej