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.

  • I declared a callback in nrf_mesh_serial_init() but It seems that the callback function doesn't execute when there is a serial event. This is part of my code, I am modifying the example for sure. I attached the run result in this command too. run_result.txt

    All the function returned NRF_SUCCESS (0) but the callback function doesn't execute. Did I make any mistake? Once again, thank you very much for your support

Reply Children
No Data
Related