Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Oct 2018, 17:17
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Networking
Script to check prepaid balance 3g modem Huaweii E220
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
daarek5

Joined: 21 Sep 2015
Posts: 19

PostPosted: Thu 11 Jan 2018, 06:07    Post subject:  Script to check prepaid balance 3g modem Huaweii E220
Subject description: Not working, what's wrong?
 

Hello

I found simple way that almost work (when PDU not needed):
Quote:

USSD message e.g balance check one shall execute

# echo "AT+CUSD=1,*101#^M" > /dev/ttyUSB1; cat /dev/ttyUSB1

IMPORTANT: ^M (Carriage Return character) is typed as CTRL+v and CTRL+m

got answer something like this
code not supported

Checked AT codes with minicom - it works fine, answer is correct, but I want just simple script to do prepaid balance check.

Is there error in this script?
^M (Carriage Return character) looks suspicious, or I do something wrong
Anyone help?
Back to top
View user's profile Send private message 
april

Joined: 14 Sep 2013
Posts: 1241
Location: Green Island baby!

PostPosted: Sun 14 Jan 2018, 05:14    Post subject:  

Carriage return has always been CR for me see here though
http://www.theasciicode.com.ar/ascii-control-characters/carriage-return-ascii-code-13.html

^M....cant find that anywhere?
Back to top
View user's profile Send private message Yahoo Messenger 
daarek5

Joined: 21 Sep 2015
Posts: 19

PostPosted: Tue 16 Jan 2018, 10:02    Post subject:  

^M. Question ..or something that "emulate" Enter key pressed there

Code
Code:
AT+CUSD=1,*101#

works in minicom, so I think it's wrong syntax in bash.

Do you know how script with "echo" should look like to achieve "Enter key pressed"?

echo(parametr maybe) "AT+CUSD=1,*101#(Enter here)" > /dev/ttyUSB1
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Hardware » Networking
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0369s ][ Queries: 13 (0.0078s) ][ GZIP on ]