Autostart & Java error = Bricked module? | Telit Cinterion IoT Developer Community
March 1, 2021 - 4:22pm, 2435 views
Hello,
I have 5 EHS6T units which run a specific application that reads a couple of parameters before initialization.
These parameters have been wrongly configured, which has caused a Java String Index Out of Bounds error.
Since I have autostart, the module keeps reseting and doesn't let me correct the situation.
I tried to the the AT SJAM command = 2 but the modem runtime is too fast and I can't stop the application before the module is restarted.
What can I do to solve this?
Hello,
You are not the first one who made such a mistake. It happens sometimes. That's why it is good to add some auotstart delay during the initial tests.
The best way to stop the MIDlet from running is to send AT^SCFG="Userware/Autostart","","0" command to disable autostart as soon as the module boots. You need to prepare the command and just try to paste it into a terminal window. It might be easier on ASC0 (if possible, for instance it is not reserved by System.out) than on USB. Anyway it might require more or less attempts but it is generally doable. After the reboot the app will not start again and you will be able to uninstall it and turn the autostart back on (it is necessary for JRC MIDlet to be started automatically).
Best regards,
Bartłomiej
Dear Bartlomiej,
Thank you for your answer.
Unfortunatly I'm not being able to send the ATCommand using the ASC0 - I'm using that interface in the Java application, and I don't really know if the app is opening it before the reset.
I don't know if I should use any specific baudrate for this communication (I know that 1200bps is for the HW Watchdog) or if there's any other thing I must settle before using it.
I've made several attempts using the provided ATCommand through the USB and I can't do it.
Any more ideas?
Thanks
Hello,
Any AT command can be executed on the interface when it's used by a Java application. You need to execute the command before the MIDlet starts or try on USB if this approach fails. In case of USB disconnect the terminal application on your PC when the module reboots and try to connect when the interface is enumerated in the system after the reboot. Try to paste the command and hit Enter as soon as the module accepts the commands. You may first try with AT only to see if you are able to get any reply from the module. You may be trying with AT and as soon as you get OK reply send the command AT^SCFG="Userware/Autostart","","0"
BTW is the reboot implemented in the MIDlet? What autostart parameters have been placed in the jad file? Do you also use a hardware watchdog for anything?
Regards,
Bartłomiej
Hello again,
"You may first try with AT only to see if you are able to get any reply from the module."
I've tried this through USB but I can't get any answer to the AT command.
I've also tried doing exactly how you've pointed out. No luck.
"BTW is the reboot implemented in the MIDlet? What autostart parameters have been placed in the jad file?"
Yes, it is implemented in the Midlet with the following parameters:
Oracle-MIDlet-Autostart:2
Oracle-MIDlet-Restart:true
Oracle-MIDlet-Restart-Count:0
Do you also use a hardware watchdog for anything?
I have it programmed for a timed reset.
Thanks again.
Do you see any output on USB interface that you try to use for command sending like SYSLOADING, SYSSTART etc.?
Is it not reserved for System.out?
Hello,
I made it using the AT^SCFG="Userware/Autostart","","0" after about half an hour sending commands!
It's solved!
Thank you
Good to read that!
The earlier the MIDlet crash happens the harder it is to deactivate the autostart if the module is set to reboot right after. It seems that your case was of that hardest ones.
Best regards,
Bartłomiej