How to identify two or more CoAP clients connected to the same Server

Hi, How can I get the RLOC16 or similar ID from the CoAP clients connected to my CoAP server? I need to get this information from the messages that the clients send. 

Cheers,

Parents Reply
  • Hi ,

    Thanks for your reply. Wouldn't this retrieve the RLOC of the server? 

    I tried the otThreadGetRloc16 () function, but it only got the RLOC16 of the server.

    In my instance more than one coap clients will be sending messages to the server. So server needs to get the RLOC16 of each client based on each message. 

    My client handler in the server is like this 

    static void temp_request_handler(void *context, otMessage *message, const otMessageInfo *message_info)
    {
    ...
    }
    I tried looking at each of the variables passed into the handler, but I couldn't find any RLOC16 parameter anywhere. 

     Cheers,

Children
Related