forked from auracaster/bumble_mirror
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:
@@ -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)")
|
||||
|
||||
Reference in New Issue
Block a user