Coder Social home page Coder Social logo

password about huawei4gsignalinfo HOT 8 OPEN

leonspok avatar leonspok commented on July 19, 2024
password

from huawei4gsignalinfo.

Comments (8)

leonspok avatar leonspok commented on July 19, 2024

Hi!
Yes, I can try to add it. The problem is that I don't have this router anymore, so I won't be able to properly test it. But for me it was working even though I also had admin password set on the router.
Potentially, it might require a very simple change, but before implementing it I need to make sure that my assumptions are right. Could you, please, post the result of this terminal command?

curl "<router_address>/api/device/signal"
# OR
curl -u "<username>:<password>" "<router_address>/api/device/signal"

from huawei4gsignalinfo.

aliafshany avatar aliafshany commented on July 19, 2024

i tried those commands but nothing happened, i guess it is the address which is incorrect to get the signals.
my router is a little different than yours. it's Huawei 4g E5785Lh-22c but still scripts work on that for example this script for me looks like this:

Screen Shot 2021-08-11 at 22 43 35

this image is the result of the commands you told ( please take into consideration that my router address is 192.168.1.1 and still those commands don't work)
Screen Shot 2021-08-11 at 22 45 50

and this is the address for signals

Screen Shot 2021-08-11 at 22 46 17

if you think adding password option and adjusting it to this kind of router is so much time and energy consumer please feel free to deny doing that.
best

from huawei4gsignalinfo.

leonspok avatar leonspok commented on July 19, 2024

Thank you for the script! I'll check it.

Could you, please, try again curl but without "<" and ">". Something like this:

curl -u "admin:2741239266" "http://192.168.1.1/api/device/signal"

from huawei4gsignalinfo.

aliafshany avatar aliafshany commented on July 19, 2024

oh i'm really sorry to put those <> in the address :)

sure i can do that.
these are the results:

Screen Shot 2021-08-11 at 23 02 47

from huawei4gsignalinfo.

leonspok avatar leonspok commented on July 19, 2024

Yeah, it complains about missing CSRF token. Although it shouldn't because /api/device/signal doesn't require authorisation (huawei-lte-api also states that). What you will see if you open http://admin:[email protected]/api/device/signal in your browser?

from huawei4gsignalinfo.

aliafshany avatar aliafshany commented on July 19, 2024

here you are sir:

Screen Shot 2021-08-11 at 23 18 41
Screen Shot 2021-08-11 at 23 19 11

from huawei4gsignalinfo.

leonspok avatar leonspok commented on July 19, 2024

Ok, then it means that this will require a bit more work than I expected and it will be hard to do without physical device in my hands.

If you want to try to implement it yourself, then I would suggest to start from SignalInfoFetcher.swift. You will need to add support for CSRF tokens there.

from huawei4gsignalinfo.

aliafshany avatar aliafshany commented on July 19, 2024

oh that is unfortunate. btw i love the way your app looks like, this is why i opened an issue.
thank you for replying me back so fast and i appreciate your time

best

from huawei4gsignalinfo.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.