micropython / micropython/micropython-lib
The order of bt_addr passed up in the ScanResult
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 3
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the aioble address conversion shown in the issue and trace how the value reaches ScanResult.device.addr. Compare the documented and returned forms for the example address, then make the byte-order contract explicit so users can tell which representation is expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100