Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The order of bt_addr passed up in the ScanResult #884

Open
brianreinhold opened this issue Jun 14, 2024 · 1 comment
Open

The order of bt_addr passed up in the ScanResult #884

brianreinhold opened this issue Jun 14, 2024 · 1 comment

Comments

@brianreinhold
Copy link

In the aioble code there is a line like this:

self.addr: bytes = addr if len(addr) == 6 else binascii.unhexlify(addr.replace(":", ""))

The unhexify part with the colons suggests the bt address is passed up to the application in big endian. You don't see BT addresses expressed in little endian with colons.

The normal way one would write the BT address on a device is ae:f4:27:9F:d2:ee. In BLE this would be transmitted as ee d2 9f 27 f4 ae.

It's not clear what I get in ScanResult.device.addr

is it ee d2 9f 27 f4 ae or ae f4 27 9F d2 ee?

@AgentSonji
Copy link

From what I am seeing it appears that you get back ae f4 27 9F d2 ee from entering ae:f4:27:9F:d2:ee. I don't see anywhere where the address gets packed into big endian. Although I admit my ignorance as to the fine details of the bluetooth module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants