Java security: AT^SJMSEC gives "wrong command format" and "invalid index" for a file generated by jseccmd | Telit Cinterion IoT Developer Community
May 18, 2015 - 5:15pm, 3260 views
Hi all,
I am trying to disable MES/OBEX on an EHS6T-USB, following the EHSx Java User Guide, version 5. The relevant command files as decribed in section 11.5 have been generated in advance using jseccmd.jar and are already present on the device.
The ME keystore has been activated, AT^SJMSEC? gives ^SJMSEC: 2,0,1,0. I am able to start my signed jar files. However, when I try to disable MES tools/OBEX with ObexActivationOff.txt via
AT^SJMSEC="file","ObexActivationOff.txt"
I get
^SJMSEC: 1,"wrong command format"
+CME ERROR: invalid index
Same with ObexActivationOn.txt. I copied the files back from the EHS6 to my file system and compared them with the files generated by jseccmd. They are identical.
Seems that I am stuck. Any help would be appreciated.
For the record:
EHS6, REVISION 03.001, A-REVISION 00.000.14
Windows 8.1, 64bit
Thanks in advance,
Ingo
Hello,
Have you tried to do this in the direct mode - I mean sending the data within the AT command and not referencing the file in the file system? According to Java User's Guide only the following is possible in the indirect mode (from file):
- Set customer keystore
- Add certificate
- Add HTTPS client certificate
Best regards,
Bartłomiej
Hello
and thank you for your fast reply. Sorry, I have skipped over the section about indirect and direct commands too fast after I decided that the "cmd" mode was not an option:
AT^SJMSEC=?
told me
("cmd","file"),(700) .
According to section 11.4.3.1, "Test command syntax", the 700 is "***. string length of <CmdData>". With each byte taking two hex digits, I thought I was bound to 349 bytes, - too little for ObexActivationOff.txt with its 582 bytes.
What I was misunderstanding completely was that ObexActivationOff.txt is already an hexdump ready to be inserted. This was hinted by the "txt" extension (vs "bin" for the three indirect files), but that hint was not strong enough for me.
With my newly gained knowledge I could easily turn MES off and on again.
Thank you very much for your guidance, best regards,
Ingo
I'm glad I was able to help.
BR,
Bartłomiej