botletics / SIM7000-LTE-Shield

Botletics SIM7000 LTE CAT-M1/NB-IoT Shield for Arduino
https://www.botletics.com/products/sim7000-shield
GNU General Public License v3.0
483 stars 215 forks source link

AT+CSSLCFG returns ERROR #300

Open stbrie opened 2 years ago

stbrie commented 2 years ago

[Figured it out]

[Sort of. I still don't have HTTPS working right.]

I have not been able to get HTTPS to work. Here is what I've done so far:

1) Install the Windows 8 Drivers from the botletics repository .zip file (and what a nightmare. If you have trouble, make sure the micro-USB cable you are using can carry data. Apparently some micro-USB cables are power only, and I had a pile of them to go through.) 2) Install the qpst efs program. 3) Download an HTTPS websites security certificate using Microsoft Edge (Click on lock -> "Connection is Secure" -> Click on certificate icon -> Click on details tab -> click on copy to file -> next -> DER Encoded binary -> save file locally 4) in EFS, change to the alternate file system using phone -> preferences -> directories -> initial file system to display = alternate -> ok. (Why? Don't know. Don't know where this is documented in any of the application notes, either.) 5) file -> new -> select the file and copy it to the sim7000 filesystem in /customer (according to another GitHub issue, using ".crt" may have some effect on outcome... why? I don't know.)

Run the commands:

AT+CNACT=1,"hologram" OK AT+CNACT? CNACT: 1,"10.99.xxx.xxx" OK AT+CMEE=2 OK AT+CACID=0 OK AT+CASSLCFG=0,"cacert","mysites_der.crt" ERROR [likely caused by a backspace or something. Apparently backspacing in putty will cause ERROR for any AT command.] AT+CASSLCFG=0,"cacert","mysites_root_CA_cert.crt" OK AT+CASSLCFG=0,"cacert","mysites_der.crt" OK // I have no idea why it didn't work the first time. Anybody? AT+CSSLCFG="convert",2,"mysites_der.crt" OK AT+SHSSL=1,"mysites_der.crt" OK // !!!! AT+SHCONF="URL","https://mysites.url.com" OK AT+SHCONF="BODYLEN",64 ERROR // WTF?

AT+SHCONF="BODYLEN",64 ERROR // WTF!!?

AT+SHCONF="bodylen",64 OK // WTF?

AT+SHCONF="headerlen",64 OK

And everything works. I think the missing step was the AT+CASSLCFG commands.

stbrie commented 2 years ago

Still don't have HTTPS working with a site whose certificate is issued by ISG/letsencrypt, but the ERRORs I was seeing in the AT commands are from backspacing and editing the commands rather than the commands being typed out perfectly the first time. If I backspace in any command: ERROR. If I don't backspace and type the command correctly: OK. This appears to have been a problem between keyboard and chair. (PEBKAC).