Modification of the Thread message header

Hello

In my project, I am using the Thread network. I can communicate with all the devices on the network but there is a particular case that I don't know how to solve.

I have device '1' sending a confirmable message to device '2'. To resolve this request, device '2' needs time so I would like device '2' to send an ack and then later it will send the response. My problem is that I can't remove/add message ID and token to my messages.

I would like to be able to include the message ID in my first message (ack) and then the token in my second message. I tried the "otCoapMessageInitResponse(...)" function but it includes the token and the message ID in my frame and I can't remove either of them.

I also tried to create a new frame (otCoapNewMessage() + otCoapMessageInit()) and there I can add the token (otCoapMessageSetToken()) but I did not find a function to add an ID message...

Do you know how I should go about defining the content of my messages?

Thanks

  • Hi Quentin

    Sorry about the late response but I have to ask internally to get a good answer. I'm still waiting for a reply from our experts, but in the meantime. Can you add some details on what SDK and SDK version are you using for development? What exactly is it that takes time to resolve with your confirmable message, and how much time are we talking about here?

    As an update from what I've been able to find. I'm not so sure you can split up the token and message ID, but rather send the confirmation message with the same ID as the ACK. I still need to hear from the experts to confirm whether this is the case though.

    Best regards,

    Simon

  • Hello

    I use SEGGER Embedded Studio for ARM V5.60a

    The duration of time to respond to the message is variable but we are talking here about several seconds minimum (when device '2' receives the request, it must query several other devices on the network in order to retrieve information).

    Just for your information on how the CoAP protocol works, I advise you to read pages 33 to 35 of the documentation (www.rfc-editor.org/.../rfc7252 )
    When a device '1' sends a confirmable message to a device '2', this message must be acknowledged with the same message ID so that the device '1' does not automatically retransmit this message: it is why I have to quickly acknowledge the confirmable message in order to have a multiple messages retransmissions.
    When we send a confirmable message to retrieve information (GET), we add a token in this message so that we can identify that the message received (containing this same token) is the response to a message we sent.

    Thank you

  • Hi Quentin

    Okay, so since you use SEGGER, I assume you're using the nRF5 SDK for Thread and Zigbee? Or are you using the nRF Connect SDK? You might need to send a confirmable request, that is ACKed to start processing, and then send a new request when you expect the processing to be complete.

    Best regards,

    Simon

  • Hello

    I use nRF5 SDK for Thread and Zigbee.


    Yes I know I could try to find an alternative to solve the problem but as it seems to me that the protocol allows to do it like that, I wanted to know if your SDK allowed it too.
    What did your experts say?


    Thank you

  • Hi again Quentin

    I'm sorry about the delayed response, but I haven't heard back from the developers on this yet, and have bumped the internal ticket again. I'll get back to you as soon as I hear from you.

    Best regards,

    Simon

Related