Comments (10)
It should be in https://github.com/Salamek/huawei-lte-api/blob/1a28bbf96eec2480b04e03b46584f67ffeb9dc11/huawei_lte_api/api/Security.py#L15
But i see only adding url filter implemented right now...
from huawei-lte-api.
i used this
huawei-lte-api/huawei_lte_api/api/WLan.py
Lines 103 to 113 in 32226a9
this is my code
from huawei_lte_api.Client import Client
from huawei_lte_api.Connection import Connection
from huawei_lte_api.api.WLan import WLan
with Connection('http://admin:[email protected]/') as connection:
client = Client(connection)
wlan = client.wlan
clients = [{'wifihostname': 'B612-233',
'WifiMacFilterMac': '66:77:88:99:AA:BB'}]
response = wlan.set_multi_macfilter_settings(clients)
and it give me
Traceback (most recent call last):
File "c:\Users\everp\Documents\GitHub\fixbox\getmac.py", line 11, in <module>
response = wlan.set_multi_macfilter_settings(clients)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\api\WLan.py", line 146, in set_multi_macfi
lter_settings return self._session.post_set('wlan/multi-macfilter-settings', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 215, in post_set
self._post(endpoint, data, refresh_csrf, prefix, is_encrypted, is_json)
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 34, in wrapped
return fn(*args, **kw)
^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 254, in _post
response_data = cast(str, self._check_response_status(self._process_response_data(response)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 156, in _check_response_
status raise error_code_to_exception.get(error_code, ResponseErrorException)(
huawei_lte_api.exceptions.ResponseErrorException: 9003: Unknown
from huawei-lte-api.
from huawei-lte-api.
and using this
from huawei_lte_api.Client import Client
from huawei_lte_api.Connection import Connection
from huawei_lte_api.api.WLan import WLan
with Connection('http://admin:[email protected]/') as connection:
client = Client(connection)
wlan = client.wlan
wlan.set_mac_filter('myhostname', '66:77:88:99:AA:BB')
give
tHub/fixbox/getmac.py Traceback (most recent call last):
File "c:\Users\everp\Documents\GitHub\fixbox\getmac.py", line 8, in <module>
wlan.set_mac_filter('myhostname', '66:77:88:99:AA:BB')
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\api\WLan.py", line 159, in set_mac_filter
return self._session.post_set('wlan/mac-filter', OrderedDict((
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 215, in post_set
self._post(endpoint, data, refresh_csrf, prefix, is_encrypted, is_json)
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 34, in wrapped
return fn(*args, **kw)
^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 254, in _post
response_data = cast(str, self._check_response_status(self._process_response_data(response)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 156, in _check_response_
status raise error_code_to_exception.get(error_code, ResponseErrorException)(
huawei_lte_api.exceptions.ResponseErrorNotSupportedException: 100002: No support
from huawei-lte-api.
i see a pattern with this erorr code
https://github.com/Salamek/huawei-lte-api/issues?q=is%3Aissue+is%3Aopen+100002
from huawei-lte-api.
You have used wrong function, your router is using set_multi_macfilter_settings
call, try that
from huawei-lte-api.
You have used wrong function, your router is using set_multi_macfilter_settings call, try that
this is my code
from huawei_lte_api.Client import Client from huawei_lte_api.Connection import Connection from huawei_lte_api.api.WLan import WLan with Connection('http://admin:[email protected]/') as connection: client = Client(connection) wlan = client.wlan clients = [{'wifihostname': 'B612-233', 'WifiMacFilterMac': '66:77:88:99:AA:BB'}] response = wlan.set_multi_macfilter_settings(clients)and it give me
Traceback (most recent call last): File "c:\Users\everp\Documents\GitHub\fixbox\getmac.py", line 11, in <module> response = wlan.set_multi_macfilter_settings(clients) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\api\WLan.py", line 146, in set_multi_macfi lter_settings return self._session.post_set('wlan/multi-macfilter-settings', { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 215, in post_set self._post(endpoint, data, refresh_csrf, prefix, is_encrypted, is_json) File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 34, in wrapped return fn(*args, **kw) ^^^^^^^^^^^^^^^ File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 254, in _post response_data = cast(str, self._check_response_status(self._process_response_data(response))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\everp\AppData\Local\Programs\Python\Python311\Lib\site-packages\huawei_lte_api\Session.py", line 156, in _check_response_ status raise error_code_to_exception.get(error_code, ResponseErrorException)( huawei_lte_api.exceptions.ResponseErrorException: 9003: Unknown
from huawei-lte-api.
Is that correct payload? Check what is your router sending in browser debug tools "Payload" card...
from huawei-lte-api.
Closed by #204
from huawei-lte-api.
Released in 1.8.1
from huawei-lte-api.
Related Issues (20)
- ResponseErrorException: 100006 for hardware CL2E3372HM HOT 8
- Reboot script HOT 1
- Switch Wifi on/off HOT 3
- Exception on log-out ResponseErrorWrongSessionToken: 125003: Wrong Session Token HOT 3
- Issues with multi-part SMS messages (Type 2) HOT 9
- Disabling automatic online updates HOT 3
- Quicksetup HOT 5
- Disabling IPv6 HOT 2
- Can't connect to my modem HOT 4
- Unable to connect to Huawei B535-333 with the error 125003 (Wrong token)
- Toggle VPN status HOT 7
- Can't enable telnet on device HOT 1
- Huawei E8231 also work HOT 1
- Error: 113004 HOT 1
- I ran the example but didn't work HOT 6
- Ping example?
- ussd request example HOT 6
- Accessing device remotely HOT 2
- E3372 CL1E3372SM Ver.A api doesn't work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huawei-lte-api.