Add another possible mac range (#2)
This commit is contained in:
parent
081d2fd617
commit
c9d465c644
@ -83,7 +83,7 @@ This printer uses Bluetooth LE (GATT) to send labels & retrieve its status. It d
|
||||
|
||||
`2b3d` part in the UUID may not be future-proof, but so far all produced printers of the same model seems to share the same UUID.
|
||||
|
||||
To discover the nearby printers, filter for the service UUID or/and check for the MAC address range. This printer has a MAC address in range of `58:CF:79:00:00:00` and `58:CF:79:FF:FF:FF`, which this MAC range block seems to be owned by Espressif Inc. according to Bluetooth vendor list.
|
||||
To discover the nearby printers, filter for the service UUID or/and check for the MAC address range. This printer has a MAC address in range of `58:CF:79:00:00:00` and `58:CF:79:FF:FF:FF` or `DC:54:75:00:00:00` and `DC:54:75:FF:FF:FF`, which these MAC ranges block seems to be owned by Espressif Inc. according to Bluetooth vendor list.
|
||||
|
||||
All data structures are explained below so it can be used as a future reference.
|
||||
|
||||
|
@ -48,6 +48,11 @@ def is_espressif(mac : str):
|
||||
start_block = 0x58_CF_79 << 24
|
||||
end_block = start_block + (1 << 24) # Exclusive
|
||||
mac_value = int(mac.replace(":", ""), base = 16)
|
||||
if (mac_value >= start_block) and (mac_value < end_block):
|
||||
return True
|
||||
start_block = 0xDC_54_75 << 24
|
||||
end_block = start_block + (1 << 24) # Exclusive
|
||||
mac_value = int(mac.replace(":", ""), base = 16)
|
||||
if (mac_value >= start_block) and (mac_value < end_block):
|
||||
return True
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user