Hi there,
I’ve set up a free serverless plan to test things out, but my SIM7080 module won’t connect to HiveMQ Cloud.
I’ve already read the other related topics and I understand that I need the following to connect to HiveMQ Cloud:
- isrgrootx1.pem server certificate
- Have the SNI option available in my module
Here are the AT commands I’m trying, but I always end up with an error when attempting the connection:
1) Importing the certficate into the module
AT+CFSINIT
// open file system buffer
AT+CFSWFILE=3,isrgrootx1.pem,0,1939,10000
// here I upload the file and I'm getting an OK
AT+CSSLCFG="CONVERT",2,isrgrootx1.pem
// this is to import the downloaded certificate into the SSL configuration. the "2" is for root CA - I tried with option "1" (for .crt certficates), but I'm always getting an error so I assume I should treat the download server certificate as root CA, is that correct?
AT+CFSTERM // close file system buffer
2) Setting up the connection parameters
AT+CNACT=0,1 // activate APP network
AT+SMCONF="CLIENTID","SIM7080"
AT+SMCONF="URL","[ID].s2.eu.hivemq.cloud",8883
AT+SMCONF="USERNAME","[username]"
AT+SMCONF="PASSWORD","[password]"
3) setting up SSL and connecting
AT+CSSLCFG="sslversion",1,3
// TLS 1.2
AT+CSSLCFG="SNI",1,"[ID].s2.eu.hivemq.cloud"
// The SNI option is available for the SIM7080 but I found examples of some other Simcom modules that only need to "enable" SNI". For my module I need to enter a server name, so I input the exact same URL as my cluster's including my ID, is that ok?
AT+SMSSL=1,"isrgrootx1.pem",""
// first quotes are for the root CA - second quotes are for the .crt certificate and it should technically come with a private key, so I leave it empty since I couldn't convert the server certificate as such earlier... is that OK too?
AT+SMCONN
// here I'm always getting +CME ERROR: operation not allowed
What am I doing wrong exactly? or are any commands missing?
Your help will be greatly appreciated, thank you!