Our project uses a Raspberry Pi compute module 3 connected via UART to 2 nRF51822. I'll go through what is working and than describe the issues I'm having
What's going on without issues:
btattach -B /dev/ttyAMA0 -S 115200 -P h4
btmgmt --index 0
Static address successfully set
LE Device Address: FF:22:33:44:55:FF
systemctl status bluetooth
The BD address is always 00:00:00:00:00 and this seems to have implications on tools like bluetoothctland others.
I'm basically trying every tool every command line I can find on Google (e.g. this link) to set the address and there's always errors.
BD Address: 00:00:00:00:00:00
Manufacturer: internal use (65535). Device address: 00:00:00:00:00:00 (XEROX CORPORATION)
bdaddr -i hci0 FF:22:33:44:55:FF
No default controller available
Controller 0 not available
As per "Raju" on the comments section of the nRF5x support within the Zephyr Project RTOS blog post it seems that it seems that there's some issue on mapping the address on Zephyr, but I'm not sure if that is my issue or something unrelated.
I've tried to find on the source code of Zephyr anything related to the bd address, how to set it, or how to change it, and I couldn't find anything. If needed I can recompile it with extras flags, or include some params, extra protocol. But I'm really running out of options here.
Any help will be deeply appreciated.
Hi, thanks for pointing it out the direction of the code. But the issue here is the public address. It's always zero on the linux host which causes issues. We do have a address space from IEEE. How can…
Please address your questions to the Zephyr support team. They can be reached for technical questions, through the mailing lists or IRC channels for prompt assistance.
Thanks, Nordic employees help follow up the requests in Zephyr support portals, see Carles' answer in this thread.
Hi Nordic support, community,
Successfully I have deployed Zephyr / hci_uart on the nRF52 DK for testing out the BLE Controller.
When doing my first test with a simple Qt C++ application implementing a Hart Rate Server peripheral applic (running on Linux Ubuntu 18), the execution stops as no valid hci device can be found. At least the applic can not start advertising.
I noticed that the QT BLE controller object tries to identify the hci controller based on a random BD address (in my case CB:49:DD:88:61:62). But the local address detected for the hci device is the ZERO address 00:00:00:00:00:00.
BTW everytime I reset (power) the nRF board this "BD random address" remains the same which I find strange.
When I execute the command: bluetoothctl I get this:
However when I run the hcitool dev command I see this:
So this mismatch between hcitool and bluetoothctl I find already strange.
The next step is trying to set a public or static address.
First I tried to do this with the btmgmt command.
Before doing this I asked the info:
So once more confirmation that the BD address is the ZERO address.
Trying to set static and public address:
However the bluetoothctl still shows as address CB:49:DD:88:61:62
And hcitool dev shows the ZERO address.
Hummm.... further research lead to using the hcitool cmd for setting the BD_ADDRESS and using Zephyr HCI specific codes.
hcitool cmd 0x3f 0x006 0x1 0x2 0x0 0x0 0x21 0xAD
Result is now:
So finally some result... and also the C++ peripheral HR server applic works correctly once it could address the right hci device based on this address.The applic starts to advertise and it can be accessed (connected) for reading out the HR via the nRFConnect smartphone app.
But when setting this address it is volatile, so after power cycling the ZERO address is back and bluetoothctl shows a random address that is always the same....
Can this be explained?
Thanks in advance,
Okido, done, the topic is set as :lists.zephyrproject.org/.../5364
Nevertheless I think it is interesting for the Nordic community to follow this up, I think using Nordic HW and the Zephyr RTOS to implement a BLE Controller might be very interesting for a lot of people seeking solutions for BLE applications/products.
Have a nice weekend,