Skip to content
Snippets Groups Projects
Commit 6ec77d55 authored by Mario Impesi's avatar Mario Impesi
Browse files

Progress on Basic ID type 1

parent 5075d731
No related branches found
No related tags found
No related merge requests found
...@@ -181,8 +181,6 @@ def manifest_broadcast(HostID: HostIdentity, flight_id, exp_date, prev_loc = "" ...@@ -181,8 +181,6 @@ def manifest_broadcast(HostID: HostIdentity, flight_id, exp_date, prev_loc = ""
def broadcast_basic_id_1(hhit): def broadcast_basic_id_1(hhit):
print("basic_id_1") print("basic_id_1")
hhit_suite_id
""" """
Serial Number = MFR Code | Length Code | MFR SN Serial Number = MFR Code | Length Code | MFR SN
MFR Code = ICAO MFR Code MFR Code = ICAO MFR Code
...@@ -190,8 +188,12 @@ def broadcast_basic_id_1(hhit): ...@@ -190,8 +188,12 @@ def broadcast_basic_id_1(hhit):
MFR SN = HHIT Suite ID | ORCHID hash left-padded with 3 bits of zeros and encoded into 15 characters MFR SN = HHIT Suite ID | ORCHID hash left-padded with 3 bits of zeros and encoded into 15 characters
""" """
MFR_code = "8653" MFR_code = "8653"
MFR_SN = encode(hhit_suite_id, ORCHID_hash)
serial_number = f"{MFR_code} 0xF " hhit_suite_id = '0' * 3 + unhexlify(hhit)[-72:-65]
ORCHID_hash = unhexlify(hhit)[-64:]
MFR_SN = encode(hhit_suite_id + ORCHID_hash)
serial_number = f"{MFR_code} 0xF {MFR_SN}"
# Set (Extended) Advertising Command # Set (Extended) Advertising Command
if is_wifi: if is_wifi:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment