diff --git a/adafruit_esp32spi/adafruit_esp32spi.py b/adafruit_esp32spi/adafruit_esp32spi.py index ea21bd1..ba11601 100644 --- a/adafruit_esp32spi/adafruit_esp32spi.py +++ b/adafruit_esp32spi/adafruit_esp32spi.py @@ -62,6 +62,7 @@ _GET_IPADDR_CMD = const(0x21) _GET_MACADDR_CMD = const(0x22) _GET_CURR_SSID_CMD = const(0x23) +_GET_CURR_BSSID_CMD = const(0x24) _GET_CURR_RSSI_CMD = const(0x25) _GET_CURR_ENCT_CMD = const(0x26) @@ -83,6 +84,8 @@ _START_SCAN_NETWORKS = const(0x36) _GET_FW_VERSION_CMD = const(0x37) _GET_TIME = const(0x3B) +_GET_IDX_BSSID_CMD = const(0x3C) +_GET_IDX_CHAN_CMD = const(0x3D) _PING_CMD = const(0x3E) _SEND_DATA_TCP_CMD = const(0x44) @@ -351,7 +354,7 @@ def start_scan_networks(self): def get_scan_networks(self): """The results of the latest SSID scan. Returns a list of dictionaries with - 'ssid', 'rssi' and 'encryption' entries, one for each AP found""" + 'ssid', 'rssi', 'encryption', bssid, and channel entries, one for each AP found""" self._send_command(_SCAN_NETWORKS) names = self._wait_response_cmd(_SCAN_NETWORKS) #print("SSID names:", names) @@ -362,6 +365,10 @@ def get_scan_networks(self): a_p['rssi'] = struct.unpack('