-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth LE on a Pi3 running Raspbian - How to get it working #30
Comments
Using I've found a there is a DBus ACL difference between the Feb'16 and May'16 Raspbian releases. To add the ACL setting back create a file called --- bluetooth.conf 2016-05-26 06:58:37.013356724 +0000
+++ bluetooth_addgroup.conf 2016-05-26 06:58:59.884183163 +0000
@@ -24,6 +24,11 @@
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
+ <!-- allow users of bluetooth group to communicate -->
+ <policy group="bluetooth">
+ <allow send_destination="org.bluez"/>
+ </policy>
+
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy> Apply the patch
Add the current user (e.g. pi) to the
|
This appears to have been fixed with the combination of: And was tested along with BlueZ 5.42 |
After a reboot the problem seems to be back so I'm re-opening the issue
There is some noise up above as to exactly what steps are needed so I'll summarising the steps I took to clear the issue:
|
Anyone know if this issue has been resolved? I'm going to try the steps above with my Pi3 and report back. |
@bryanmcgrane I believe that there is no plan to send this patch upstream to BlueZ. This means that if you update BlueZ on a RPi3 then you will need to make sure you apply the patch. I believe that @pelwell knows that his gist is being used and has no plans to remove it. |
I was actually able to get everything running with a few modified steps. I submitted the question on Stack Overflow and answered my own question. I was able to use Bluez v5.43. |
@bryanmcgrane your instructions on Stack Overflow seem very similar to ones at: It would be interesting to know if the I'd also be interested to see what the address of the Controller is reported as when your run |
Yes my process is very similar, but I ended up having to omit the configuration and make options. bluetoothctl can't find a default adapter for me. I can check my BT address using hciconfig however which shows
|
Although we added the 3wire option, we aren't using it because we found the bcm43xx H5 support to be unreliable. |
Thanks for the reply @pelwell . However this has confused me because using an updated BlueZ version doesn't work without the patch. Do you understand why this might be? |
Another function of the patches is to upload the firmware at a low baud rate to make it reliable in the absence of flow control - I think that is why you need at least one of them. |
Just adding a note here that there is an active discussion going on about the AA:AA:.. address issue over on the BlueZ developer mailing list: |
Closing this as I think the issue has been resolved with newer versions of BlueZ |
Prior to the May'16 Raspbian release with the 4.4 Kernel (which needs the steps below applied) my last 'known good' versions were:
https://downloads.raspberrypi.org/raspbian/images/raspbian-2016-02-29/2016-02-26-raspbian-jessie.zip
sudo rpi-update 692dde0c1586f7310301379a502b9680d0c104fd
BlueZ: 5.39
To get the GATT advertising working on the latest Raspian I had to make a few tweaks involving:
sudo
(which I didn't think was necessary before)Note: This will let the example work and 'hciconfig' shows a 'real' MAC address as opposed to an address of
AA:AA:AA:AA:AA
,which is a symptom of the hciattach issue. However, runningshow
inbluetootctrl
showsNo default controller available
- so something is still not quite right.Patch BlueZ source
Obtain the BlueZ source, I've tested with 5.39.
You should see:
Then configure, compile and install BlueZ as per the
bluezero
instructions found hereconfig.txt
For reference, this is my entire
/boot/config.txt
which includes some commented out lines tried whilst investigating, things worked better without them in the end.The text was updated successfully, but these errors were encountered: