publishing or subscribing to topic aws/certificates/create/json and aws/certificates/create/json/accepted fails with POLLHUP error to end up with aws iot disconnect event

I am trying to get provisioning by trusted user procedure of aws_iot working by making some changes in aws_iot nrf sample 

I have tested it with permanent certificates and it works fine


But Whenever I try to connect to aws iot server with these topic 


aws/certificates/create/json

aws/certificates/create/json/accepted

it fails with POLLHUP error, ending client connection be it with permanent certificates or with temp certificates (Used in provisioning by trusted device procedure)

Referring to similar issue I figured it has to do with Modem's limitation on handling big TLS buffers that are sent in response to this topic
( Issue Link: aws iot disconnect event when publishing to $aws/certificates/create/json )

Can we configure it, if not how can we develop a code where we can fetch permanent certs using temp certs with nrf platforms?

P.S. I am using the same aws_iot sample just changed the endpoint, client id and topics

Also I have made sure that AWS side things (provisioning template, policies etc.) are fine as it works for provisioning by trusted user for native ubuntu emulation of the device

Parents
  • Hello,

    can you check out this commit? It takes care of the topics and certs in the AWS IoT sample.

  • Have been following same PR, just adapted it to wifi instead of LTE, rest, remain same, including configs, except I have been compiling it for nrf7002DK
    It fails at the stage where it tries to connect to aws over mqtt 

    have been facing error  aws_iot: mqtt_connect, error: -123 which I suppose stands for protocol not supported 
    Could this  be a reason (Kindly refer to the link)

    Kindly find the logs below

    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.239,898] <inf> aws_iot_sample: The AWS IoT sample started, version: v1.0.0
    [00:00:00.250,183] <inf> aws_iot_sample: Bringing network interface up and connecting to the network
    [00:00:01.934,448] <inf> wifi_mgmt_ext: Connection requested
    [00:00:01.943,115] <wrn> aws_iot: Subscribed to custom topic: $aws/things/Alarm_Hub/shadow/update/documents
    [00:00:06.857,330] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:06.882,690] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:06.942,535] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:07.611,175] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:07.625,396] <inf> net_dhcpv4: Received: 192.168.0.101
    [00:00:07.634,063] <inf> aws_iot_sample: Network connectivity established
    [00:00:09.246,124] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:12.643,432] <inf> aws_iot_sample: Connecting to AWS IoT
    [00:00:12.651,855] <inf> aws_iot_sample: AWS_IOT_EVT_CONNECTING
    [00:00:12.688,598] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:12.702,911] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.713,104] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.723,266] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.733,459] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.744,659] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.754,852] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.766,052] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.776,245] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.787,475] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.797,637] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.808,868] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.819,030] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.830,261] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.840,423] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.851,684] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -103
    [00:00:12.863,189] <dbg> aws_iot: broker_init: IPv4 Address found 54.164.62.249
    [00:00:12.875,915] <dbg> aws_iot: client_broker_init: Using security tag: 43
    [00:00:21.121,398] <dbg> aws_iot: client_broker_init: Credentials provisioned to security tag 43
    [00:00:21.132,720] <err> aws_iot: mqtt_connect, error: -123
    [00:00:21.141,082] <err> aws_iot: AWS broker connect failed -123
    [00:00:21.149,871] <inf> aws_iot_sample: AWS_IOT_EVT_CONNECTING


Reply
  • Have been following same PR, just adapted it to wifi instead of LTE, rest, remain same, including configs, except I have been compiling it for nrf7002DK
    It fails at the stage where it tries to connect to aws over mqtt 

    have been facing error  aws_iot: mqtt_connect, error: -123 which I suppose stands for protocol not supported 
    Could this  be a reason (Kindly refer to the link)

    Kindly find the logs below

    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.239,898] <inf> aws_iot_sample: The AWS IoT sample started, version: v1.0.0
    [00:00:00.250,183] <inf> aws_iot_sample: Bringing network interface up and connecting to the network
    [00:00:01.934,448] <inf> wifi_mgmt_ext: Connection requested
    [00:00:01.943,115] <wrn> aws_iot: Subscribed to custom topic: $aws/things/Alarm_Hub/shadow/update/documents
    [00:00:06.857,330] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:06.882,690] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:06.942,535] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:07.611,175] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:07.625,396] <inf> net_dhcpv4: Received: 192.168.0.101
    [00:00:07.634,063] <inf> aws_iot_sample: Network connectivity established
    [00:00:09.246,124] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x2006010c, st=0, user_data=(nil)
    [00:00:12.643,432] <inf> aws_iot_sample: Connecting to AWS IoT
    [00:00:12.651,855] <inf> aws_iot_sample: AWS_IOT_EVT_CONNECTING
    [00:00:12.688,598] <dbg> net_sock_packet: zpacket_received_cb: (rx_q[0]): ctx=0x2000e258, pkt=0x20060150, st=0, user_data=(nil)
    [00:00:12.702,911] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.713,104] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.723,266] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.733,459] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.744,659] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.754,852] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.766,052] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.776,245] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.787,475] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.797,637] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.808,868] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.819,030] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.830,261] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -100
    [00:00:12.840,423] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): getaddrinfo entries overflow
    [00:00:12.851,684] <dbg> net_sock_addr: dns_resolve_cb: (rx_q[0]): dns status: -103
    [00:00:12.863,189] <dbg> aws_iot: broker_init: IPv4 Address found 54.164.62.249
    [00:00:12.875,915] <dbg> aws_iot: client_broker_init: Using security tag: 43
    [00:00:21.121,398] <dbg> aws_iot: client_broker_init: Credentials provisioned to security tag 43
    [00:00:21.132,720] <err> aws_iot: mqtt_connect, error: -123
    [00:00:21.141,082] <err> aws_iot: AWS broker connect failed -123
    [00:00:21.149,871] <inf> aws_iot_sample: AWS_IOT_EVT_CONNECTING


Children
No Data
Related