# Connecting to HiveMQ cluster via LTE module

**URL:** <https://community.hivemq.com/t/connecting-to-hivemq-cluster-via-lte-module/2811>\
**Category:** Uncategorized\
**Created:** [March 27, 2024, 1:32am UTC](https://community.hivemq.com/t/connecting-to-hivemq-cluster-via-lte-module/2811 "2024-03-27T01:32:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bfreak](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@Bfreak](https://community.hivemq.com/u/Bfreak)\
**Post date:** [March 27, 2024, 1:32am UTC](https://community.hivemq.com/t/connecting-to-hivemq-cluster-via-lte-module/2811/1 "2024-03-27T01:32:16Z")

</div>

Hi all. I’m developing an NB-IOT weather station for a university project. At the moment I’m trying to prototype the design using a SIMCOM7080G, which means trying to make MQTT connections via AT command, which is proving to be extremely difficult.

[According to this modules very lacking documentation](https://files.waveshare.com/upload/3/39/SIM7080_Series_AT_Command_Manual_V1.02.pdf)

I have the following parameters set up, at the connect command (AT+SMCONN) I always encounter a connection error (and yes, I have an active LTE connection, having no problem pulling APIs)

Currently my script is

```auto
def mqtt_init():
    # Set MQTT parameters
    commands = [
        'AT+SMCONF="CLIENTID","pico_client"',
        'AT+SMCONF="URL","fakeurlgoeshere123456.s1.eu.hivemq.cloud","8883"',
        'AT+SMCONF="USERNAME","picotest"',
        'AT+SMCONF="PASSWORD","Hello123!"',
        'AT+SMCONF="CLEANSS",1',
        'AT+SMCONF="QOS",1',
        'AT+SMCONF="TOPIC","picosend"'
    ]
    
    # Send commands
    for command in commands:
        send_at_wait_resp(command, 'OK')

    # Connect to the MQTT broker
    send_at_wait_resp('AT+SMCONN', 'OK')

# Function to publish message over MQTT using AT commands
def mqtt_publish(message):
    # Publish a message
    send_at_wait_resp('AT+SMPUB="picosend","{}",{},{},{}'.format(message, len(message), 1, 1), 'OK')

```

Am I missing something re TSL? The only other option I can see involves .PEM files, which I cannot find a way to acquire for my cluster.

Thanks for any feedback and help! Relative beginner.

---

<div class="post-metadata">

**Author:** ![Diego](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@Diego](https://community.hivemq.com/u/Diego)\
**Post date:** [April 9, 2024, 11:08am UTC](https://community.hivemq.com/t/connecting-to-hivemq-cluster-via-lte-module/2811/2 "2024-04-09T11:08:38Z")

</div>

Hi @Bfreak

Welcome to the HiveMQ Community! I agree with you regarding the lack of documentation of these modules but you are looking into the wrong documentation, the one you have shared just has some basic AT commands, please take a look into this one that provides AT MQTT TLS commands samples.

> **[SIM7070\_SIM7080\_SIM7090\_Series\_MQTT(S)\_Application\_Note\_V1.02.pdf](https://files.waveshare.com/wiki/SIM7070G%20Cat-MNB-IoT-GPRS-HAT/SIM7070_SIM7080_SIM7090_Series_MQTT(S)_Application_Note_V1.02.pdf)**
>
> 334.79 KB

There is a thread where another forum member was able to connect a SIM7600 device. It might be useful to use it as a reference for the SIMCOM7080G module.

> [@Cert issue when connecting to Cloud Hive instance](https://community.hivemq.com/t/cert-issue-when-connecting-to-cloud-hive-instance/2047/28):
>
> Sure … I use these to start connecting to the network AT+CREG? AT+COPS? AT+CPSI? AT+CEREG? AT+NETOPEN? AT+CGDCONT? the PDP start the context with SSL session 0 AT+CSSLCFG="sslversion",0,4 AT+CSSLCFG="authmode",0,3 AT+CSSLCFG="ignorelocaltime",0,1 AT+CSSLCFG="cacert",0,"isrgrootx1.pem" AT+CSSLCFG="ciphersuites",0,0xFFFF AT+CSSLCFG="enableSNI",0,1 SSL check AT+CSSLCFG? Start MQTT TLS AT+CMQTTSTART AT+CMQTTACCQ=0,"client",1,4 AT+CMQTTSSLCFG=0,0 AT+CMQTTCONNECT=0,"tcp://xxx.s1.eu.hivemq.clou…

The root certificate needed to connect to HiveMQ Cloud can be downloaded from [https://letsencrypt.org/certs/isrgrootx1.pem](https://letsencrypt.org/certs/isrgrootx1.pem). This will create a file `isrgrootx1.pem` which should be used as a “server certificate”.

Another suggestion is to always use the latest firmware version available to avoid any issue related to MQTT compatibility on older firmware versions.

Kind regards,  
Diego from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![droidblast](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@droidblast](https://community.hivemq.com/u/droidblast)\
**Post date:** [April 9, 2024, 8:22pm UTC](https://community.hivemq.com/t/connecting-to-hivemq-cluster-via-lte-module/2811/3 "2024-04-09T20:22:26Z")

</div>

Team,

I gave up in the end. Issue for me was the inability to be able to update the firmware on my Lilygo SIM7600. Although the documentation confirms it supports it after a lot of research and testing it came down to the Cert that HiveHQ uses was not supported by the SIM in my case. This is why I wanted to update the firmware.

Read towards the end of the thread.  
[T-SIM7600X](https://github.com/Xinyuan-LilyGO/T-SIM7600X/issues/49)

Managed to connect to AWS as it supports older cert Cipher.  
[AWS](https://github.com/Xinyuan-LilyGO/T-SIM7600X/issues/49#issuecomment-1617589908)

Cipher Block Chaining: TLS\_RSA\_WITH\_AES\_128\_CBC\_SHA

So in summary my advice is see if SIMCOM7080G supports the HiveHQ cipher (isrgrootx1.pem) on the cert.

If so then use sim7080\_sim7500\_sim7600\_sim7900\_sim8200 qdl v1.58 only for update.exe or similar to update the firmware if applicable and if you can find it. Check Simcom’s support page.

The use putty or sscom5.13.1.exe tools to copy the basic AT commands step by step to see what the response and/or error was.

Note read my thread as you will need to get the isrgrootx1.pem cert to the SIM7080G and to do that read the commands (SIM7070\_SIM7080\_SIM7090 Series\_AT Command Manual\_V1.07) that are supported. [Refer to the manual here](https://www.simcom.com/product/SIM7080G.html) or if no login try [here](https://www.waveshare.com/w/upload/0/02/SIM7070_SIM7080_SIM7090_Series_AT_Command_Manual_V1.03.pdf) and [MQTTS](https://www.waveshare.net/w/upload/1/1e/SIM7070_SIM7080_SIM7090_Series_MQTT%28S%29_Application_Note_V1.02.pdf).

Hope this helps but the key was to ensure the sim7080x supports the Ciphers in HiveHQ’s isrgrootx1.pem cert file and if it does upload that isrgrootx1.pem to the SIM and check the size.
