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

OnePlus 7T & peripheral_hr on NRF52 conn failure #24722

Closed
alexandru-porosanu-nxp opened this issue Apr 27, 2020 · 8 comments
Closed

OnePlus 7T & peripheral_hr on NRF52 conn failure #24722

alexandru-porosanu-nxp opened this issue Apr 27, 2020 · 8 comments
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@alexandru-porosanu-nxp
Copy link
Collaborator

alexandru-porosanu-nxp commented Apr 27, 2020

Describe the bug
While attempting to connect a OnePlus 7T (Android 10, Build # 10.0.9.HD65AA) with a NRF52 (PCA10040) running peripheral_hr on latest head, the connection is established but no heart-rate data is being exchanged. Using the nrf sniffer, one can see that after the connection is established (packet #2382 in the attached capture), there is an exchange of Empty PDUs, but starting at #2405, the Master keeps re-transmitting the same PDU up until the connection is broken at #2617.
I think it's worthwhile to note that this happens only if 2 Mbps PHY is enabled; if the support is disabled, the connection is fine.

Edit: The default configuration for Zephyr peripheral_hr is used

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=nrf52_pca10040
  3. west flash

Open "NXP IOT toolbox" (it should be the same behavior for NRF Connect, but I haven't tested), select the Heart Rate monitor and connect to the Nordic board

Expected behavior
The heart-rate data should be visible on the phone screen, steadily increasing.

Impact
Annoyance

Screenshots or console output

*** Booting Zephyr OS build zephyr-v2.2.0-1967-g8aeb8a381480  ***
Bluetooth initialized
Advertising successfully started
Connected
[00:00:00.020,000] <inf> bt_hci_core: HW Platform: reserved (0x0000)
[00:00:00.020,000] <inf> bt_hci_core: HW Variant: unknown (0x0000)
[00:00:00.020,000] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.2 Build 99
[00:00:00.020,000] <wrn> bt_hci_core: No static addresses stored in controller
[00:00:00.170,000] <inf> bt_hci_core: Identity: ca:26:5e:18:cd:57 (random)
[00:00:00.170,000] <inf> bt_hci_core: HCI: version 5.1 (0x0a) revision 0x0000, manufacturer 0x05f1
[00:00:00.170,000] <inf> bt_hci_core: LMP: version 5.1 (0x0a) subver 0xffff
[00:00:00.690,000] <inf> hrs: HRS notifications enabled
Disconnected (reason 0x08)
Connected
[00:00:20.270,000] <inf> hrs: HRS notifications disabled
[00:00:20.690,000] <inf> hrs: HRS notifications enabled
Connected
Disconnected (reason 0x08)

Environment (please complete the following information):

  • OS: Linux, FC31
  • Toolchain: Zephyr SDK
  • Commit SHA or Version used: 8aeb8a3

Oneplus7T-Nordic-Peripheral_HR-failure.zip

@alexandru-porosanu-nxp alexandru-porosanu-nxp added the bug The issue is a bug, or the PR is fixing a bug label Apr 27, 2020
@carlescufi
Copy link
Member

@alexandru-porosanu-nxp could you please gather a sniffer trace of the connection establishment?
If you have a second board you can use the sniffer here:

https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE

@alexandru-porosanu-nxp
Copy link
Collaborator Author

@alexandru-porosanu-nxp could you please gather a sniffer trace of the connection establishment?
If you have a second board you can use the sniffer here:

https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE

I've attached a capture that has the scan req/scan rsp/conn req exchange plus the phy change, starting at packet 2382. Is there another capture I should do?

@alexandru-porosanu-nxp
Copy link
Collaborator Author

One more thing: I'm thinking that maybe this is a OnePlus/Android 10 issue, so if you have another Android based phone that also has the 2 Mbps PHY that you can test with, it'd be great to figure this out.
Also, it would be interesting to test on an Iphone as well...but again, I don't have such a device.

@joerchan
Copy link
Contributor

The sniffer sees the slave at least. But not the master. Looks like an issue with the OnePlus.
From the trace the slave sees the master.

@alexandru-porosanu-nxp
Copy link
Collaborator Author

I think that actually when switching to 2 Mbps, the master doesn't "hear" the slave anymore. I've taken a screencap of the Wireshark capture on the exact time when things go awry, and I think no 2 Mbps packet is being heard by the master. The blue dotted one is the first packet the master is sending at 2 Mbps. The next one is the slave responding (properly), and then the master re-transmits forever:

image

I found something similar described here: https://devzone.nordicsemi.com/f/nordic-q-a/44933/connection-drop-immediately-in-specific-android-models but I don't think it's the same thing as here.

As a side-note, same board with a VEGA board work just fine on 2Mbps.

@carlescufi
Copy link
Member

@alexandru-porosanu-nxp @joerchan can we close this then?

@alexandru-porosanu-nxp
Copy link
Collaborator Author

alexandru-porosanu-nxp commented Apr 28, 2020

I think so, but I'd feel a bit better if somebody can test the 2 Mbps scenario with another device (it looks as it's a OnePlus specific issue)

Edit: by device, I mean a phone, we know that it works with 2 x NRF52 as well as with a VEGA Board...

@carlescufi carlescufi self-assigned this Apr 28, 2020
@carlescufi carlescufi added the priority: low Low impact/importance bug label Apr 28, 2020
@carlescufi
Copy link
Member

Tested on master peripheral_hr with an iPhone 11, switch to 2Mbit/s works fine and notifications flow freely after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants