leaps_mac_addr_get
Get the MAC address list. Device uses either address specified by the user or the default address. The default MAC address for each interface can be changed only once by calling leaps_mac_addr_set_once in which case it is written to OTP memory and becomes a new default MAC address. The user can set a custom MAC address by calling leaps_mac_addr_set. The default MAC address can be recovered by factory reset (see leaps_factory_reset) after being modified by the user. Mapping of the MAC addresses to the particular interface is based on the order in the list as follows:
UWB
BL
Ethernet
Wi-Fi
The BLE address can be Random BLE address or Public BLE address. If a particular interface is not supported, the corresponding MAC address in the list is empty.
(none)
type_0, type_1, type_2, type_3: ? 8-bit unsigned integer ? (type describing the MAC address nr. 0,1,2,3 in the list)
mac_addr_0, mac_addr_1, mac_addr_2, mac_addr_3: ? 48-bit value ? (MAC address nr. 0,1,2,3 in little endian)
SPI/UART example
TLV Request |
|
---|---|
Type |
Length |
0x83 |
0x00 |
Type 0x83 (131 dec) means command leaps_mac_addr_get
TLV response |
|||||
---|---|---|---|---|---|
Type |
Length |
Value |
Type |
Length |
Value |
(byte 0-4) flags of the MAC address list in little endian
(byte 5-10) MAC address 0 in little endian
(byte 11-16) MAC address 1 in little endian
(byte 17-22) MAC address 2 in little endian
(byte 23-28) MAC address 3 in little endian
|
|||||
0x40 |
0x01 |
0x00 |
0x41 |
0x0D |
… |
Type 0x40 means err_code of the previous command
Type 0xC1(193 dec) means MAC address list
MAC address flags encoding
flags of the MAC address list |
||||||||
---|---|---|---|---|---|---|---|---|
byte 0 |
byte 1 |
byte 2 |
byte 3 |
|||||
bits 2-7 |
bits 0-1 |
bits 11-15 |
bits 10 |
bits 8-9 |
bits 18-23 |
bits 16-17 |
bits 26-31 |
bits 24-25 |
Reserved |
T_0 |
Reserved |
P_1 |
T_1 |
Reserved |
T_2 |
Reserved |
T_3 |
T_0, T_1, T_2, T_3 describe the MAC address type.
0 - Empty MAC address
1 - Default MAC address from OTP memory.
2 - User specified MAC address
3 - Mutable default MAC address which can be rewritten only once using leaps_mac_addr_set_once.
P_1 is set if the BLE address is the Public BLE address. The flag is cleared if the BLE MAC address is random, refer to BLE specification for more information on BLE address types.