Skip to content

Conversation

@shchen-Lab
Copy link
Contributor

@shchen-Lab shchen-Lab commented Jan 5, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Updated Bluetooth driver to properly handle ISO (Isochronous) data transmission, replacing previous protocol handling for improved wireless connectivity support.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

A case label in the USB Bluetooth HCI receive function was modified from USB_BLUETOOTH_HCI_SCO to USB_BLUETOOTH_HCI_ISO, with the handler function remaining unchanged. No control flow or error handling modifications were introduced.

Changes

Cohort / File(s) Summary
BLE HCI USB Handler
third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c
Case label changed from SCO to ISO in usbh_hci_host_rcv_pkt; reception function call preserved

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 From SCO to ISO, a small hop we take,
The case label shifts for protocol's sake,
Same steady handler, but new path ahead,
Modern Bluetooth flows where old signals fled! 🎵

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: correcting an HCI packet type from SCO to ISO in the USB Bluetooth host implementation.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c:
- Around line 220-222: The USB_BLUETOOTH_HCI_ISO packets are not routed to the
ISO receive path; update the switch handling for USB_BLUETOOTH_HCI_ISO to call
usbh_bt_iso_recv(data, remaining) so incoming ISO packets follow the same ISO
path as outgoing BT_BUF_ISO_OUT (align receive/send behavior). Locate the switch
that handles USB packet types (case USB_BLUETOOTH_HCI_ISO) and replace the old
SCO or incorrect handler with a call to usbh_bt_iso_recv, ensuring the break
remains after the call.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d501596 and 95e11c5.

📒 Files selected for processing (3)
  • common/usb_def.h
  • docs/source/demo/usbd_winusb.rst
  • third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c
🔇 Additional comments (5)
docs/source/demo/usbd_winusb.rst (4)

4-5: LGTM! Clear explanation of WinUSB and version requirements.

The updated description clarifies that WinUSB is essentially CDC ACM without baud rate commands, and importantly notes that V2 requires USB 2.1 in the device descriptor. This is critical information for developers implementing WinUSB support.


7-7: LGTM! Important troubleshooting guidance.

This note provides valuable troubleshooting information about registry cleanup when descriptor changes cause enumeration issues. The specific registry path (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags) is helpful for developers debugging Windows enumeration problems.


13-41: LGTM! Improved documentation structure with explicit examples.

The new structure clearly distinguishes V1 and V2 descriptor registration approaches with:

  1. Complete struct initialization examples showing all required callbacks
  2. Alternative registration using individual API calls

This makes it much easier for developers to understand the differences between V1 and V2 implementations.


55-55: LGTM! Concise and appropriate simplification.

The simplified note appropriately references CDC ACM for read/write operations rather than repeating the same information, improving documentation maintainability.

common/usb_def.h (1)

739-750: The MSOS 1.0 string descriptor signature is correct.

The signature "MSFT100" matches the official Microsoft OS 1.0 String Descriptor specification. The macro correctly encodes this as UTF-16LE characters ('M', 0, 'S', 0, 'F', 0, 'T', 0, '1', 0, '0', 0, '0', 0), and the total descriptor length of 0x12 (18 bytes) is correct.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c (1)

220-222: LGTM! ISO packet routing is now correctly aligned.

The case label change from USB_BLUETOOTH_HCI_SCO to USB_BLUETOOTH_HCI_ISO properly routes ISO packets to the appropriate handler, ensuring receive and send paths are consistent (matching line 267 in the send path).

🧹 Nitpick comments (1)
third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c (1)

183-187: Clarify the commented-out payload length validation.

The ISO receive function has payload length validation commented out, unlike the ACL receive function (line 141) which actively validates payload length. Consider documenting why this validation is disabled for ISO packets or re-enabling it if appropriate.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95e11c5 and 0e51e3c.

📒 Files selected for processing (1)
  • third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c

@sakumisu sakumisu merged commit 9cbe450 into cherry-embedded:master Jan 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants