Auto-Start MIDlet Issue | Thales IoT Developer Community
July 14, 2015 - 7:39pm, 5861 views
I am having issues getting a MIDlet to auto start on the EHS6T.
The MIDlet is compiled in Netbeans with the following custom attributes set in Netbeans, and the MIDlet re-compiled:
Oracle-MIDlet- AutoStart value=2 ... only other MIDlet is the Java Remote
Oracle-MIDlet-Restart value= true
Oracle-MIDlet-Restart-Count value = 1.
Used Windows Explorer to copy the new files to Disk A on the EHS6T.
at^sjam=4 ... check MIDlets listed
^SJAM: "http://192.168.244.2:51052/Project.jad","Project","Vendor","1.0",0,93361,0
^SJAM: "a:/JRC-1.50.9.jad","Java Remote Control MIDlet Suite","Cinterion","1.50.9",1,669007,0
OK
Install MIDlet:
at^sjam=0,"a:/Project.jad",""
OK
at^sjam=4
^SJAM: "a:/Project.jad","Project","Vendor","1.0",0,97506,0
^SJAM: "a:/JRC-1.50.9.jad","Java Remote Control MIDlet Suite","Cinterion","1.50.9",1,669007,0
OK
However the above appears to indicate that auto-start is set still '0' - what else do I need to set ??
at^sjam=5 .. Check which MIDlets set to autostart.
^SJAM: "a:/JRC-1.50.9.jad","Java Remote Control MIDlet Suite","Cinterion","1.50.9",1
OK
Running the MIDlet:
at^sjam=1,"a:/Project.jad",""
OK
... other MIDlet response - indicates the MIDlet can be started by the user and respond as expected.
Power EHS6T down / up
The MIDlet doesn’t autostart and at^sjam=5, still only shows the Java Remote Control MIDlet autostarting.
at^scfg? ... Indicates autostart is enabled.
^SCFG: "Call/ECC","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/****/ASC1","std"
^SCFG: "Gpio/****/DAI","gpio"
^SCFG: "Gpio/****/DCD0","std"
^SCFG: "Gpio/****/DSR0","std"
^SCFG: "Gpio/****/DTR0","std"
^SCFG: "Gpio/****/FSR","gpio"
^SCFG: "Gpio/****/HSIC","rsv"
^SCFG: "Gpio/****/PULSE","gpio"
^SCFG: "Gpio/****/PWM","gpio"
^SCFG: "Gpio/****/RING0","std"
^SCFG: "Gpio/****/SPI","rsv"
^SCFG: "Gpio/****/SYNC","std"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS6"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEopMode/SoR","off"
^SCFG: "Radio/Band","511"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules
","EHx",""
^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","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","on"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","asc1",,,,"off"
^SCFG: "Userware/Watchdog","0"
OK
Hello,
Please edit the jad file and check if the parameters that you have configured are really there:
Oracle-MIDlet-Autostart: 2
Oracle-MIDlet-Restart: true
Oracle-MIDlet-Restart-Count: 1
If the parameters are in the jad file, please download the jad and jar to the module, install MIDlet and restart the module. The application should then be started automatically if the global auto-start parameter is set to"1":
^SCFG: "Userware/Autostart","1"
There should be anything else.
Please observe the System.out if the application doe not crash or finish just after start.
Regards,
Bartłomiej
The jad file indicates that the parameters are configured as shown below:
MIDlet-1: IMlet, ,project.Project
MIDlet-Jar-Size: 95987
MIDlet-Jar-URL: Project.jar
MIDlet-Name: Project
MIDlet-Vendor: Vendor
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: IMP-NG
Oracle-MIDlet-AutoStart: 2
Oracle-MIDlet-Restart: true
Oracle-MIDlet-Restart-Count: 1
The autostart is set to '1' as shown previously in the ^SCFG.
This would suggest that there is something I am not doing correctly to install the MIDlet on the EHS6T after I have copied the jad and jar onto the 'A' drive. Using Windows Explorer I dragged the new files to over-write the old files. The only other thing I can think of is it is not correctly over-writting the previous files? The AT^SJAM indicates it is not set to autorun and therefore not required to stop.
Hello,
It wasn't easy to notice but I've probably found where's the problem.
There should be
Oracle-MIDlet-Autostart: 2
instead of
Oracle-MIDlet-AutoStart: 2
Please try.
Regards,
Bartłomiej
I changed to Autostart but that did not seem to solve the issue. I also re-checked via the jad file.
It was confusing that at^sjam=4 did not show the jad file. However using at^sjam=0, ...jad,","" to install the jad file it appeared.
So at the moment it appears to work,thank you.
However, once installed, it seems to be an effort in being able to update the jad file.
Although the Remote Java is running I cannot enter any AT commands via the ASC0 port with my MIDlet running. The only way I have found to update, is to run some Java code on the EHS6T, that has the Autoreset set to '0', and reset the TE to defaults. Reboot. This then allows AT commands to be sent via HyperTerminal.
I can then update the TE, via Windows Explorer, and then install the jad via HyperTerminal using at^sjam=0,.......jad",""
Is there a simpler way ??
Hello,
You should be able to issue commands on ASC0 while MIDlet is running unless the System.out is redirected to ASC0 or the MIDlet is using COM0.
But you still have ASC1 or USB (regarding of the version).
You can also set the autostart delay to have some time before the appliations will start.
But generally it is not comfortable to use autostart during the development phase.
Regards,
Bartłomiej
Thank you for your reply.
The application is polling the ASC0 port. System.out is directed to ASC1. As with any development the application will undergo trials with additional features added once the application has been proven, and thus updates will always need to done.
It may be better, as you indicate, just to add a autostart delay which would allow the MIDlet to be stopped via HyperTerminal during power-up.
I got your point. So this would be the simplest way to update locally without developing any custom solutions.
In the field there will always be a possibility to do a remote update with OTAP.
Regards,
Bartłomiej
OTAP is one thing I am keen to implement, but still trying to get sufficient experience with the basics before I go in that direction. Thank you for your help.