-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
nRF SDK hci_usb sample disconnects after 40 seconds with extended connection via coded PHY #29780
Comments
@kasapreyizz Can you expand on the setup, which device is master, which device is slave. Which side is the one disconnecting. If you have the full logs from both sides can you attach them as files in full (zipped) to the issue? |
Hello there @joerchan, I got an nrf52dongle programmed with hci_usb sample. The master is nrf52dongle and it establish the connections via HCI commands at host side. Here we got somethink weird, with legacy scanning and connection settings, that disconnects doesnt happen. But with extended scanning and enhanced connection it disconnects. And it disconnects every single extended device and with all initiating PHYs. So I think that the problem at master. When no data is exchanged between initiator and acceptor the disconnect reason looks 0x13 and 0x16 respectively. But when I connect them via hcitool and than a 6lowpan tcp connection is established disconnect happens and that time reason LMP / LL Response Timeout. I have logged full of HCI_USB side of my setup in original entry and my IPSP device does not have any debug option. If I attach them again, they mostly look like same. But I know that IPSP device have not any problem since an mobile device can connect it without connection lost issue (via Coded PHY) and I tried much samples to connect with my hci_usb device and all of them I got disconnected issue. Thanks in advance. |
The 0x13/0x16 I'm not so sure about.
As you can see here, it is first disconnected with reason 0x08 (timeout). And then for some reason there is a Disconnect command, and a disconnect complete event with a different reason. Can you give me an example on connecting two samples that would result in this disconnect problem? Since we don't have access to your IPSP device. |
I just tried now with peripheral_long_range sample which provided by nordic. Here is the btmon full log: Scanning device:
Connecting device and disconnect:
And I just tried that with iot tcp_client example. That produces the exact same error with mine error: For reproduce that error, in nRF SDK 15, IoT examples, TCP Client sample, changing the following lines ipv6_medium_ble.c file:
Than again btmon logs as following: Scanning:
Establishing connection:
While that device is connected commanding echo "connect 00:85:C0:06:F8:9B 1" > /sys/kernel/debug/bluetooth/6lowpan_control it connects, exchanges data (in that case, I did not connect TCP but it connects when we got a proper setup)
With all of those samples, I can reproduce the problem. |
@kasapreyizz Can you check the nRF5 SDK sample. I suspect these two events are not replied to: The should be replied to with sd_ble_gap_data_length_update and sd_ble_gap_phy_update respectively:
|
@joerchan My SDK sample replies those events but my problem is stay still. I double checked my connection parameters and they are completely same. Actually all of the nrf sdk examples produces that error. But I suspect PDU sizes. Does any minimal requirements in PDU sizes in extended scanning and enhanced connections? Or could my problem may rooted from somethink else ? I will try making enhanced connection with an Android phone and see if it's disconnects too, If I succeed in doing this. Thanks in advance. |
@kasapreyizz Ok, since this is related the nRF5 SDK samples then you should open up an issue on nordic devzone instead, and close this one. |
@joerchan If I disconnect from an Android device too via my hci_usb sample, that proves that problem is at the Zephyr / nrfsdk side actually. If it wouldn't be a problem, could this issue still open while I am testing that case ? |
@kasapreyizz as @joerchan said, you are using the SoftDevice Controller, which means this is not applicable for the Zephyr Project. Please open an issue in https://devzone.nordicsemi.com/ |
Describe the bug
hci_usb sample with following configuration always disconnects after 40 seconds.
To Reproduce
Steps to reproduce the behavior:
Connect the nrf52840-dongle flashed with following code to a linux host (my host is Rpi3 with kernel version 5.4.51-v7+
Command to make an extended connection via hcitool which is similar to: hcitool cmd 0x08 0x0043 0x00 0x01 0x00 0x00 0xSS 0xRE 0xDD 0xCA 0xMA 0x04 0x0000 0x0001 0x0000 0x0001 0x0006 0x0000 0x18 0x00 0x00 0x00 0x80 0x0C 0x00 0x00 0x00 0x0047
Expected behavior
After commanding, following btmon output is taken and client device is indicating that an connection has been established.
But after approximately 40 seconds (not exact, changes slightly every time), it's disconnects. Following btmon output is shows that.
My project supports IPSP and when I connect them to 6lowpan_core via debugfs, following logs are taken:
In case that anything wrong in my startup config, the reset btmon is shown below:
Impact
Showstopper for my project.
Environment (please complete the following information):
Any help will appreciated, thanks in advance.
The text was updated successfully, but these errors were encountered: