Hi,
I have created a project with nRF52840 DK that reads sensors data and transmits them with BLE UART to my smartphone. Everything works fine.
Then, I tried to do the same thing with the nRF Dongle. Initially, I took the ble_app_template example and modified the .emProject file and flash_placement.xml file
as mentioned in the guides shown in the following links :
https://www.novelbits.io/nrf52840-usb-dongle-tutorial-2/
The dongle started advertising (blinking green LED) and my smartphone could recognize it as I expected . So far so good.
Next I initialized the ble_nus the same way it is implemented in the ble_app_uart example for the DK. I also enabled the app_uart and app_fifo in the sdk_config (since NUS needs them enabled).
When I built and uploaded the .hex and softdevice files with nRF Connect GUI to the Dongle it could not advertise. The green LED was not blinking and I could not Identify the dongle peripheral from my smartphone as before.
I connected the dongle to the nRF52 DK (P19 connector) and started a debug session. I noticed that an error occurs when the program reaches to services_init() function, inside the ble_nus_init() function, at the characteristic_add() function. At this point the function returns an error (0x00000004) and the characteristic is not added. Then the program goes to app_error_fault_handler and halts .
I cannot understand what I do wrong here. Any ideas?
Thank you for your time.