feat: allow MAC spoofing in Bluetooth stack, show paired devices in Bluetooth app
This commit is contained in:
1 parent
2bcc19f0fc
commit
b6ac5ac994
13 files changed
+700
-44
No files matched your search
@@ -34,6 +34,16 @@ namespace Drivers::USB::Bluetooth {
|
||||
// Get Bluetooth device address (6 bytes)
|
||||
const uint8_t* GetBdAddr();
|
||||
|
||||
// Change the adapter's BD_ADDR at runtime. Drops any active links (their
|
||||
// pairing/crypto was bound to the old address), issues the Intel vendor
|
||||
// write (0xFC31), re-reads the controller's address into the cache and
|
||||
// re-asserts scan. Returns true only if the controller reports the new
|
||||
// address. Persisting the choice to 0:/config/bluetooth.toml is the
|
||||
// caller's job (userspace); the override is re-applied on boot by
|
||||
// ApplyConfiguredAddress() during init. Bytes are in the same order as
|
||||
// GetBdAddr()/ReadBdAddr (addr[0] = least-significant octet).
|
||||
bool SetAddress(const uint8_t* addr);
|
||||
|
||||
// Scan for nearby devices (blocking, up to timeoutMs)
|
||||
// Returns number of devices found; results written to buf
|
||||
int Scan(Hci::InquiryDevice* buf, int maxCount, uint32_t timeoutMs);
|
||||
@@ -50,4 +60,12 @@ namespace Drivers::USB::Bluetooth {
|
||||
// Returns number of connected devices; info written to buf
|
||||
int ListConnected(Hci::ConnectionInfo* buf, int maxCount);
|
||||
|
||||
// List bonded (paired) devices from the persisted link-key store.
|
||||
// Returns number written to buf (paired devices may be disconnected).
|
||||
int ListBonded(Hci::BondInfo* buf, int maxCount);
|
||||
|
||||
// Forget a paired device: drop the link if connected and remove the bond
|
||||
// (so it must re-pair next time). Returns 0 on success, -1 if not bonded.
|
||||
int ForgetDevice(const uint8_t* bdAddr);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user