diff --git a/host/Cargo.toml b/host/Cargo.toml index 3dde956..70c0085 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -23,6 +23,7 @@ embassy-time = "0.3" embassy-futures = "0.1" futures = { version = "0.3", default-features = false } heapless = "0.8" +byteorder = { version = "1", default-features = false } # Logging log = { version = "0.4.16", optional = true } diff --git a/host/src/advertise.rs b/host/src/advertise.rs index 4b083e1..9e316b1 100644 --- a/host/src/advertise.rs +++ b/host/src/advertise.rs @@ -1,6 +1,7 @@ //! Advertisement config. use bt_hci::param::AdvEventProps; pub use bt_hci::param::{AdvChannelMap, AdvFilterPolicy, AdvHandle, AdvSet, PhyKind}; +use byteorder::{ByteOrder, LittleEndian}; use embassy_time::Duration; use crate::cursor::{ReadCursor, WriteCursor}; @@ -484,7 +485,10 @@ impl<'d> AdStructureIter<'d> { 0x08 => Ok(AdStructure::ShortenedLocalName(data)), 0x09 => Ok(AdStructure::CompleteLocalName(data)), // 0x16 => unimplemented!(), - // 0xff => unimplemented!(), + 0xff => Ok(AdStructure::ManufacturerSpecificData { + company_identifier: LittleEndian::read_u16(&data[..2]), + payload: &data[2..], + }), ty => Ok(AdStructure::Unknown { ty, data }), } }