-
Notifications
You must be signed in to change notification settings - Fork 171
Closed
Description
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
I compiled the modem_tcp_client example and seeing no mqtt publish to the cloud.
I did following modifications those are mandatory for my use case.
- serial port pins are modified to have UART communication up and running.
- I changed the correct APN and sdkconfig.
- loop back URL address to correct ip as shown below.
mqtt_config.broker.address.uri = "mqtts://137.135.83.217";
The debug logs are available here:
I (882) main_task: Calling app_main()
D (892) esp_netif_lwip: LwIP stack has been initialized
D (892) esp_netif_lwip: esp-netif has been successfully initialized
D (902) event: running task for loop 0x3fc9d7d4loc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (942) intr_alloc: Connected src 28 to int 17 (cpu 0)
V (942) command_lib: sync
V (942) command_lib: generic_command_common
V (952) command_lib: generic_command
D (952) command_lib: generic_command command AT
D (1052) command_lib: Response:
OK
D (1052) sock_dce: Modem in sync
V (1052) command_lib: set_echo
V (1052) command_lib: generic_command_common
V (1052) command_lib: generic_command
D (1062) command_lib: generic_command command ATE0
D (1162) command_lib: Response:
OK
V (1162) command_lib: set_pdp_context
V (1162) command_lib: generic_command_common
V (1162) command_lib: generic_command
D (1162) command_lib: generic_command command AT+CGDCONT=1,"IP","iot.1nce.net"
D (1292) command_lib: Response:
OK
D (1292) sock_dce: PDP configured
V (1292) sock_commands: net_open
V (1292) command_lib: generic_get_string
V (1292) command_lib: generic_get_string
V (1402) command_lib: Token: {
}
V (1402) command_lib: Token: {+NETOPEN: 1}
V (1402) command_lib: Token: {
}
V (1402) command_lib: Token: {OK}
V (1402) sock_commands: +NETOPEN: 1
D (1402) sock_commands: Already there
V (1412) command_lib: generic_command
D (1412) command_lib: generic_command command AT+CIPRXGET=1
D (1512) command_lib: Response:
OK
D (1512) sock_dce: Network opened
V (1512) command_lib: generic_get_string
V (1512) command_lib: generic_get_string
V (1622) command_lib: Token: {
}
V (1622) command_lib: Token: {+IPADDR: 10.223.166.7}
V (1622) command_lib: Token: {
}
V (1622) command_lib: Token: {OK}
I (1632) sock_dce: Got IP +IPADDR: 10.223.166.7
I (1632) sock_dce: Socket created
I (1642) sock_dce: Socket bound, port 8883
D (1642) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit
D (1652) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit
D (1652) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit
D (1662) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit
D (1672) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit
D (1682) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit
D (1682) mqtt_client: MQTT client_id=ESP32_66AD88
D (1692) event: created event loop 0x3fca1144
D (1692) mqtt_client: Core selection disabled
D (1702) event: running post MQTT_EVENTS:7 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (1712) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=7
I (1712) modem_client: MQTT other event id: 7
D (1722) esp-tls: host:137.135.83.217: strlen 14
D (1722) esp-tls: [sock=55] Resolved IPv4 address: 137.135.83.217
D (1732) esp-tls: [sock=55] Connecting to server. HOST: 137.135.83.217, Port: 8883
E (1742) esp-tls: [sock=55] connect() error: Host is unreachable
E (1752) esp-tls: Failed to open new connection
E (1752) transport_base: Failed to open a new connection
E (1762) mqtt_client: Error transport connect
D (1762) event: running post MQTT_EVENTS:0 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (1772) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=0
I (1782) modem_client: MQTT_EVENT_ERROR
D (1782) mqtt_client: Reconnect after 10000 ms
D (1792) event: running post MQTT_EVENTS:2 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (1802) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=2
I (1812) modem_client: MQTT_EVENT_DISCONNECTED
V (1812) sock_commands: tcp_close
V (1812) command_lib: generic_command
D (1822) command_lib: generic_command command AT+CIPCLOSE=0
D (1842) command_lib: Response:
+CIPCLOSE: 0,4
ERROR
V (1962) sock_dce: 0x3fca054c 0d 0a 4f 4b 0d 0a |..OK..|
D (1962) sock_commands: response
OK
V (2242) sock_dce: 0x3fca054c 0d 0a 2b 43 49 50 4f 50 45 4e 3a 20 30 2c 30 0d |..+CIPOPEN: 0,0.|
V (2242) sock_dce: 0x3fca055c 0a |.|
D (2242) sock_commands: response
+CIPOPEN: 0,0
I (2252) sock_commands: Connected!
V (2452) modem_client: ...performing
V (2962) modem_client: ...performing
V (3472) modem_client: ...performing
V (3982) modem_client: ...performing
V (4492) modem_client: ...performing
V (5002) modem_client: ...performing
V (5512) modem_client: ...performing
V (6022) modem_client: ...performing
V (6532) modem_client: ...performing
V (7042) modem_client: ...performing
V (7552) modem_client: ...performing
V (8062) modem_client: ...performing
V (8572) modem_client: ...performing
V (9082) modem_client: ...performing
V (9592) modem_client: ...performing
V (10102) modem_client: ...performing
V (10612) modem_client: ...performing
V (11122) modem_client: ...performing
V (11632) modem_client: ...performing
D (11812) mqtt_client: Reconnecting...
D (11812) event: running post MQTT_EVENTS:7 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (11812) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=7
I (11822) modem_client: MQTT other event id: 7
D (11822) esp-tls: host:137.135.83.217: strlen 14
D (11832) esp-tls: [sock=55] Resolved IPv4 address: 137.135.83.217
D (11832) esp-tls: [sock=55] Connecting to server. HOST: 137.135.83.217, Port: 8883
E (11842) esp-tls: [sock=55] connect() error: Host is unreachable
E (11852) esp-tls: Failed to open new connection
E (11852) transport_base: Failed to open a new connection
E (11862) mqtt_client: Error transport connect
D (11862) event: running post MQTT_EVENTS:0 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (11872) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=0
I (11882) modem_client: MQTT_EVENT_ERROR
D (11892) mqtt_client: Reconnect after 10000 ms
D (11892) event: running post MQTT_EVENTS:2 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (11902) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=2
I (11912) modem_client: MQTT_EVENT_DISCONNECTED
V (12142) modem_client: ...performing
V (12652) modem_client: ...performing
V (13162) modem_client: ...performing
V (13672) modem_client: ...performing
V (14182) modem_client: ...performing
V (14692) modem_client: ...performing
V (15202) modem_client: ...performing
V (15712) modem_client: ...performing
V (16222) modem_client: ...performing
V (16732) modem_client: ...performing
V (17242) modem_client: ...performing
V (17752) modem_client: ...performing
V (18262) modem_client: ...performing
V (18772) modem_client: ...performing
V (19282) modem_client: ...performing
V (19792) modem_client: ...performing
V (20302) modem_client: ...performing
V (20812) modem_client: ...performing
V (21322) modem_client: ...performing
V (21832) modem_client: ...performing
D (21912) mqtt_client: Reconnecting...
D (21912) event: running post MQTT_EVENTS:7 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (21912) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=7
I (21922) modem_client: MQTT other event id: 7
D (21922) esp-tls: host:137.135.83.217: strlen 14
D (21932) esp-tls: [sock=55] Resolved IPv4 address: 137.135.83.217
D (21932) esp-tls: [sock=55] Connecting to server. HOST: 137.135.83.217, Port: 8883
E (21942) esp-tls: [sock=55] connect() error: Host is unreachable
E (21952) esp-tls: Failed to open new connection
E (21952) transport_base: Failed to open a new connection
E (21962) mqtt_client: Error transport connect
D (21962) event: running post MQTT_EVENTS:0 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (21972) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=0
I (21982) modem_client: MQTT_EVENT_ERROR
D (21992) mqtt_client: Reconnect after 10000 ms
D (21992) event: running post MQTT_EVENTS:2 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (22002) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=2
I (22012) modem_client: MQTT_EVENT_DISCONNECTED
V (22342) modem_client: ...performing
V (22852) modem_client: ...performing
V (23362) modem_client: ...performing
V (23872) modem_client: ...performing
V (24382) modem_client: ...performing
V (24892) modem_client: ...performing
V (25402) modem_client: ...performing
V (25912) modem_client: ...performing
V (26422) modem_client: ...performing
V (26932) modem_client: ...performing
V (27442) modem_client: ...performing
V (27952) modem_client: ...performing
V (28462) modem_client: ...performing
V (28972) modem_client: ...performing
V (29482) modem_client: ...performing
V (29992) modem_client: ...performing
V (30502) modem_client: ...performing
V (31012) modem_client: ...performing
V (31522) modem_client: ...performing
D (32012) mqtt_client: Reconnecting...
D (32012) event: running post MQTT_EVENTS:7 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (32012) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=7
I (32022) modem_client: MQTT other event id: 7
D (32022) esp-tls: host:137.135.83.217: strlen 14
D (32032) esp-tls: [sock=55] Resolved IPv4 address: 137.135.83.217
D (32032) esp-tls: [sock=55] Connecting to server. HOST: 137.135.83.217, Port: 8883
E (32042) esp-tls: [sock=55] connect() error: Host is unreachable
E (32052) esp-tls: Failed to open new connection
E (32052) transport_base: Failed to open a new connection
E (32062) mqtt_client: Error transport connect
D (32062) event: running post MQTT_EVENTS:0 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (32072) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=0
I (32082) modem_client: MQTT_EVENT_ERROR
D (32092) mqtt_client: Reconnect after 10000 ms
D (32092) event: running post MQTT_EVENTS:2 with handler 0x4200a440 and context 0x3fca1a74 on loop 0x3fca1144
D (32102) modem_client: Event dispatched from event loop base=MQTT_EVENTS, event_id=2
I (32112) modem_client: MQTT_EVENT_DISCONNECTED
V (32112) modem_client: ...performing
V (32632) modem_client: ...performing
V (33142) modem_client: ...performing
V (33652) modem_client: ...performing
V (34162) modem_client: ...performing
V (34672) modem_client: ...performing
V (35182) modem_client: ...performing
Metadata
Metadata
Assignees
Labels
No labels