Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TDDE21 DRIP 2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Viktor Norgren
TDDE21 DRIP 2023
Commits
6ec77d55
Commit
6ec77d55
authored
1 year ago
by
Mario Impesi
Browse files
Options
Downloads
Patches
Plain Diff
Progress on Basic ID type 1
parent
5075d731
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drip-general-master/bluetooth/beacon_2.py
+6
-4
6 additions, 4 deletions
drip-general-master/bluetooth/beacon_2.py
with
6 additions
and
4 deletions
drip-general-master/bluetooth/beacon_2.py
+
6
−
4
View file @
6ec77d55
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment