cmaion / huawei_router

A shell script to interact with Huawei 4G routers
10 stars 3 forks source link

bugfix request for SMS functions #1

Closed MulMic closed 3 years ago

MulMic commented 3 years ago

Hi Cédric,

thank you for a neat example of elegant programming :-)

Alas, there seems to be a minor problem with the SMS functionality, at least for my router 💯

<DeviceName>B818-263</DeviceName>
<HardwareVersion>WL3B818M</HardwareVersion>
<SoftwareVersion>10.0.2.2&#40;H190SP1C983&#41;</SoftwareVersion>
<WebUIVersion>WEBUI 10.0.2.2&#40;W2SP2C7201&#41;</WebUIVersion>

The reason is the setting of "new_token" in function "request()"

Instead of

new_token=$(sed -n 's/^__RequestVerificationToken:\([^\r]*\).*$/\1/p' "$TMP_HEADER")

it must read

new_token=$(sed -n 's/^__RequestVerificationTokentwo:\([^\r]*\).*$/\1/p' "$TMP_HEADER")

Also adding a link to

huawei-lte-api

would make sense, as it contains quite a few api endpoints to experiment with.

Thanks again for your contribution.

MulMic

P.S. what was your intention for function "is_logged_in()" ? It's never used.

cmaion commented 3 years ago

Hi,

Just checked with my E5573Bs-320: seems to work with __RequestVerificationTokentwo too, so I have implemented your change.

I haven't used this code for a long time, and don't remember why there's is_logged_in(). Probably did this while implementing/testing to check if everything was working as expected.

MulMic commented 3 years ago

Hi ,

I created a script based on yours and others for my Huawei B818-263 LTE Router.

If you don’t mind, please check it against your device, so I get an idea wether my concept is universally applicable, or just for my device.

You can find it at: „GitHub - MulMic/huawei_simple: Remote access to a Huawei B818-263 LTE 4G router (experimental) https://github.com/MulMic/huawei_simple

Looking forward to hear from you,

MulMic

Von: cmaion notifications@github.com Gesendet: Mittwoch, 24. Februar 2021 17:18 An: cmaion/huawei_router huawei_router@noreply.github.com Cc: MulMic mueller_michael@mail.ru; Author author@noreply.github.com Betreff: Re: [cmaion/huawei_router] bugfix request for SMS functions (#1)

Closed #1 https://github.com/cmaion/huawei_router/issues/1 via https://github.com/cmaion/huawei_router/commit/deedbe0e5b379db8b2f51671f2c8c606c861e9b4 deedbe0.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cmaion/huawei_router/issues/1#event-4371883529 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOC7YP6XJVDRDJK2BWL3ES3TAURENANCNFSM4YEFE3WA . https://github.com/notifications/beacon/AOC7YP5VGGNOUVCL6QBHSQLTAURENA5CNFSM4YEFE3WKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGPAAAAAAIESWTAS.gif