huawei_lte_api.exceptions.ResponseErrorException: 9003: Unknown #208
Replies: 3 comments
-
Contents of setWifi.py would help... but for start first argument to |
Beta Was this translation helpful? Give feedback.
-
Yep, thanks for your quick help. I've been trying with bool instead of int before, same result. from huawei_lte_api.Connection import Connection
from huawei_lte_api.Client import Client
from huawei_lte_api.enums.client import ResponseEnum
from time import sleep
def setWifi(val):
with Connection("http://192.168.8.1", username="admin", password="XXXXXXXXXXXXXXX") as connection:
client = Client(connection)
if client.wlan.wifi_network_switch(val) == ResponseEnum.OK.value:
print('Wi-Fi was toggled successfully')
return True
else:
print('Error')
return False
if __name__=="__main__":
setWifi(False)
sleep(30)
setWifi(True) |
Beta Was this translation helpful? Give feedback.
-
Sorry for bothering, but is there anything I made wrong in this code, or an unknown problem in the lib? |
Beta Was this translation helpful? Give feedback.
-
Hello
Just installed your lib, I'm trying to simply switch wifi on/off.
When switching on, everything ok (I red that you made it such a way to do nothing if already enabled), but when switching off, I get:
Any idea? Something I made wrong?
Hardware is b525s-23a, btw.
Beta Was this translation helpful? Give feedback.
All reactions