diff --git a/iroha-drip-general-master/bluetooth/beacon.py b/iroha-drip-general-master/bluetooth/beacon.py index e46ea0218b4ca2f68ca2404701c6f9da5f92ed1a..883fd2541652348eb2e41b9173dba3f49b732f0b 100644 --- a/iroha-drip-general-master/bluetooth/beacon.py +++ b/iroha-drip-general-master/bluetooth/beacon.py @@ -109,7 +109,7 @@ def location_update(gpsd: GpsPoller, iroha: DripIrohaAccount, flight_id): ) if is_wifi: - beacon_wifi(mac_arr, payload=payload) + beacon_wifi(mac_arr, payload) else: # Set (Extended) Advertising command if is_bt5: @@ -250,10 +250,9 @@ def main(): ) parser.add_argument( "--wifi", - dest="activate_wifi" + dest="activate_wifi", default= False, - action= "store_true" - type= bool + action= "store_true", ) parser.add_argument( "--gps", diff --git a/iroha-drip-general-master/bluetooth/wifi_beacon.py b/iroha-drip-general-master/bluetooth/wifi_beacon.py index 4ebaec1acd1b5672114bfec061f1d0576809ffae..75ac8ea6254742a4f03c44e6c2ea1222d51334ad 100644 --- a/iroha-drip-general-master/bluetooth/wifi_beacon.py +++ b/iroha-drip-general-master/bluetooth/wifi_beacon.py @@ -1,4 +1,5 @@ -from scapy.layers.dot11 import Dot11, Dot11Beacon, RadioTap, sendp, Dot11Elt +from scapy.all import * +#from scapy.layers.dot11 import Dot11, Dot11Beacon, RadioTap, sendp, Dot11Elt # from scapy.all import hexdump # Used in commented code so uncomment when you uncomment the code from uuid import getnode as get_mac import os @@ -54,7 +55,7 @@ def beacon_wifi(mac_address, element_info): # '\x00\x00')) # frame = RadioTap()/dot11/dot_11_beacon/ dot_11_element /rsn - # frame.show() # Prints a readable version of the frame that is being sent + frame.show() # Prints a readable version of the frame that is being sent # hexdump(frame) # Prints a hexdump of the frame that is being sent. @@ -64,5 +65,5 @@ 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 +vendor_info = '130042200100250B3FA14C1CEE522E25ADD5B000000000000000' # Static message to send +beacon_wifi(mac_arr, vendor_info) # Actual call to the method