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
e1671577
Commit
e1671577
authored
2 years ago
by
Hampus Rosenquist
Browse files
Options
Downloads
Patches
Plain Diff
Update hci commands in beacon.py
parent
812818fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iroha-drip-general-master/bluetooth/beacon.py
+6
-6
6 additions, 6 deletions
iroha-drip-general-master/bluetooth/beacon.py
with
6 additions
and
6 deletions
iroha-drip-general-master/bluetooth/beacon.py
+
6
−
6
View file @
e1671577
...
...
@@ -306,8 +306,8 @@ def main():
OCF: 0x0036 (LE Set Extended Advertising Parameters command)
Advertising handle: 0x00 (Advertising set number)
Advertising_Event_Properties: 0x0000 (Non-connectable, non-scannable undirected and not legacy PDU)
Primary_Advertising_Interval_Min: 0x000
1e
0 (
48
0 ms)
Primary_Advertising_Interval_Max: 0x000
1e
0 (
48
0 ms)
Primary_Advertising_Interval_Min: 0x
a0
0000 (
10
0 ms)
Primary_Advertising_Interval_Max: 0x
a0
0000 (
10
0 ms)
Primary_Advertising_Channel_Map: 0x07 (All three channels enabled)
Own_Address_Type: 0x00 (Public device address)
Peer_Address_Type: 0x00 (Public Device Address or Public Identity Address)
...
...
@@ -321,13 +321,13 @@ def main():
Scan_Request_Notification_Enable: 0x00 (Scan request notifications disabled)
"""
subprocess
.
run
(
"
hcitool -i hci0 cmd 0x08 0x0036 0x00 0x0000 0x
0001e0 0x0001e0 0x07 0x00 0x00 0x0000000000
00 0x02 0x7f 0x03 0x00 0x03 0x00 0x00
"
,
shell
=
True
)
"
hcitool -i hci0 cmd 0x08 0x0036 0x00 0x00
0x
00 0x
a0 0x00 0x00 0xa0 0x00 0x00 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x
00 0x02 0x7f 0x03 0x00 0x03 0x00 0x00
"
,
shell
=
True
)
else
:
"""
OGF: 0x08 (LE controller commands)
OCF: 0x0006 (LE Set Advertising Parameters command)
Advertising_Interval_Min: 0xa000 (100 ms)
??
Advertising_Interval_Max: 0xa000 (100 ms)
??
Advertising_Interval_Min: 0xa000 (100 ms)
Advertising_Interval_Max: 0xa000 (100 ms)
Advertising_Type: 0x03 (Non connectable undirected advertising (ADV_NONCONN_IND))
Own_Address_Type: 0x00 (Public device address)
Peer_Address_Type: 0x00 (Public Device Address or Public Identity Address)
...
...
@@ -349,7 +349,7 @@ def main():
Duration[i]: 0x0000 (Advertise until the Host disables it)
Max_Extended_Advertising_Events[i]: 0x00 (No maximum)
"""
subprocess
.
run
(
"
hcitool -i hci0 cmd 0x08 0x0039 0x01 0x01 0x00 0x0000 0x00
"
,
shell
=
True
)
subprocess
.
run
(
"
hcitool -i hci0 cmd 0x08 0x0039 0x01 0x01 0x00 0x00
0x
00 0x00
"
,
shell
=
True
)
else
:
"""
OGF: 0x08 (LE controller commands)
...
...
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