Skip to content

More Bluetooth 5.0+ packets#4905

Draft
sacca97 wants to merge 11 commits intosecdev:masterfrom
sacca97:master
Draft

More Bluetooth 5.0+ packets#4905
sacca97 wants to merge 11 commits intosecdev:masterfrom
sacca97:master

Conversation

@sacca97
Copy link

@sacca97 sacca97 commented Feb 3, 2026

Currently draft, what is missing:

  • unit tests (WIP)
  • regression tests
  • Not sure formatting is fine (although it respects the guidelines)

Introduces various stuff from Bluetooth 5.0+ plus some standardized field naming across packets for clarity and interoperability. Additionally covers an edge case in the HCI command handling.

I am currently using this code for testing actual BLE devices and """it works""". I'll add tests (and modify existing ones) asap, please advice if I may skip some tests as not everything may be necessary.

What was added:

  • HCI_LE_Meta_Enhanced_Connection_Complete
  • HCI_Cmd_LE_Set_Extended_Advertising_Parameters
  • HCI_Cmd_LE_Set_Extended_Advertising_Data
  • HCI_Cmd_LE_Set_Advertising_Set_Random_Address
  • HCI_Cmd_LE_Set_Extended_Scan_Parameters
  • HCI_Cmd_LE_Set_Extended_Scan_Enable
  • HCI_Cmd_LE_Extended_Create_Connection
  • HCI_Cmd_LE_Set_Event_Mask (update 8-byte bitmask)

What was modified:

  • atype / oatype / datype --> own_addr_type, peer_addr_type, or addr_type.
  • address / paddr / daddr --> addr or peer_addr
  • HCI receive now checks r.code in (0x0e, 0x0f) to cope with commands such as "Create Connection" which is async and returns a "Pending" status.

@polydroi
Copy link

polydroi commented Feb 4, 2026

Thanks for your pr. could you please revert all changes introduced from your code formatter.

@sacca97
Copy link
Author

sacca97 commented Feb 4, 2026

@polydroi sorry for that, should be good now

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