Hi,
I am using the Nordic UART Service (NUS) on an nRF52840 with NCS. Without pairing enabled, NUS works perfectly with the nRF Toolbox UART service — both sending and receiving data works as expected. After adding pairing/bonding (Just Works) (CONFIG_BT_NUS_SECURITY_ENABLED), NUS stops working completely:
bt_nus_send() consistently returns -128 (-ENOTCONN) even after 5+ minutes of retries — the peripheral never sees the client subscribe to NUS TX characteristic notifications.
Messages sent from nRF Toolbox to the peripheral are also not being received.
My log shows:
[00:03:41.354,492] <inf> bluetooth: Connected
[00:03:44.490,722] <inf> bluetooth: Security changed: 60:B4:A2:2C:19:ED (public) level 2
[00:03:44.552,490] <inf> bluetooth: Pairing completed: 60:B4:A2:2C:19:ED (public), bonded: 1
[00:04:06.952,972] <dbg> nus: nus_send: No connected client, skipping NUS send
[00:04:06.953,033] <err> telemetry: Failed to send telemetry over NUS: -128
Pairing and bonding complete successfully, but NUS is completely non-functional in both directions after pairing.
My question:
Does nRF Toolbox subscribe to NUS TX notifications and perform GATT service discovery correctly after pairing/bonding completes, or is this a known limitation of the app? Is there something on the peripheral side that needs to be done differently when security is enabled?
Environment:
Hardware: nRF52840
NCS version: 3.2.4
nRF Toolbox version: 4.2.0
CONFIG_BT_SMP=y
CONFIG_BT_ID_UNPAIR_MATCHING_BONDS=y
CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y
CONFIG_BT_SMP_SC_PAIR_ONLY=n
Any guidance would be appreciated. Thank you.