Skip to content

Commit

Permalink
make not detecting authmode not a critical error to getting wifi goin…
Browse files Browse the repository at this point in the history
…g. Getting Auth mode fails on hidden networks as it does not show in the scan
  • Loading branch information
nznobody committed Aug 31, 2021
1 parent 557de49 commit c2efc2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/terkin/network/wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,12 @@ def connect_station(self, network):
auth_mode = None
if self.platform_info.vendor == self.platform_info.MICROPYTHON.Pycom:
log.info('WiFi STA: Getting auth mode')
auth_mode = self.get_auth_mode(network_name)
log.info('WiFi STA: Auth mode is "{}"'.format(auth_mode))
try:
auth_mode = self.get_auth_mode(network_name)
log.info('WiFi STA: Auth mode is "{}"'.format(auth_mode))
except WiFiException as _:
log.error('Failed to get auth mode, will attempt fresh')
auth_mode = None

password = network['password']

Expand Down

0 comments on commit c2efc2e

Please sign in to comment.