AT^SJOTAP inconsistency | Telit Cinterion IoT Developer Community
March 24, 2015 - 5:57pm, 5116 views
Hi (again),
now that i can successfully run OTAP, I'm noticed a very annoying behaviour change in aT^SJOTAP.
Usually we deliver our device with a modem and a preinstalled midlet.
^SJAM: "a:/Java/jam/pqgprs/ehs5.jar","PqGprs","Parkare Group S.L.","08",0,68540,0
therefore, this midlet is called as
AT^SJAM=1,"a:/Java/jam/pqgprs/ehs5.jar",""
if for some reason the module ***** to be updated, or it just doesn't contain any midlet, an OTAP process is triggered as:
AT^SJOTAP=,"http://80.37.229.215:19002/OTAP/ehs5.jad","a:/Java/jam/pqgprs",,,"gprs","ac.vodafone.es","vodafone","vodafone","10.32.0.1",
hoever, my surpise is that the installed/updated midlet is now installed as:
^SJAM: "http://80.37.229.215:19002/OTAP/ehs5.jad","PqGprs","Parkare Group S.L.","08",0,69146,0
Therefore if I try to run it, it will no longer work because as seen before I'm using AT^SJAM=1,"a:/Java/jam/pqgprs/ehs5.jar",""
It appears the <Appl_Dir> parameter in AT^SJOTAP is no longer used to identify the applet.
is the only way to sidestep this issue to always use the OTAP url ("http://80...") instead of the local one("a:...")?
This would mean that the app manually installed at "a:..." would never be used because I would look for url "http://..." and it would not be found, so an OTAP process will always be run regardless of the manual installation the first time.
Am i right, or I'm missing something?
Hello,
When you install the application from the local flash file system you specify the path to the application. In this case it would be: AT^SJAM=0,"a:/Java/jam/pqgprs/ehs5.jar","" After the installation the application is copied to the hidden flash area and you can delete it from the path "a:/Java/jam/pqgprs/ehs5.jar". It still will be installed until uninstalled with AT^SJAM command.
When you install the application by OTAP it's also placed inside the hidden area. The <Appl_Dir> parameter you use is not supported in this module - it is only available for compatibility reasons but it is not used.
In both cases when you run the application with the AT^SJAM command you specify the path from which the application was installed.
You can check the installed applications with AT^SJAM=4 command.
Best regards,
Bartłomiej
I just don't understand why this was disabled.
just a simple change in the OTAP server IP would make all the modems have to download again the midlet.
So I'm forced to always check via at^sjam=4 for a previous installation from a different server even if it the exact same file... I think it's a totally unnecessary hassle.
I noticed that when I install the midlet manually, since it's not found and I redownload it via OTAP with the new name, the manual installation disappears.The name goes from "a:...." to "http://...".
How does the module know it's has to substitute the previous locally installed with the new OTAP midlet?
If the module knows it's the same one, shouldn't I be able to do it as well?
Hello,
The <Appl_Dir> parameter was used for older modules where the application was not installed but just copied to some place on the public flash file system. In this module the application is installed to the place you cannot access and in fact you don't know what directory structure there is. You can manage the installed applications with AT^SJAM command.
In the field the application has usually activated auto-start feature so it is started each time the module is booted. When the application is updated via OTAP it is replaced regardless of the server IP.
This path problem should only matter when you are starting the application manually with the AT command.
Regards,
Bartłomiej
We use SJOTAP command to update our FotaMIDlet. We would like to know how does the modem know whether the target MIDlet, which is in the SJOTAP command, is a new MIDlet or is an existing MIDlet? Does it compare the path? or the vendor name in the jad file?
Thanks!
Hello,
The module always replaces the MIDlet if all the parameters are the same even if the code has not been changed.
If at least one of the following parameters: MIDlet-1, MIDlet-Name or MIDlet-Vendor is changed the new MIDlet will be installed and the old one will remain untouched.
Regards,
Bartłomiej