area: link layerhelp wantedstatus: needs codetype: enhancement
描述
This is needed if the device wants to initiate a connection (by sending a connection request PDU), it is not needed if the device is just a peripheral that accepts a connection. It is specified in Part B 2.1.2 of Bluetooth Core v4.2.
Depends on #2.
Things that need to be done:
- Create a
struct AccessAddress(u32);newtype - Replace current uses of
u32for access addresses with the new type- The current
advertising::ACCESS_ADDRESSconstant can be replaced by an associated constAccessAddress::ADVERTISING
- The current
- Implement
Debugby hand and print the hex representation of the address - Implement a
is_validmethod that checks the requirements in the specification (also implement a lot of unit tests for this) - Implement a
randomconstructor method that uses arand_core::RngCoreimplementor to generate a randomAccessAddressthat adheres to the specified requirements