Ability to send HCI commands from Rust

* Autogenerate packet code in Rust from PDL (packet file copied from rootcanal)
* Implement parsing of packets that have a type header
* Expose Python APIs for sending HCI commands
* Expose Python APIs for instantiating a local controller
This commit is contained in:
Gabriel White-Vega
2023-09-14 14:28:22 -04:00
parent c12dee4e76
commit 7e331c2944
16 changed files with 7041 additions and 72 deletions
+5 -2
View File
@@ -20,7 +20,8 @@
use bumble::{
adv::CommonDataType,
wrapper::{
core::AdvertisementDataUnit, device::Device, hci::AddressType, transport::Transport,
core::AdvertisementDataUnit, device::Device, hci::packets::AddressType,
transport::Transport,
},
};
use clap::Parser as _;
@@ -102,7 +103,9 @@ async fn main() -> PyResult<()> {
};
let (type_style, qualifier) = match adv.address()?.address_type()? {
AddressType::PublicIdentity | AddressType::PublicDevice => (Style::new().cyan(), ""),
AddressType::PublicIdentityAddress | AddressType::PublicDeviceAddress => {
(Style::new().cyan(), "")
}
_ => {
if addr.is_static()? {
(Style::new().green(), "(static)")