CoAP server (FTD) to client (SED) communication failure.

Hi,

I am currently working on a two way communication between an nrf52840 thread host and an nrf52840 thread client over coap. I have nrf connect sdk version 2.9.0 in both host and client. Sending data from the coap client to the server is working properly. But sending an acknowledgement packet from the host back to the client after receiving a data packet from the client, seems to be not working. Though the coap_send_request function runs successfully, when I sniffed for packets using wireshark, I do not see any ACK packets being sent out from the host and is also missing in the client's host packet handler function. Please find attached the wireshark capture file (1c00 is my host rloc16 and 1c01 is my client rloc16). The code snippet I use to send the ACK packets are shown below. Please let me know if you need more details.

Thanks,
Jis


#define COAP_CMD_SEND_HOST_DATA 53
#define COAP_ACK_ID 85
const struct sockaddr *coap_client_addr = <Client IPv6 address>;
const char *const hostinfo_option[] = { "host-info", NULL };

uint8_t ack_payload[] = {COAP_CMD_SEND_HOST_DATA, COAP_ACK_ID, 0};

if (coap_send_request(COAP_METHOD_PUT, coap_client_addr, hostinfo_option, ack_payload, sizeof(ack_payload), on_client_ack_reply) < 0)
{
    LOG_ERR("Sending ACK failed");
}
else
{
    LOG_INFO("Sending ACK success");
}

static int on_client_ack_reply(const struct coap_packet *response, struct coap_reply *reply, const struct sockaddr *from)
{
    LOG_INF("Received reply after sending ACK");
    return 0;
}

Host2waycomms.pcapng

Parents Reply Children
No Data
Related