Navigation Menu

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

nRF52840: hci_usb timeout during initialization by bluez #10678

Closed
Eystorhaf opened this issue Oct 18, 2018 · 13 comments
Closed

nRF52840: hci_usb timeout during initialization by bluez #10678

Eystorhaf opened this issue Oct 18, 2018 · 13 comments
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@Eystorhaf
Copy link

Hey there,

encountered a problem with hci_usb sample on nrF52840,

Hardware:
USB-Devices:
nordic nRF52840 DK & laird DVK-BL654-1.0

USB-Host:
PC / x86 Ubuntu LTS 18.04 / Bluez 4.48 / Kernel 4.15.0-36-generic

Firmware:
zephyr-master @8b20f9d

While initializing the hci-device bluez gets a timeout:
[Thu Oct 18 02:36:18 2018] Bluetooth: hci0: command 0x1002 tx timeout

Here the output of:

btmon: https://pastebin.com/ypNTmTgC
journalct -f | grep bluetoothd* :https://pastebin.com/PT4V6Dpf
dmesg -T: https://pastebin.com/VQQ0tf1x
zephyr uart debug console: https://pastebin.com/v14JUCux

Wondering whether this is a usb or hci stack problem?

Best,

@nashif nashif added bug The issue is a bug, or the PR is fixing a bug area: Bluetooth labels Oct 18, 2018
@nashif nashif added the priority: medium Medium impact/importance bug label Oct 18, 2018
@jhedberg
Copy link
Member

I don't know why the controller would not respond to Read Local Supported Commands. It's something that's used even as part of a combined build HCI initialization.

@jhedberg
Copy link
Member

jhedberg commented Oct 18, 2018

The only special thing I can think of regarding HCI_Read_Local_Supported_Commands is that its return parameters (as part of the Command Complete event) are probably some of the longest of any HCI command. Perhaps that could be an issue here (possibly with the way the HCI transport is implemented).

@uhrheber
Copy link

I'm getting the same error, both on pca10056 and pca10059.
Mint 19, kernel 4.15.0-36-generic, bluez 5.48.
The same thing happens on an older Mint 18.

@cvinayak
Copy link
Contributor

cvinayak commented Oct 19, 2018

@jhedberg @uhrheber I just now built the hci_usb sample, and it works out-of-the-box as a btusb device on my archlinux (on my virtualbox) when flashed on my nRF52840 DK. sorry, mine worked as I was on a branch that still used the usb_dc_nrf5.c and not the now usb_dc_nrfx.c implementation.

@pawelzadrozniak
Copy link
Collaborator

The device does not enumerate on Windows. Looks like HCI ACL packet is interpreted incorrectly:
https://pastebin.com/0BUYatVF
Error in hci.c (added length logging):
if (buf->len < len) { BT_ERR("Invalid HCI ACL packet length, %d < %d -", buf->len, len); return -EINVAL; }

17218 equals 0x4342 - see the attached USB log:
hciusb_e1

@cvinayak
Copy link
Contributor

@pawelzadrozniak I am suspecting a regression in 68cb7b3

@pawelzadrozniak
Copy link
Collaborator

pawelzadrozniak commented Oct 19, 2018

Looks like Windows 7 does not support this type of device.
The device enumerates in Linux, however I am getting bus fault BT thread:
https://pastebin.com/ffugF07U

Ubuntu 18.04, bluez 5.48.

@finikorg
Copy link
Collaborator

Looks like Windows 7 does not support this type of device.
The device enumerates in Linux, however I am getting bus fault BT thread:
https://pastebin.com/ffugF07U

I suggest to create separate issue about Windows support, that never worked for me also (I haven't tested much), probably we need to add some special tweaks...

@henrikbrixandersen
Copy link
Member

I can confirm this issue. I tried reverting 68cb7b3 and related commits - that works.

@uhrheber
Copy link

henrikbrixandersen, I'm not familiar with git (yet). How do I do that?

@pawelzadrozniak
Copy link
Collaborator

Timeout issue fixed in #10934 .

@henrikbrixandersen
Copy link
Member

I can confirm that the timeout issue was fixed in #10934. Can this issue be closed?

@cvinayak
Copy link
Contributor

Fixed by #10934

Thank you @henrikbrixandersen

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: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

9 participants