-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Compatibility problem with increased BLE Tx buffers #10517
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
Comments
I did some more debugging and playing with different systems. I can find that this compatibility issue occurs mostly in systems with Intel Wireless Bluetooth drivers. My Windows Machine as well as my Ubuntu machine (separate) has Intel Bluetooth Chipsets. At the same time this Tx buffer changes did not affect Android as well as CSL chipset (Dongle) used on Ubuntu. |
Can you use btmon to collect the HCI trace on Ubuntu? There could be a problem in the HID layer as well but lets first check the data is not corrupted for some reason. |
@Vudentz Thanks for the reply. I have attached btmon trace i collected for this issue using nRF52832 dev kit and Ubuntu laptop. In my sample application,
In the trace we can observe that on second time i try to send data, characters are abruptly stopped receiving on the host side and disconnects after sometime. on the Zephyr side i notice these warning for the remaining characters not sent:
Note: I updated my btmon trace with option -w to see in wireshark |
From the last email on the mailing list thread:
Those disconnection reasons are usually not something that the host can do anything about (except perhaps changing the connection parameters). @dhananjaygj are you still seeing this with the latest master branch? Adding @cvinayak since this could be something controller related as well (though everything seems to indicate a fairly buggy windows side) |
@jhedberg last I checked with zephyr 1.13 and I still sae those errors. While debugging more we saw that this issue seems to be more specific to the BLE chipset used in that laptop. I saw this error in both windows 10 and Ubuntu os installed in that laptop. When too much data is sent within a connection interval, the Intel 3165 controller (used in Lenovo e480 laptop) seems to be NACKing forever after some point. This happens mostly when data is queued at the edge of connection interval. Laptops with more recent Intel chipsets don't seem to have this problem. As a workaround for compatibility we control the rate of data generation. |
@dhananjaygj Shall we close this one, it doesn't seem this is a problem at our end. |
@Vudentz Yes we can close this until i find some new information. 👍 |
Issue:
There is a compatibility problem with windows machines when Tx Buffers and pending Tx Buffers are increased to 3.
Background:
This issue was initially discussed here under zephyr developers list.
https://lists.zephyrproject.org/g/devel/topic/25802151?p=Created,,,20,1,0,0
Last update to this discussion is to provide the sniffer log for my problem. I tried to sniff the BLE packets using nRF52840 development kit as sniffer but unfortunately the packets were not logged reliably. Sometimes i was only able to see the advertisement packets but no connection packets afterwards. So instead i created a minimal HID keyboard application to reproduce my issue in a dev kit.
This application is implemented using zephyr's HID sample as reference but with necessary changes for keyboard. The HID report map used is same as the one used in nRF SDK examples. Once extracted kindly place the project inside zephyr/samples/bluetooth/ (the same location where current peripheral_hids sample is present). This is because of locations of Battery and Device information services. I disabled the BT_SETTINGS to connect to different host devices without much hassle of forgetting device keys but this doesn't matter.
I tested my sample application using nRF52840 pca10056 Dev Kit. Once connected the application sends characters 'a-z, 0-9' every 3 seconds. The factor to be noted is the Tx Buffer changes in prj.conf. With default buffer settings (i.e. 2) and there is no problem and am able to receive HID data properly in both Android and Windows 10. But when the Tx Buffer is increased to 3, i am able to receive data in Android properly but not on Windows. In Windows machine, characters are not received properly sometimes same character is printed in windows for long time as explained in my above post.
Sample Application:
peripheral_hids_keyboard.tar.gz
The text was updated successfully, but these errors were encountered: