-
Notifications
You must be signed in to change notification settings - Fork 76
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
Duplicate HCI Reset When Tearing Down and Re-Creating Transport #476
Comments
This also works:
|
Changing
I can workaround with this for the time being. |
This is quite odd. I tried to replicate this on a USB controller, without success (i.e this exact code sequence works fine for me). What's peculiar in your case is that the controller seems to be sending a stale or extra response, so the |
Followup: I did find a USB dongle that identifies with the same USB identifiers ( |
I've seen this with a lot of dongles. I use a I think the CSR we have hooked up to the Linux machine is this one from Adafruit, but I'm honestly not sure. It has no markings whatsoever besides Edit: I will double-check to see what the product name is that it reports. |
The name it reports is |
Found another one that is in use: https://www.amazon.com/dp/B084H8R9PB |
I'm seeing a different issue with this BLE 5 dongle on Linux: Edimax (Amazon Link)
This is after tearing down and re-creating the transport, similar to above. Seems to stall in
|
I think this controller has a Realtek chip. It may work without firmware loading, but I'd recommend trying to download the Realtek firmware for it, and putting it in a place where the Bumble library can find it and load it (see https://google.github.io/bumble/drivers/realtek.html ). One thing that I've noticed with Realtek-based dongles (as well as others), is that they're not happy when you close the USB connection to them without a reset. But it seems that in your case you are performing a reset before closing, can you confirm? I will get one of those dongles from Amazon and try on my side. |
I downloaded the drivers from here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_bt/, and pointed by
But still fails in a similar fashion (using the Edimax):
|
I did some more debugging, and found that sometimes the result of the HCI reset is something like this:
Where the
|
I managed to capture two of the packets I saw after an HCI reset command:
|
Closing as this is resolved with |
Summary
I am seeing a weird issue where if I tear down a transport, then re-create it, that the device fails to power on. The following example reproduces it. When the second
power_on()
is invoked, an error is raised (given below), and the attempt fails.Error
Workaround
I found that adding a second HCI reset command here led to the failure going away: https://github.com/google/bumble/blob/main/bumble/host.py#L239
Without the second invocation, it always fails. I also found that adding a sleep seems to workaround the issue as well:
Environment
0a12:0001
)The text was updated successfully, but these errors were encountered: