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'm not sure I understand what you modified in serial_uart.h. Normally it's not needed. You just need to declare your callback in nrf_mesh_serial_init().

    When you call nrf_mesh_serial_tx() have you checked you have NRF_SUCCESS returned ?

Reply Children
No Data
Related