Closed cedriczou13 closed 2 months ago
Hi, @cedriczou13 Your issue is more like this question in our BR docs: https://docs.espressif.com/projects/esp-thread-br/en/latest/qa.html#q1-why-can-t-i-access-the-host-from-the-br-device-using-the-ping-command.
You can call the ot APIs to create a COAP message and add the detailed information you like in the message. But for sending this message to the cloud on BR device, using any openthread APIs is not a reasonable choose. There is a WiFi(or Ethernet) interface on the BR, so the better choose is using the lwip UDP API to send the COAP message.
BTW, your code might work for the other thread end devices to access the cloud via a NAT64-enabled thread BR. I mean in your thread network, this code might work on the device which only has the thread netif. The message will be forward to cloud via BR. Only a risk here: if the function coap_send_mess
is not processed in the ot task, you need to acquire the ot lock before calling OT APIs. Please refer to here: https://github.com/espressif/esp-idf/blob/master/components/openthread/include/esp_openthread_lock.h#L48.
And I have a question: Does the BR device have to access the cloud through COAP request? Or your project just needs the BR forward these requests from Thread ED to cloud?
@cedriczou13 Do you have any update on this issue?
Question: Using OpenThread CoAP API on ESP BR Router
Hi,
I am currently working with the ESP BR router and attempting to utilize the OpenThread CoAP API to send a CoAP message to the cloud. However, I am encountering some errors in the process.
Details:
Issue: When I try to send a CoAP message using the OpenThread CoAP API, I am receiving an error. Here are the specific details of the error message and the relevant portion of my code:
Error Message:
I would appreciate any guidance or insights on what might be causing this issue and how I can successfully send a CoAP message to the cloud using the OpenThread CoAP API on the ESP BR router.
Thank you in advance for your help!
Best regards, Cedric