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
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
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.