FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
649 views 4 comments
by anonymous
Hi,

I try to send a SMS by using the POST/GET Method with my RUTX11.
I can send SMS successfully via command line but I have no success via HTTP.

curl -X GET "http://192.168.9.1/cgi-bin/sms_list?username=xxx&password=xxx"

just returns "Bad username or password" however I'm sure I use the correct pass and user.
In the System Log I get the message

Tue Jan 25 10:29:41 2022 daemon.err uhttpd[4280]: Failed to lookup "info_modem_id" option string

I already factory reset the router but the problem persists.

Any ideas? Any help is much appreciated.

Regards Joachim
by anonymous

curl -X GET "http://192.168.9.1/cgi-bin/sms_list?username=xxx&password=xxx"


Have you tried using this other syntax instead?  

    curl -X GET "http://username:password@192.168.9.1/cgi-bin/sms_list"

You can also use:

    curl --netrc-file credentials.txt -X GET "http://192.168.9.1/cgi-bin/sms_list"

Use man 1 curl for the syntax of that file.

The latter is preferred, so you don't leak username/password in shell scripts or shell history, for others to find if they happen to log in or use your account.

2 Answers

0 votes
by anonymous
Hi,

ok i figured it out.

The user can not be a random user it must be a user added to the user management.
But why is it a text box and not a drop down list with the users created in the user management.

Also not mentioned on the Wiki page that it must be a user from the users list.

Anyway it works now.

Regards Joachim
Best answer
0 votes
by anonymous

Hi,

Please specify which firmware version you are using? If it is not the most recent, it is worth updating to RUTX_R_00.07.01.2.

Regards.

by anonymous
Hi,

sorry I forgot to mention that.
I'm on the latest version and I'm just double check it is RUTX_R_00.07.01.2

Regards Joachim
by anonymous

  ago by 

curl -X GET "http://192.168.9.1/cgi-bin/sms_list?username=xxx&password=xxx"


Have you tried using this other syntax instead?  

    curl -X GET "http://username:password@192.168.9.1/cgi-bin/sms_list"

You can also use:

    curl --netrc-file credentials.txt -X GET "http://192.168.9.1/cgi-bin/sms_list"

Use man 1 curl for the syntax of that file.

The latter is preferred, so you don't leak username/password in shell scripts or shell history, for others to find if they happen to log in or use your account.

by anonymous
Hi setuid,

nop still the same with all 3 variants.
Also tried it from different machines with different Os'

Always get the "2022 daemon.err uhttpd[3808]: Failed to lookup "info_modem_id" option string" in the System Log.

Regards Joachim