Skip to content
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

Attempt to fix bluetooth communication problem on rpi3b #614

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

lucagiove
Copy link
Contributor

@lucagiove lucagiove commented Mar 25, 2020

Attempt to fix bluetooth communication problem on rpi3b.
I couldn't test this pull request because of #613

This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for rpi3b models where flow control is missing:

-               $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+               $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the upstream btuart download in a PRE_PATCH_HOOK so that standard buildroot way of patching can be applied.

@homeassistant
Copy link

Hi @lucagiove,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
@lucagiove lucagiove force-pushed the btuart-reduced-baud-rate branch from da9f84c to d754140 Compare March 25, 2020 17:19
@homeassistant
Copy link

Hi @lucagiove,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@pvizeli
Copy link
Member

pvizeli commented Mar 31, 2020

I'm fine with this, it's just difficult because you were not able to test that and if we push that into next update, we could break all Bluetooth stuff

@pvizeli pvizeli added the REL-3 label Mar 31, 2020
@pvizeli pvizeli merged commit c371e45 into home-assistant:dev Mar 31, 2020
@lucagiove lucagiove deleted the btuart-reduced-baud-rate branch March 31, 2020 11:55
@lucagiove
Copy link
Contributor Author

Sure I don't want to break anything :) I'd like to test it also because I'm not sure whether I understood buildroot properly.
If you could help me out with the #613 I'd really like to build and test also for the future I might help.

Thanks

@lucagiove
Copy link
Contributor Author

I've been able to build and it's not working :( seems download doesn't work in PRE_PATCH_HOOK

pvizeli pushed a commit that referenced this pull request Apr 15, 2020
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
jens-maus added a commit to jens-maus/RaspberryMatic that referenced this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants