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 Fri 25 Jul 2014, 21:05
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HOWTO get personal with your 3G (etc.) cellular modem
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message

Joined: 11 Oct 2007
Posts: 328

PostPosted: Sun 23 Feb 2014, 20:57    Post subject:  HOWTO get personal with your 3G (etc.) cellular modem
Subject description: - choose service, optimise signal strength etc.

- without wasting your time and money!

Communication with modems has been accomplished - since (almost) the days when they were driven by steam - via special character combinations known variously as e.g. 'AT codes' or 'Hayes strings'. It is very easy to use these, to your advantage, in Puppy .... if you know how.

In the following examples, it is assumed that Puppy has recognised your modem as /dev/ttyUSB0 (your mileage may vary, adjust the numeric if need be).

What cellular services can I pick up at my location?

- to find out which Internet Service Providers (ISPs) are within range, open a terminal (e.g. rxvt) and do-
modem-stats  -c "AT=COPS?" /dev/ttyUSB0

(include the quotes!)

- allow Puppy half a minute or so for scratting and sniffing; your modem will report all the services which it can 'see', each one in brackets with the following format:
(service status, numeric, e.g. 0=unknown, 1=available, 2=current, 3='forbidden'; abbreviated ISP identity; ?base station ID; service category, numeric, e.g. 0=GSM, 1='compact GSM', 2=UTRAN/3G).

Note that:

- you do not have to rush out and buy a set of SIMcards to see what is available! The AT=COPS? should tell you anyway, even if you are using a specific, old, time-expired SIMcard in your device, and even if your modem thought it was "locked" to a particular outfit.

- the string AT=COPS? will report services even if their signal is too weak to be useful for practical purposes. To find out what signal strength you can pick up from a given ISP, read on ....

What sort of signal can I get from that ISP?

To 'target' the signal from a particular ISP, you will need to have inserted a SIMcard associated with that ISP .... but, as before, don't waste your money whilst trying find out what's available by buying a new SIMcard, unless you must ... even a time/credit-expired voice (telephone) SIM for that provider's local service should suffice to check your signal strength.

- in the terminal, do-
modem-stats  -c  "AT+CSQ"  /dev/ttyUSB0

AT+CSQ will swiftly tell you the score, e.g. +CSQ: 18, 99

Here, the trailing 99 is just a dummy number indicating that there is no info on speed/bandwidth .... the leading number tells you the signal strength. Here is a rough guide:-

1      -111 dBm     (very very weak)
5       -103 dBm
10       -93  dBm
15        -83  dBm
20       -73  dBm
25        -63  dBm
30       -53  dBm   (super strong)

It is suggested that a signal strength in the range -75 to -85 dBm, i.e. the +CSQ -reported numbers 14 to 17, should be sufficient for a reasonably reliable data connection. It may not be worth striving for anything better than -60 dBm, say +CSQ -reported 26, because the base station may start to wind down transmit power if it thinks things are that good.

Note that there is no need to transmit ISP 'phone numbers', passwords and stuff for the purpose of running these tests, because Puppy is just sniffing the signals rather than establishing a connection to a service.

AT+CSQ is very useful, also, for experimenting to find the optimal position for your device, e.g. the 'sweet spot' for your dongle within your den which offers the best signal.

Don't forget that, if you get bored with repeatedly shoving out AT codes manually on the command line as above, PupDial can do this for you very nicely; f'rinstance, I keep the line

Init6 = AT+CSQ

in my /etc/wvdial.config, so that PupDial reports the signal strength whenever I connect.

Although much of this 'gen is available elsewhere on the forum, it is in bits and hard to find, so I thought it worth trying to pull it together in this HOWTO ..... but I am so far only just scratching the surface of the power which AT codes can place at your fingertips (there are so many of them!) .... if you know how to use them. Any corrections and contributions are most welcome, especially if you have succeeded in using any particular AT code to sort out a problem.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0480s ][ Queries: 11 (0.0039s) ][ GZIP on ]