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

Bluetooth: hci_uart broken on master #24646

Closed
carlescufi opened this issue Apr 23, 2020 · 0 comments · Fixed by #24650
Closed

Bluetooth: hci_uart broken on master #24646

carlescufi opened this issue Apr 23, 2020 · 0 comments · Fixed by #24650
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore

Comments

@carlescufi
Copy link
Member

carlescufi commented Apr 23, 2020

Today we bisected an issue with HCI events coming from the hci_uart controller being corrupted (i.e. spurious data) to c66bb21

it happens on first connection, very easy to reproduce. Just flash hci_uart onto a Nordic board, use QEMU/native posix as Host and then start advertising on the shell, connect from any peer central to it.
It typically happens always after the first connection is established.

This is the sort of thing that you see on btmon:

> HCI Event: LE Meta Event (0x3e) plen 31                                                    #3025 [hci0] 3141.057741
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 0
        Role: Slave (0x01)
        Peer address type: Public (0x00)
        Peer address: 00:28:F8:B3:4D:08 (Intel Corporate)
        Local resolvable private address: 7E:6C:28:71:4C:C3 (Resolvable)
        Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
        Connection interval: 56.25 msec (0x002d)
        Connection latency: 0 (0x0000)
        Supervision timeout: 9600 msec (0x03c0)
        Master clock accuracy: 0x01
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2                             #3026 [hci0] 3141.065027
        Handle: 0
> HCI Event: Connect Request (0x04) plen 15                                                  #3027 [hci0] 3141.139494
        invalid packet size
        04 00 01 16 20 04 04 3e 0c 04 00 00 00 ff 00     .... ..>.......
@carlescufi carlescufi added bug The issue is a bug, or the PR is fixing a bug area: Bluetooth Regression Something, which was working, does not anymore labels Apr 23, 2020
@carlescufi carlescufi changed the title Bluetooth: hci_raw broken on master Bluetooth: hci_uart broken on master Apr 23, 2020
Vudentz added a commit to Vudentz/zephyr that referenced this issue Apr 23, 2020
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.

Fixes zephyrproject-rtos#24646

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
jhedberg pushed a commit that referenced this issue Apr 24, 2020
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.

Fixes #24646

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
sandeepbrcm pushed a commit to Broadcom/zephyr that referenced this issue Apr 30, 2020
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.

Fixes zephyrproject-rtos#24646

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Jun 20, 2020
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.

Fixes zephyrproject-rtos#24646

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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 Regression Something, which was working, does not anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants