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

nRF52833 peripheral_uart zephyr example only works with "prj_minimal.conf", and not "prj.conf"

Hi,

I have built and flashed the "peripheral_uart" example on the nrf52833dk_nrf52833 from nrfconnect sdk v1.5.0. When I build using the prj_minimal.conf file, everything works as expected; I can send data through the J-Link UART and it appears as a notification in the nrfconnect app on my iOS device (iPhone SE). I can also perform writes to the RX characteristic and then it is sent to the UART.

However, when I build with the prj.conf file, it doesn't appear to work. I can connect to the device, but when I try to subscribe to the notification TX characteristic, the iOS app says "writing is not permitted", and if I try to send UART data, I can see the message "peripheral_uart: Failed to send data over BLE connection" in the RTT logs.

[00:00:02.824,951] [0m<inf> fs_nvs: 6 Sectors of 4096 bytes[0m
[00:00:02.824,981] [0m<inf> fs_nvs: alloc wra: 0, fd8[0m
[00:00:02.824,981] [0m<inf> fs_nvs: data wra: 0, 19[0m
[00:00:02.825,195] [0m<inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                         e5 c7 9c d9 91 00 1d 66  ea fb 6e 7b 98 2f 42 0d |.......f ..n{./B.
                                         f1 60 93 c8                                      |.`..             [0m
[00:00:02.829,284] [0m<inf> bt_hci_core: No ID address. App must call settings_load()[0m
[00:00:02.829,315] [0m<inf> peripheral_uart: Bluetooth initialized[0m
[00:00:07.445,739] [0m<inf> peripheral_uart: Connected 6E:9E:F9:93:3E:97 (random)[0m
[00:00:07.934,997] [1;33m<wrn> bt_l2cap: Ignoring data for unknown CID 0x003a[0m
[00:17:52.777,465] [1;33m<wrn> peripheral_uart: Failed to send data over BLE connection[0m
[00:17:53.791,168] [1;33m<wrn> peripheral_uart: Failed to send data over BLE connection[0m
[00:17:56.850,860] [1;33m<wrn> peripheral_uart: Failed to send data over BLE connection[0m

Looking at the code, I think this has something to do with bonding/pairing, but the iOS app doesn't seem to ask to pair when I connect to the device.

Could you please help me understand what I am doing wrong here?

Thanks.

Related