Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Resin 2.9.7+rev1 problems with bluetooth on RPI 3 #447

Closed
fermuch opened this issue Feb 18, 2018 · 8 comments
Closed

Resin 2.9.7+rev1 problems with bluetooth on RPI 3 #447

fermuch opened this issue Feb 18, 2018 · 8 comments

Comments

@fermuch
Copy link

fermuch commented Feb 18, 2018

Hello! I had an app working on resin 2.7.8+rev1, and when I upgraded to 2.9.7+rev1 I couldn't start bluetooth anymore.
I tested reflashing another card with the older ResinOS, and it works as expected.

You can test bluetooth not working anymore on the demo repo: https://github.com/resin-io-projects/rpi3-bluetooth

Expected output from hciattach (2.7.8+rev1):

Attaching hci0...
bcm43xx_init
Flash firmware /lib/firmware/brcm/BCM43430A1.hcd
Set Controller UART speed to 921600 bit/s
Device setup complete

Actual output with 2.9.7+rev1:

Preparing bluetooth...
bcm43xx_init
Failed to write reset command
Can't initialize device: Success
First try failed. Let's try again...
bcm43xx_init
Failed to write reset command
Can't initialize device: Success

This output comes from the same Pi, but I already tested with others and found the same bug.

@floion
Copy link

floion commented Feb 19, 2018

Hi. Thank you for the report.
Can you try with this app instead? https://github.com/resin-io-playground/test-bluetooth

@fermuch
Copy link
Author

fermuch commented Feb 19, 2018

Hello @floion, thanks for answering.

This is the output for 2.9.7+rev1:

19.02.18 09:50:29 (-0300) /sbin/udevd
19.02.18 09:50:29 (-0300) Testing bluetooth. Make sure you have a bluetooth device enabled and visible.
19.02.18 09:50:29 (-0300) Devices:
19.02.18 09:50:29 (-0300)       hci0    B8:27:EB:CA:06:10
19.02.18 09:50:29 (-0300) Scan for nearby blueooth devices...
19.02.18 09:50:40 (-0300) Test finished. App configured to not exit. Restart the app if you want to retest.
19.02.18 09:50:40 (-0300) TEST FAILED

And for 2.7.8+rev1:

19.02.18 10:02:41 (-0300) /sbin/udevd
19.02.18 10:02:41 (-0300) Testing bluetooth. Make sure you have a bluetooth device enabled and visible.
19.02.18 10:02:41 (-0300) Devices:
19.02.18 10:02:41 (-0300) Scan for nearby blueooth devices...
19.02.18 10:02:41 (-0300) Device is not available: No such device
19.02.18 10:02:41 (-0300) Test finished. App configured to not exit. Restart the app if you want to retest.
19.02.18 10:02:41 (-0300) TEST FAILED

It seems as if 2.9.7 loads bluetooth by default. Is that correct?

@floion
Copy link

floion commented Feb 19, 2018

Yes, 2.9.7 starts bluetooth from the host OS, so no need to do it anymore from the container.
So when you ran this new application, did you have a visible bluetooth device around and the test still failed?

@fermuch
Copy link
Author

fermuch commented Feb 19, 2018

By new application, you mean test-bluetooth or the one I'm building?

test-bluetooth failed both times, and I am unsure why. With the newer version, it detects the device, and with the older it doesn't. I'm unsure what it is checking, though, so I'm unsure why it is failing.


On my app, if bluetooth is auto-started, then I don't need to call hciattach anymore, otherwise it'll always fail. I'll fork the app to test without the hciattach part, but I don't have the hardware with me so I can't run the full project and confirm it is working.

Is there some page where I can see the breaking changes of each release? This passed completly out of my radar.

@floion
Copy link

floion commented Feb 19, 2018

By new app I mean: https://github.com/resin-io-playground/test-bluetooth

It checks for an visible bluetooth device in the range. It's just a simple device scan

@floion
Copy link

floion commented Feb 19, 2018

There's the CHANGELOG which contains there entries: https://github.com/resin-os/resin-raspberrypi/blob/master/CHANGELOG.md#2018-01-10-1

@fermuch
Copy link
Author

fermuch commented Feb 19, 2018

It checks for an visible bluetooth device in the range. It's just a simple device scan

Ah! Got it! I didn't have any bluetooth device in range, but the bluetooth was initiated okay, so everything is O.K.
I'll close the issue, and if I find a bug starting bluetooth after applying the changes to my project I'll reopen.

Thank you so much!

@fermuch fermuch closed this as completed Feb 19, 2018
@floion
Copy link

floion commented Feb 19, 2018

You are welcome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants