Using MQTT with sim7600 cell modem

Grandpa-G
Posts: 4
Joined: Mon Sep 19, 2022 2:16 pm

Using MQTT with sim7600 cell modem

Postby Grandpa-G » Fri Oct 14, 2022 12:11 am

This is a cell modem only configuration, no wifi. I am using HiveMQ as the broker. If I use a wifi connection (temporaily) all works correctly. If I take out the wifi, then there is an error on the esp_mqtt_client_init. The broker host name is a long unique name like

Code: Select all

84053a451db5xxxxxxbaa.s1.eu.hivemq.cloud
I know the cell modem makes a connection a network as I can get an ip address from the broker host name. If I pass the long broker name to the init via cfg.host, I get the error

Code: Select all

17:06:48.469 -> E (44201) esp-tls: couldn't get hostname for :84053451db56xxxxxebaa.s1.eu.hivemq.cloud: getaddrinfo() returns 202, addrinfo=0x0
To compound the problem, I have to include

Code: Select all

WiFi.mode (WIFI_MODE_STA);

or else I get nasty errors. I am using TinyGSM to manage the cell modem.

Any suggestions what to do?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 75 guests