huawei_lte_api.exceptions.ResponseErrorLoginRequiredException: 100003: No rights (needs login) #190
Replies: 11 comments
-
All these works ~correctly for me on B310-22s antenna_status()
antenna_type()
get_antenna_settings()
Does you'r router support these? (Huawei firmware is a mess so it may throw incorrect errors), are you logged in correctly? (show your code) |
Beta Was this translation helpful? Give feedback.
-
I have this router: I am logged in using the method you made, you can see from my last screenshot that it logs in and scrapes all the data correctly, so it's not a login issue? |
Beta Was this translation helpful? Give feedback.
-
Image of the code ^ |
Beta Was this translation helpful? Give feedback.
-
@ryanbarlow97 code looks fine, it may be anything, how i said, Huawei REST XML API is a mess..., it can be one of these issues (or something new):
To debug this:
I Don't have |
Beta Was this translation helpful? Give feedback.
-
It appears my ISP has literally removed everything from the API regarding bands.. |
Beta Was this translation helpful? Give feedback.
-
Of these, I am only getting a response from:
So many disabled API things :( |
Beta Was this translation helpful? Give feedback.
-
Here, on Huawei 5G CPE Pro 2, official web gui does GET api/device/antenna_type (while in advanced->system->system settings) query which ends up with:
so maybe it's not implemented at all (here I have firmware from play.pl operator). If you do
in browser inspector you will find that there is even gui part for antenna settings:
and also:
Also randomly checked, check_notifications works here:
|
Beta Was this translation helpful? Give feedback.
-
I found that if you continue to use the same connection to the modem ( mine is a B535-333) ... that after a few minutes (maybe 300 seconds or calling the API a certain number of times?), one gets the above mentioned CSRF error and needs to log in with a new again to continue. It is true that quite a few parts of the API can be read without login. I ended up needing to figure out how to trap the exception the relevant bits from my solution are below. In reality, if you make calls over an extended period of time, it's probably best to close and make a new connection. By the way, thank you @Salamek for this great library!! After too much time messing with curl, bash and sed to monitor my modem, I figured it's about time to sit down, read the python tutorial and documentation and hope for the object oriented lightning bolt to hit me in the head. :-)
SNIP... Initializing some super secret variables...
SNIP... some irrelevant or not so interesting stuff...
|
Beta Was this translation helpful? Give feedback.
-
Yeah i managed to handle the CSRF token error, here is my code: |
Beta Was this translation helpful? Give feedback.
-
@Regis-Loyaute hmm i think that you have ~duplicated functionality of https://github.com/Salamek/netkeeper in your project BTW... |
Beta Was this translation helpful? Give feedback.
-
@Salamek i improved the reboot script |
Beta Was this translation helpful? Give feedback.
-
So, I am testing things around the antenna, and it keeps getting login fails, but I know for a fact the password is correct.
(Some of the things I have tested give the same error).
It does work for things like signal() though.
See below;
Beta Was this translation helpful? Give feedback.
All reactions