This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1312R7: Log like functionality from Wi-SUN Border Router to wfantund log

Part Number: CC1312R7
Other Parts Discussed in Thread: WI-SUN

Tool/software:

Hi.

There is a demand to log some information from the Wi-SUN Border Router using the same serial as wfantund. It is possible to read logs from ns_trace lib with other serial pin, but due to hardware limitations, it would be better to use just one serial pin in our application.

The idea is to send information from the NCP device to the wfantund log, without asking the NCP device for information with wfanctl. Is it feasible?

Thank you.

Regards, Maurício.

  • Hi Mauricio,

    If I understand correctly you want to send trace statements over the same SPI pin that you are using for NCP commands. If you know there are no NCP commands going back or forth then you should be able to use the same pin.

    Cheers,

    Marie H

  • Hi Marie.

    I don't really want to send trace statements over the same SPI, I want to be able to send some string messages from NCP device to wfantund output (log). For instance, wfantund outputs messages like "Interface not up" or "Interface is up". Is it possible for the NCP to send any message I want and output it in wfantund?

    Thank you.

    Regards, Mauricio.

  • Hi Mauricio,

    This sounds like it should be possible. I will reach out to the SW developers to hear if and how it can be achieved. I'll get back to you on Thursday.

    Cheers,

    Marie H

  • Hi Mauricio,

    Apologies for the delay.

    Here is the feedback from the SW developer.

    1. In spinel interface, you can use ifconfig to retrieve the status of interface. However this command is not ported to wfanctl yet. In wfanctl, you can add the command “ifconfig” to retrieve the BR status. When response is received, the status can be displayed in console. But you have to implement it yourself.
    2. In wfanctl, we only provided basic commands for wfantund. Additional commands needs to be added as needed.
    3. Alternatively, you can add your own way to send a message to the Host.
      1. In BR, use UDP to encapsulate the message and send the UDP packet to host.
      2. In Host, start UDP server to listen the BR UDP packet. When receive UDP packet, display the message in console.

    Cheers,

    Marie H