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

nrf52840 ble_app_uart central hangs with non_connectable ble_app_uart peripheral

i am working ble_app_uart example here in peripheral i changed the advertising mode from connectable to non_connectable mode and i checked in nrfConnect app the peripheral is not connecting as far everything is fine but if i use central example in another DK the central hangs i fit detect peripheral DK. The central code i added ADV_REPORT switch case in ble_adv_handle() and it is giving UUID,TX POWER of received advertisement except ble_app_uart peripheral. once the peripheral is detected the advertising LED stays in ON state and no debug statements i could see.

can anyone help me to understand why central hangs if it detects the peripheral advertisement?is it like central is trying to connect so that it hangs?

  • i found solution for the above issue so whenever peripheral is in non connectable mode the central receives non connectable data and somewhere in central program it is trying to keep on connect to the non connectable device once the NUS_SERVICE matched. so i changed service uuid from NUS_UART_SERVICE(0x0001) to 0x0008 and type from BLE_UUID_TYPE_VENDOR_BEGIN to BLE_UUID_TYPE_BLE.

    after the above changes were made i am getting advertisement packets from peripheral continuously, but still i want to know if the advertisement packet if of NORDIC UART SERVICE in non connectable why ble_app_uart_c is getting struck.

Related