Send data to SED devices

Hi, 

I have a functioning CoAP client/server based OpenThread mesh network. My clients are SEDs. I can send data from clients to the CoAP server. Now I want to do the opposite, to send data from server to the SED clients. I have the unicast IPV6 of the SEDs on server side. I am thinking of using 'coap_send_request ()' as used by the clients to send data packet from server. I am not clear how on clients side to receive this. On server side I can see 'srv_context' and 'otCoapResource' structures and 'otCoapStart' used to manage data transmitted by the client. But I dont think I can start another CoAP server on client side, and there is no need for that. May be what we need is a kernel thread to look into packets being received and then set an kernel event or something like that to indicate data receive. What would be the best way of moving foward.

Cheers,

Kaushalya

Parents Reply
  • Hi Maria,

    I have looked at using coap get/put methods to send payloads to SED clients using CLI. 

    1. Client has to create a uri resource 

    2. The host get this resource using 'coap get'

    3. The host use the resource to send payloads to the SED client by using 'coap put'

    I tried decoding the cli_coap.cpp to extract the APIs needed for this. I am not 100% sure on how to do that. Could you please help here?

    Thanks,

    Kaushalya

Children
No Data
Related