Skip to content
Snippets Groups Projects
Commit e1671577 authored by Hampus Rosenquist's avatar Hampus Rosenquist
Browse files

Update hci commands in beacon.py

parent 812818fc
No related branches found
No related tags found
No related merge requests found
......@@ -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: 0x0001e0 (480 ms)
Primary_Advertising_Interval_Max: 0x0001e0 (480 ms)
Primary_Advertising_Interval_Min: 0xa00000 (100 ms)
Primary_Advertising_Interval_Max: 0xa00000 (100 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 0x0001e0 0x0001e0 0x07 0x00 0x00 0x000000000000 0x02 0x7f 0x03 0x00 0x03 0x00 0x00", shell=True)
"hcitool -i hci0 cmd 0x08 0x0036 0x00 0x00 0x00 0xa0 0x00 0x00 0xa0 0x00 0x00 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 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 0x00 0x00", shell=True)
else:
"""
OGF: 0x08 (LE controller commands)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment