/* Callback function */ void nrf_mesh_rx_cb(const uint8_t p_data, uint32_t length) { __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Rx received\r\n"); } /* ========================================================================== */ /* Init mesh serial */ __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Enabling serial interface...\n"); nrf_mesh_serial_app_rx_cb_t app_rx_cb = nrf_mesh_rx_cb; uint32_t result = nrf_mesh_serial_init(app_rx_cb); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Init result: %d\r\n", result); result = nrf_mesh_serial_enable(); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Enable result: %d\r\n", result); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initialization complete!\n"); NRF_GPIO->OUTCLR = BSP_LED_0_MASK; char hello[] = "\r\nHello from Nordic\r\n"; result = nrf_mesh_serial_tx(hello, sizeof(hello)); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Send result hello: %d\r\n", result); char running[] = "The program is running\r\n"; result = nrf_mesh_serial_tx(running, sizeof(running)); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Send result running: %d\r\n", result);