Skip to content

Commit 54cf711

Browse files
authored
Merge pull request #51 from Open-STEM/WebserverSmallFixes
Small fixes for the webserver
2 parents b6794a9 + 3646976 commit 54cf711

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

XRPLib/webserver.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def __init__(self):
3232
self.FUNCTION_PREFIX = "startfunction"
3333
self.FUNCTION_SUFFIX = "endfunction"
3434
self.display_arrows = False
35+
# Instantiate self.wlan now so that running stop before start doesn't cause an error
36+
self.wlan = network.WLAN(network.STA_IF)
3537

3638
def start_network(self, ssid:str=None, robot_id:int= None, password:str=None):
3739
"""
@@ -58,6 +60,8 @@ def start_network(self, ssid:str=None, robot_id:int= None, password:str=None):
5860
robot_id = 1
5961
ssid = f"XRP_{robot_id}"
6062
password = "remote.xrp"
63+
if password is not None and len(password) < 8:
64+
logging.warning("Password is less than 8 characters, this may cause issues with some devices")
6165
self.access_point = access_point(ssid, password)
6266
logging.info(f"Starting Access Point \"{ssid}\"")
6367
self.wlan = network.WLAN(network.AP_IF)

0 commit comments

Comments
 (0)