Page 1 of 1

SIM5360 file system / SSL certificates

Posted: Fri Mar 23, 2018 12:20 am
by NicholasWalter
Hi everyone,

I am trying to implement an HTTPS-based transmission of vehicle data to a remote server.
For HTTPS to work, I obviously need to make use of the requireded SSL certificates. I have read through the SIM5360 AT command documentation (http://simcom.ee/documents/SIM5360/SIMC ... _V0.24.pdf) and found the "AT+CCERTDOWN" command which can be used to install certificates. The issue is that it requires the certificate file to be supplied by the SIM5360 file system.

I have spent a lot of time researching how to get stuff on the SIM5360 file system, as it appears it is not possible to create files, only to view and delete them, using AT commands. I found two applications from SimCOM (EFS Explorer and MQDL) (http://simcom.ee/documents/?dir=SIM5320/LUA) that supposedly transfer data from a PC to the SIM5360 file system. However they require the SIM5360 to be connected directly to the PC instead of via the ESP32 chip as far as I can tell.

Can anyone offer any advice on how else to transfer data to the SIM module or how I can connect it to my PC?

Thanks a lot in advance.

Re: SIM5360 file system / SSL certificates

Posted: Mon Mar 26, 2018 8:27 pm
by stanley
You can write a simple Arduino sketch to run on ESP32 which tunnels the serial communication between SIM5360 and USB.

Re: SIM5360 file system / SSL certificates

Posted: Wed Mar 28, 2018 5:55 pm
by NicholasWalter
Hi Stanley,

I considered and tested this already, however the tools I mentioned do not seem to support it. I am starting to think these would only work with some sort of development board for the SIM5360E module.

I read about some commands to transfer files from the SIM5360 module to and from an "EFS", which I assume stands for external file system. Does the ESP32 have a file system I could try to make this work with and, if so, where can I find documentation on how to access it?

For now I have a fallback method: Using the built-in FTP client on the SIM5360 module, I can transfer the certificates by first pushing them to an FTP server, however I don't think this should be my permanent solution because it forces me to transmit the certificate files unencrypted.

Once again, thanks a lot in advance!

Re: SIM5360 file system / SSL certificates

Posted: Wed Mar 28, 2018 9:33 pm
by NicholasWalter
Hello again,

I don't seem to be able to edit or remove my unapproved message so I am submitting a new one instead.

I finally managed to get it working by using the commands "AT+CFTRANRX" and "AT+CFTRANTX". I am not gonna say they are pooly documented, though I will say that some of the stuff in the commands document can be very misleading. Just as an excuse why I didn't get this to work from the beginning.

For future reference:
"AT+CFTRANRX=\"C:/test.txt\",10,0\r" to create file "C:/test.txt", writing 10 chars, not appending to existing file.
m_buffer at this point will be ">", indicating that the next command will be pure input.

"abcdefghij\r" to send the 10 chars
"abcdefghijklmno\r" will still only send the first 10 chars, discarding the rest.
m_buffer will simply be "OK" after this.

sendCommand("AT+CFTRANTX=\"C:/test.txt\"\r"); to write contents of the file into m_buffer

Topic can now be closed, thanks.

Re: SIM5360 file system / SSL certificates

Posted: Sun Dec 23, 2018 12:28 pm
by scattym
You can definitely transfer files to the 5360.

EFS file explorer or via the serial protocols available in the at command set. I use the serial protocol with a python script to get files on there.

You should be aware, the SSL libraries supported by the simcom 53X0 devices only support tls 1.0 which is now considered broken. Depending on your use case this could be a problem (wouldn't pass a security audit for any type of compliance). The way to solve this is to compile your own ssl build for this device or, if your relationship with simcom is good enough, get them to update their command set (unlikely to happen given it would require a new round of device certifications).

I am literally about to try the ssl compilation route now myself, so I can't guarantee this works but I don't see any reason for it not to. Hardest part is getting the compilation tools setup for this device without using the arm compiler.

Re: SIM5360 file system / SSL certificates

Posted: Sun Apr 26, 2020 6:58 am
by ALMO
NicholasWalter wrote: Wed Mar 28, 2018 9:33 pm Hello again,

I don't seem to be able to edit or remove my unapproved message so I am submitting a new one instead.

I finally managed to get it working by using the commands "AT+CFTRANRX" and "AT+CFTRANTX". I am not gonna say they are pooly documented, though I will say that some of the stuff in the commands document can be very misleading. Just as an excuse why I didn't get this to work from the beginning.

For future reference:
"AT+CFTRANRX=\"C:/test.txt\",10,0\r" to create file "C:/test.txt", writing 10 chars, not appending to existing file.
m_buffer at this point will be ">", indicating that the next command will be pure input.

"abcdefghij\r" to send the 10 chars
"abcdefghijklmno\r" will still only send the first 10 chars, discarding the rest.
m_buffer will simply be "OK" after this.

sendCommand("AT+CFTRANTX=\"C:/test.txt\"\r"); to write contents of the file into m_buffer

Topic can now be closed, thanks.
Dear Nicholas,

Hi, you are the only one I have seen talk about AT+CFTRANTX, I am try to use this command to send data via serial port and write into SD card, i am very close to get it work correct, but still need some one help.

If you have some sample code for this command in this regards, please share here.

Regards,