You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear friend, I set an experiment to see the workings of CoAp and for that I used your code at Github.
I set a 8266 Coap Server running one /led resource
The second is an ESP12 running CoAp Client and it is set to observe the resource /led in the 8266 CoAp Server.
When /led changes at the CoAp Server ( I am using a browser with CoAp for that) the ESP12 is notified. It works ok.
The problem is that, in case I am observing more than one resource at the server I must find a way to identify what resource is generating the packet when it arrives at the following function:
Dear friend, I set an experiment to see the workings of CoAp and for that I used your code at Github.
I set a 8266 Coap Server running one /led resource
The second is an ESP12 running CoAp Client and it is set to observe the resource /led in the 8266 CoAp Server.
When /led changes at the CoAp Server ( I am using a browser with CoAp for that) the ESP12 is notified. It works ok.
The problem is that, in case I am observing more than one resource at the server I must find a way to identify what resource is generating the packet when it arrives at the following function:
`// coap client response callback
void callback_response(coapPacket &packet, IPAddress ip, int port) {
char p[packet.payloadlen + 1];
memcpy(p, packet.payload, packet.payloadlen);
p[packet.payloadlen] = NULL;
}`
I tried to print all variables I could find but had no success with uri.path.
So, my question is:
How to get the "/led" resource name so I can patch the payload value to the correct variable?
Thanks in advance for your time.
And Congrats for the excellent work!
Paulo Borges
The text was updated successfully, but these errors were encountered: