libcoap icon indicating copy to clipboard operation
libcoap copied to clipboard

Seperate response send Error

Open arunkvnss opened this issue 7 years ago • 5 comments

Hi, I am using libcoap 4.1.2 latest library,And compiled for linux,But the seperate response send error is coming on each async messages.

Client


Step 1: Get the async handler Step 2: Recvd the empty ACK Server


Step 1: Recvd the Get request Step 2: Send the empty ACK Step 3: After 5 seconds Step 4: Server trying to send data,But it shows (coap_send_impl: invalid argument)

Note ( I just downloaded and compiled,Nothing added extra)

arunkvnss avatar Jun 16 '17 08:06 arunkvnss

Well, I assume you have at least started the example client and server, no? Could you please repeat that test with the additional option '-v9' for server and client and provide the commands and the debug output here? From you description, the reason for this error could be anything.

obgm avatar Jun 16 '17 09:06 obgm

My client is Mozila firefox (Coap addon Module)

Server debug output


Jun 19 10:31:40 DEBG created endpoint [::]:5683 Jun 19 10:31:54 DEBG received 12 bytes on fd 3 v:1 t:CON c:GET i:4640 {} [ Uri-Path:async, Block2:0/_/128 ] Jun 19 10:31:54 DEBG call custom handler for resource 0x9e1d252e Jun 19 10:31:54 CRIT Sending message ipv6 Jun 19 10:31:54 CRIT Sending message 4 len 3 fd Jun 19 10:32:02 CRIT Sending message ipv6 Jun 19 10:32:02 CRIT coap_send_impl: Invalid argument Jun 19 10:32:02 DEBG check_async: cannot send response for message 12695

arunkvnss avatar Jun 19 '17 05:06 arunkvnss

Try binding the server explicitly to one of your IPv6 interfaces. If this does not work, could you please provide a wireshark trace of the coap message flow on the server's interface?

obgm avatar Jun 19 '17 10:06 obgm

Okay,I will try, So it means this will work only in the ipv6 stuff?

arunkvnss avatar Jun 20 '17 10:06 arunkvnss

You are absolutely right!!!!! It worked for the ipv6 interface,as well as the ipv4.

I was connecting from a client by giving the 1pv4 address as its destination,But my server was listening on [::]:5683 (default case) . And am able ping and discover, other activity, But the separate responses are not coming. Is that an issue?

or else i need to bind with 0.0.0.0, because some of my device does not have ipv6 support

arunkvnss avatar Jun 20 '17 10:06 arunkvnss