Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S3 fails to reconnect to MQTT SSL broker with A7670G LTE modem (IDFGH-14323) #723

Open
3 tasks done
Sanjana000000 opened this issue Dec 31, 2024 · 2 comments
Open
3 tasks done
Labels
Status: Opened Issue is new

Comments

@Sanjana000000
Copy link

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

ESP32 S3 is connected to the A7670G lte modem via usb and the pppos_client is being used from esp_modem external component.ESP32 S3 succesfully connects to the Non-SSL broker but fails to reconnect to the SSL Mqtt broker on disconnect.
During testing, we observed the following issue with MQTT reconnection after a disconnect event. The LTE module otherwise appears to maintain its network connectivity.

The device fails to reconnect, and the logs show the following error:

�[0;31mE (2898550) esp-tls: couldn't get hostname for :<mqtt_ssl_broker_address>: getaddrinfo() returns 202, addrinfo=0x0�[0m

�[0;31mE (2898550) esp-tls: Failed to open new connection�[0m

�[0;31mE (2898560) transport_base: Failed to open a new connection�[0m

�[0;31mE (2898560) mqtt_client: Error transport connect�[0m

�[0;32mI (2898570) APP_MQTT: INFO:MQTT EVENT_0�[0m

�[0;31mE (2898570) APP_MQTT: INFO:MQTT_EVENT_ERROR�[0m

�[0;31mE (2898580) APP_MQTT: Last error reported from esp-tls: 0x8001�[0m

�[0;32mI (2898580) APP_MQTT: Last errno string (Success)�[0m

�[0;32mI (2898590) APP_MQTT: INFO:MQTT EVENT_2�[0m

�[0;32mI (2898590) APP_MQTT: INFO:Client disconnected�[0m

@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 31, 2024
@github-actions github-actions bot changed the title ESP32-S3 fails to reconnect to MQTT SSL broker with A7670G LTE modem ESP32-S3 fails to reconnect to MQTT SSL broker with A7670G LTE modem (IDFGH-14323) Dec 31, 2024
@david-cermak
Copy link
Collaborator

The LTE module otherwise appears to maintain its network connectivity.

Are you sure that the module is still connected? The modem library doesn't automatically reconnect when connection is lost.
Are you getting some events from PPP/esp_netif? Did you see a lost IP event?
Could you please check the connectivity (e.g. calling ping with some internet service)?

@Sanjana000000
Copy link
Author

Sanjana000000 commented Jan 7, 2025

Are you sure that the module is still connected? The modem library doesn't automatically reconnect when connection is lost.
Are you getting some events from PPP/esp_netif? Did you see a lost IP event?
Could you please check the connectivity (e.g. calling ping with some internet service)?

  • If the connection is lost, we manually reinitialize the LTE module to reconnect to the network and received the "GOT IP" event.
  • Yes, we received some events regarding the lost IP :
    -esp-netif_lwip-ppp: Connection lost
    -Modem Disconnect from the PPP Server
    -Lost IP
  • Upon reconnecting, we received a "GOT IP" event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

3 participants