-
Notifications
You must be signed in to change notification settings - Fork 12
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 disconnections possibly due to coexistence #12
Comments
The NVRAM parameters are black boxes to us - we don't have descriptions of their functions or legal values - but you could try commenting out the end of
Can you also report the kernel and firmware versions you are running;
|
Hi,
I will try to disable the btc settings and see if that helps. |
More details about our setup: we are connecting to Wi-Fi using NetworkManager and rely on BlueZ via D-Bus for the Bluetooth connection. Could you maybe advise us on any tools we could use/acquire to find out what is exactly happening so that we can understand exactly why this issue is happening? btmon/hcidump are useful but only show that a disconnection happened with "Timeout" as a reason. |
btmon and friends show the entirety of the interaction with the BT modem. Looking any deeper requires an over-the-air sniffer - something even we don't have. Can you give any details of the Bluetooth setup:
|
To clarify our use case: we use the Raspberry Pi to connect to BLE barcode scanners. The scanners are sending their barcode data via BLE and the Raspberry Pi is then used to send via HID (using the usb-gadget module) or over Wi-Fi the barcode to a terminal. So, to answer your questions:
|
Understood. I think it would be helpful to post/link to a btmon capture of such a disconnection event and any contemporary traffic, if you have one. If you have one showing the entire connection lifetime that would be great, but I don't think it's vital. It would also be good to get a feel for:
|
I do not have logs to provide yet but the pattern we see is:
Worth to mention:
I cannot tell about more devices as we are only trying and seeing this issue with only one device connected. |
I think the combination of timeout and subsequent failures, coupled with a log, might be enough to send to Infineon (previously Cypress). Anything you can do to demonstrate that there's nothing wrong with the device itself (e.g. connecting in from another Pi) and that the controller is in a bad state (e.g. failing to connect to a different device) would strengthen the case. |
It seems like we just managed to reproduce it manually. I have 3 peripherals connected to the Pi. Steps to reproduce:
Bonus: The Raspberry Pi keeps failing to reconnect to those devices with 0x3e error. As soon as I disconnect from the Wi-Fi they reconnect and work again. What would be the process to share this with Infineon? |
Interesting. This sounds a lot like another problem that manifests as the Zero 2 W WiFi firmware crashing - see raspberrypi/firmware#1768. I wonder if the affected Zero 2 W's would also be experiencing Bluetooth failures but just haven't noticed? Do you think this failure mode is likely to account for the problems that you've seen, i.e. is roaming between APs likely to have occurred? We have the support relationship with Infineon, so if you gather as much information as you can and either post it here or email it to me - [email protected] - I'll open a ticket. |
If it's at all feasible to run with just a single AP and no repeater, or with separate SSIDs, then I suggest you do that to confirm that the Bluetooth failures go away when you do. |
I'll test soon with two AP with 2 different names and see but so far with only one AP the issue does not happen. With one repeater, I reproduced the issue and enabled the logging.
The disconnect happened at 15:43:04 immediately after I switched off the repeater the Pi was connected to.
Then we can see it tries to reconnect and fails with 0x3e
|
Just tried with 2 access point with 2 different name. |
Great, thanks. I'll throw that over the wall to Infineon, and in the meantime I hope you can use those findings to create a workaround. |
I could reproduce the issue on a regular Raspberry Pi 0W without any modification from our side (just to highlight that the issue is not coming from our side). Steps to reproduce
|
Just an update on my configuration that produced the issue 100% of the time so far:
Let me know if you need anything else |
I'm currently waiting for a response from Infineon. I'll update you when I hear back. |
Thank you for the reply Phil, is there any way we can be put in the loop? |
We've had the first significant response from Infineon, with their suggestion being to ensure that
A reboot is required for the change to take effect. They then went on to say:
I'm not convinced this would be relevant since it doesn't appear that you need any BLE data traffic to observe the disconnections, but to keep the dialogue going what would you say is your profile? |
Hi Phil and thank you for the answer.
Regarding the profile, we are acting as a central and there is actually no need to have a lot of traffic to see the disconnect happening. |
Do you that "we are acting as a central" is a phrase they are likely to understand? |
It's not inconceivable that their firmware does some tuning based on profiles, so as complete an answer as possible is recommended. |
Sorry, I am not sure I understand exactly what you mean by "profile". |
GATT is an acronym for the Generic ATTribute Profile, so the profile in your case is GATT. |
And the |
You are right, we're using the GATT profile to exchange data. |
Hi Phil, We just tried with |
I'll see what they say about that. |
I've finally received a substantive response, which is the suggestion to try the most recent stock firmware. To install:
To revert:
Note that the backing up of the firmware may actually be renaming a symbolic link, depending on the image you are using, but that shouldn't make any difference. |
Thanks a lot Phil, I will test this today and come back to you :-) |
I just tried the new firmware with and without |
Thanks for the quick response - I had a feeling that was going to be the case. |
There are signs somebody is starting to think about the problem, in the shape of some questions. Quoting directly:
From what you've told me my answers would be:
Is that correct? Do you have anything to add? |
Hi Phil,
That's actually great news ;-)
Actually, no. We have first noticed the disconnections at some of our customers that are using other types of Wi-Fi devices.
I will provide you as much logs as I can tomorrow.
Yes, a reconnect to a different AP works.
After the Pi disconnects from the AP, it can reconnect to the BLE device but with some difficulties. It needs multiple retries with the error
|
Hi Phil, I captured some logs during the following scenario
Please find attached the NetworkManager and btmon logs. |
More questions from Infineon:Thank you for the logs. It looks like the chip tries to reconnect to AP once it loses connection but it’s unclear if it keeps trying afterwards. Can you confirm if you continue to try connecting to the same AP? Could you keep the logs recording until chip is able to reestablish connection with the same AP? Regarding #3, is Bluetooth able to connect without issues once connection to different AP is established? For #4, is the chip able to reestablish connection to the same AP once disconnected, and if so is Bluetooth able to connect without issues once this is established? In the logs you sent us it does not show it connecting to the same AP connection again. Also some additional questions, 5.Do you have a full picture of the test setup? 6.What are settings of AP? 7.How is Extender connected to AP? 8.After initial AP/extender connection failed is it a manual step to reconnect to the 1st AP? or is it trying to auto-connect?
I feel you've answered some of these already, but I'm relaying them all for completeness and to avoid something getting misconveyed. |
Hi,
I will do that and provide the logs. I only recorded until the switch off of the AP.
We forced the BSSID in the NetworkManager configuration so that it will only connect to this particular AP that we switch off.
No, I can provide photos and videos.
DHCP is enabled, the encryption is WPA personal. I dot know about NAT.
The repeater is just copying the settings from the AP and does not have an internal DHCP server.
If we replug the repeater, the Pi will reconnect to it automatically with NetworkManager
We are testing this in an office with a lot of 2.4G noise around (BLE devices and connected to Wi-Fi 2.4 GHz).
Is there a possibility to include us in the ticket opened with Infineon? |
I've passed on those answers. For the avoidance of any doubt, can you confirm that the answer to question 3 should be Yes?
I'm not sure what you are hoping to achieve, but get yourself an Infineon login and I'll give it a try. |
Hello Phil, I work with @arthur-proglove and will jump in from time to time. I can confirm the answer to question 3 is yes. |
Arthur's email address is recognised by Infineon and he has been added as a collaborator. You will have to register with them first before I can add you. |
Mine is registered now, please try adding me again. Thanks! |
The Infineon site doesn't accept it:
|
The issue should be fixed now :) |
Better. |
A new issue (#13) has some similarities in that it covers coexistence, and there the suggestion is that setting |
We already tried this. The result was that Wifi performance was severely impacted, in that wifi connections took longer to establish. This ultimately however did not get rid of the issue as we were still able to reproduce the Bluetooth disconnections with the repeater with |
Infineon have requested that you:
|
Hi Phil, |
Hi, As a side note. We tested with a Raspberry Pi 2W and could not reproduce the issue. |
That's a very useful data point. The 43438/43430, 43436s and 43436p are sister chips, the 43436p being slightly newer. It may be possible (though unsupported, and for test purposes only) to use the 43436s firmware on a 43438/43430:
Revert with:
|
Hi Phil, I tried 5 times in a row and could not get it to disconnect on a Pi Zero W with the firmware of the Pi Zero 2W. |
That's not something I can advise you to do - it's not the intended firmware, and as such its use comes with no support or warranty - but I doubt it would cause any problems. |
Proglove people (I love prog too ;-)), did any of you try with |
Hi Phil ;-) Yes, we tried it. We set the param 51 to 0x40ff but the disconnect still happened. |
There's a new test firmware - test6 - that sets btc parameter 51 to 0x40ff: It's same as the one shared on the Infineon case, I just renamed it to fit the existing naming scheme. I'm not sharing the clm_blob because we ship a tailored one already and I'd rather test with that. |
Same thing on our side, it still disconnects :-) |
Hello,
We are experiencing BLE connectivity issues with the Raspberry Pi 0 W.
The Pi is used as a central and for no apparent reason the connection is randomly dropping between the Pi and the BLE peripheral.
What we have noticed is that this seems to happen only when a Wi-Fi connection is active which leads us to think it might be a coexistence issue between the 2 chips. Maybe the Wi-Fi part is taking the antenna too long and the Bluetooth connection times out?
Maybe we could change the NVRAM parameters but we have no idea what they are.
We have checked the power and tried with a direct USB connection to a computer or with a power supply, the issue happens in both cases.
We enabled the Bluetooth HCI and the brcmfmac modules trace logging but this did not show up any errors.
We also tried to increase the BLE connection supervisor timeout but the disconnections still happen.
Could someone please help us finding out what could be the root cause of the issue?
Thank you
The text was updated successfully, but these errors were encountered: