This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh serial rx

Hello,

I have just started working with mesh and I'm using the 0.9.2 Mesh SDK. When I use the Serial interface (nrf_mesh_serial) I don't see any function about rx or rx callback. Is it true that Mesh doesn't support rx interface or I have to write it? If it supports, where can I find it?

Thank you very much

Parents
  • Hi Duy,

    The mesh serial interface does support rx. If not how would it take the commands from peer device (PC) :) ?

    UART data is processed in serial_uart.c in serial_uart_process() function.

    The documentation of serial interface can be found here.

    If you want to handle extra application command, when you declare nrf_mesh_serial_init() you can define the call back function that you will handle application command there. The opcode for application command should be in the range of SERIAL_OPCODE_CMD_RANGE_APP_START and SERIAL_OPCODE_CMD_RANGE_APP_END.

  • Thank you very much Hung, I finally did it. I just need to point the callback pointer in serial_uart.h to a callback function. There is still one thing I'm trying to understand is that when I use a tx callback in serial_uart the function nrf_mesh_serial_tx() doesn't send anything to the serial monitor of PC.

Reply Children
No Data
Related