SIM7020E MQTTs via SSL
i am trying to connect a SIM7020E via MQTTs now for days. But i can’t find a way to make in work.
Connection via MQTT with test.mosquitto.org was successful. Therefore i would estimate, that the Simhat is working properly.
To connect the MQTTs I first try to insert the Certifcate’s Data.
But even with the first command it fails. I tried different ways of \r, \n for the line break:
Every of the above mentioned ended up in the Result Message “ERROR”
Also “AT+CSETCA?” results in an Error.
How can I debug this stuff?
I am grateful for any hint or help!
@fm Thank you for your answer
Unfortunatly i’ve already read this post and tried it too.
I only return “ERROR” as a result. Even with the first string:
From the console log:
Note: If I try to download the certificate a second time w/o power-cycling the modem, I’ll get an error.
What is w/o power-cycleing? Perhaps I overlook there something…
what I mean by that is that even after a successful download of the complete certificate when I try to download it again (using the exact same commands) I get an “ERROR”. In other words for me when the certificate has been downloaded fully once (without ERROR) I cannot download it a second time. Only if I dis- and reconnect power I can download the certificate again one time.
Please also note: I am using a SIM7020G which most likely runs different firmware so my advise might not work with your modem version.
@fm Hello agewin and thanks a lot.
I don’t think that the G or E Version is different in this aspect. Because there is no difference mention in the manual. What Firmware are you using? Mine is: 1752B07SIM7020E on both devices.
I now tried everything as above mentioned with my second raspberry pi. Same result.
I read the “SIM7020 Series_AT Command Manual_V1.05” again and found there the example:
which should result in OK
But this also ends in an Error in my case. Therefore it looks like the command ist unkown for both of my devices.
I now tried to contect the manucfacturer to get any progress. I’ll let you know what the error was if i find a solution.
the firmware version on my SIM7020G is 1910B05SIM7020G.
For me the read command AT+CSETCA? only returns OK if at least one certificate has been downloaded successfully. (I use this command to determine whether a specific certificate has already been downloaded or not.)
You probably think of the test command to determine about whether a command exists or not. But test commands typically end in =?.
I found downloading certificates into the SIM7020G is a tricky business and the method is quite different compared to other SIMCOM modems.
Anyhow, hopefully you get some useful information from the manufacturer.
Thank you again for your answer. I am still stuck with this issue.
As far as I did have any answer from waveshare or simcom yet I did again full Check of the programm.
The following things are working:
- Network connection
- MQTT Connection to test.mosquitto.org
- PUBLISH via MQTT works too
I meant AT+CSETCA? returns error. But also AT+CSETCA=? return ERROR which should not happen i guess.
The following commands i tried are also working:
Source of the Commands is: SIM7020 Series_AT Command Manual_V1.03.pdf
Two aspects I am thinking about:
- Is there any Pre-Condition to “activate” the AT+CSETCA? and a I still overead this in the doc files?
- If the Command AT+SCETCA is not kown be my devices, are they the wrong devices? But I didn’t find any Note that SIM7020E is not working with MQTTs
as long as no certificate has been downloaded AT+CSETCA? will return an error - that happens for me too.
According to the documentation there is no AT+CSETCA=? (e.g. test) command - so I’d expect an ERROR response.
I am not aware of any specific precondition. Maybe with the exception that it might help to reboot the modem after every failed try to download to have a clean start.
Sorry, at this point in time I am out of ideas.