Skip to content

Commit

Permalink
Merge pull request #138 from iamtio/adstructure-parse-manufacturer-data
Browse files Browse the repository at this point in the history
Parse manufacturer data in AdStructure
  • Loading branch information
lulf authored Oct 12, 2024
2 parents f135396 + 75929cd commit 9482d97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion host/src/advertise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,10 @@ impl<'d> AdStructureIter<'d> {
0x08 => Ok(AdStructure::ShortenedLocalName(data)),
0x09 => Ok(AdStructure::CompleteLocalName(data)),
// 0x16 => unimplemented!(),
// 0xff => unimplemented!(),
0xff if data.len() >= 2 => Ok(AdStructure::ManufacturerSpecificData {
company_identifier: u16::from_le_bytes([data[0], data[1]]),
payload: &data[2..],
}),
ty => Ok(AdStructure::Unknown { ty, data }),
}
}
Expand Down

0 comments on commit 9482d97

Please sign in to comment.