Clarified mac address code so that it will be clearer what it contains (static device mac).
This commit is contained in:
parent
100f4046fa
commit
e45bb43b84
2 changed files with 8 additions and 3 deletions
|
|
@ -38,5 +38,5 @@ with ConnectHelper.session_with_chosen_probe() as session:
|
|||
target.resume()
|
||||
|
||||
mac_converter = MacAddressReader(target)
|
||||
mac_address = mac_converter.get_mac_address()
|
||||
print(f'Device MAC Address: {mac_address}')
|
||||
mac_address = mac_converter.get_static_mac_address()
|
||||
print(f'Static manufacturer MAC address: {mac_address}')
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ class MacAddressReader():
|
|||
def __init__(self, target: Target) -> None:
|
||||
self.target = target
|
||||
|
||||
def get_mac_address(self) -> str:
|
||||
def get_static_mac_address(self) -> str:
|
||||
'''
|
||||
Reads the static mac address assigned by the manufacturer.
|
||||
|
||||
This chip property is readonly and may be different from the mac address in the application code.
|
||||
'''
|
||||
memory_blocks = self._get_blocks()
|
||||
|
||||
return self._convert_blocks(memory_blocks)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue