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

Minor fix in wifi_beacon.py

parent b353c9b6
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
iface = 'Wi-Fi' # This is the wifi interface on the drone, Wi-Fi seems to be a common windows name
# while linux seems to use wlan0 so the following checks if wlan0 is an interface then switches to that in that case.
iface = 'wlp2s0'
addrs = psutil.net_if_addrs()
if "wlan0" in addrs.keys():
iface = "wlan0"
......@@ -65,5 +65,8 @@ def beacon_wifi(mac_address, element_info):
mac = hex(get_mac()) # fetches device mac address
mac_arr = list(bytearray.fromhex(mac[2:])) # converts it into int
vendor_info = '130042200100250B3FA14C1CEE522E25ADD5B000000000000000' # Static message to send
beacon_wifi(mac_arr, vendor_info) # Actual call to the method
#print(mac)
#print(mac_arr)
#vendor_info = '130042200100250B3FA14C1CEE522E25ADD5B000000000000000' # Static message to send
#beacon_wifi(mac_arr, vendor_info) # Actual call to the method
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