Coap observing with asynchronous get

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Coap observing with asynchronous get

Postby leenowell » Wed Feb 27, 2019 8:05 am

Hi all,

I have been looking at the coap library which is bundled with the IDF and managed to get the client server example working fine - it uses an asynchronous get. I modified the code to enable the client to "observe" changes and the initial get seems to work fine. The trouble is, when the resource is marked as dirty and it tries to send the update back to the client, I get a core dump.

It looks like the reason for this is that the handler receives a null request - I guess this may make sense since there wasn't an actual request from the client.

How should I deal with this? Creating a request PDU in the handler seems to partly work but because I don't have the original request I believe coap is rejecting it at the client because the id of the response matches my fake one rather than the one the client originally sent (as per the spec I believe).

Anyone have any ideas?

Thanks in advance

Lee.

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Re: Coap observing with asynchronous get

Postby leenowell » Fri Mar 01, 2019 7:05 am

Any ideas anyone?

Who is online

Users browsing this forum: johboh and 153 guests