Hi!
Background:
- I'm developing an application on a Raspberry Pi which will connect as a central to an nRF device
- Currently, I'm developing only the Pi side of things an I'm using the nRF Connect app for Android to be able to test connections, scanning and advertising
Problem:
- I use hcitool to create the connection from connectable packets advertised by the app, and then the app crashes immediately once the connection is established using a random address on the Pi
- The app also crashes at once every time I open it while the connection is active, but then does not crash if I close the connection from the Raspberry Pi's side
- The connection seems to still be valid even though the app crashes, and the app does not crash if I use the public address of the Pi when connecting
Question:
- Is this a bug with the nRF Connect app or have I misunderstood something about the BLE and should never initiate a connection using a random address?
If someone want to test this for themselves, run
sudo hcitool lecc --random --static <BLE-ADDR-nRF-Connect-App>
in a Linux environment with BlueZ installed.
The "--static" flag is what sets the own address type to random, so without it the app does not crash as the own address type is then by default the public BLE address.
Thanks in advance for any answers!