"hcitool -i hci0 cmd 0x08 0x0008 1f 1e 16 fa ff 0d 00 10 {payload}".format(payload=payload),shell=True)
"hcitool -i hci0 cmd 0x08 0x0008 1f 1e 16 fa ff 0d 00 10 {hash_location}{payload}".format(hash_location=hash_location,payload=payload),shell=True)
defmanifest_broadcast(payload,flight_id):## Manifest broadcast can contain max 11 hashes (at 8-bytes each). For now we are sending one message.
defmanifest_broadcast(HostID:HostIdentity,flight_id,prev_hash_loc,exp_date):## Manifest broadcast can contain max 11 hashes (at 8-bytes each). For now we are sending one message.
# ASTM F3-411 Location message 0x1
# ASTM F3-411 Location message 0x1
print("manifest_broadcast")
print("manifest_broadcast")
hash_payload=""
# If gpsd is active, check that it has received values
# If gpsd is active, check that it has received values
ifpayload==None:
ifhash_location==None:
print("payload is empty, cannot generate hash_payload")
print("payload is empty, cannot generate hash_payload for gps information")
defgenerate_self_attestation_Manifests(self,prev_hashed_loc,hashed_loc,expiration):#hashed_loc is hashes of location for now its single, but it can be upto 11(Each 8 byte)
ifexpiration<=astm_time():
print("expiration timestamp has already expired.")