Linux - HOWTO (With Stats)

Status
Not open for further replies.
Hi, I did go thru most of this thread, I got my 3G Novatel U630 working in Suse 9.3 with Kinternet with out to much hassel... Didn't even look at wvdial.

Inserted the card went to YAST and configured it as a modem with a second provider.
add a few strings in config file.
 
Hey !!DV!! Just Murphys law isn't it? Would you mind posting the config changes you made?

Tazz, How do I go about using AT+CSQ to get a signal strength output?
 
Suse 9.3 Kinternet

Here we go...

Insert Card (nothing happend ...no beep, no lights..)
restart pcmcia (rcpcmcia restart)

Open Yast, go to Network Devices.... next to Modem...
It is detected as a AT Modem.. Click on cofigure...
Go theu the motions as normal...
Phone number *99***1# any username and no password..

Config files...
/etc/sysconfig/network/
ifcfg-modemX (X is a number asigned by Yast to config file)
BOOTPROTO='none'
DIALCOMMAND='ATDT'
DIALPREFIX=''
DIALPREFIXREGEX=''
INIT1='ATZ'
INIT2='AT Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
INIT3='AT+CSQ' #### Report signal strength see below....
INIT8='ATM0'
INIT9=''
MODEM_DEVICE='/dev/ttyS0'
NAME='AT Modem'
PPPD_OPTIONS=''
PROVIDER='provider1'
SPEED='115200'
STARTMODE='manual'
UNIQUE='Fyby.KM1shMXflFC'
USERCONTROL='yes'

/etc/sysconfig/network/providers/
provider1
ASKPASSWORD='no'
AUTODNS='yes'
DEMAND='no'
DSLSUPPORTED='no'
IDLETIME='300'
ISDNSUPPORTED='no'
MODEMSUPPORTED='yes'
MODIFYDNS='yes'
PASSWORD=''
PHONE='*99***1#'
PROVIDER='VodaFone'
STUPIDMODE='no'
USERNAME='internet'

After all this you select the correct modem fron list by right click on Kinternet Icon and then dail...
then click on view log you will see something similar to this

SuSE Meta pppd (smpppd-ifcfg), Version 1.58 on Chameleon.
Status is: disconnected
trying to connect to smpppd
connect to smpppd
Status is: disconnected
Status is: connecting
pppd[0]: Plugin passwordfd.so loaded.
pppd[0]: --> WvDial: Internet dialer version 1.54.0
pppd[0]: --> Initializing modem.
pppd[0]: --> Sending: ATZ
pppd[0]: ATZ
pppd[0]: OK
pppd[0]: --> Sending: AT Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
pppd[0]: AT Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
pppd[0]: OK
pppd[0]: --> Sending: AT+CSQ
pppd[0]: AT+CSQ
pppd[0]: +CSQ: 15,99
pppd[0]: OK
pppd[0]: --> Sending: AT+CGDCONT=1,"IP","internet"
pppd[0]: AT+CGDCONT=1,"IP","internet"
pppd[0]: OK
pppd[0]: --> Modem initialized.
pppd[0]: --> Sending: ATDT*99***1#
pppd[0]: --> Waiting for carrier.
pppd[0]: ATDT*99***1#
pppd[0]: CONNECT
pppd[0]: --> Carrier detected. Waiting for prompt.
pppd[0]: --> Don't know what to do! Starting pppd and hoping for the best.
pppd[0]: Serial connection established.
pppd[0]: Renamed interface ppp0 to modem1
pppd[0]: Using interface modem1
Status is: connecting
pppd[0]: Connect: modem1 <--> /dev/ttyS0
pppd[0]: CHAP authentication succeeded
pppd[0]: local IP address 10.15.185.113
pppd[0]: remote IP address 10.15.128.1
pppd[0]: primary DNS address 168.210.2.2
pppd[0]: secondary DNS address 196.14.239.2
pppd[0]: Connect time 0.1 minutes.
pppd[0]: Sent 0 bytes, received 10 bytes.
pppd[0]: local IP address 10.15.185.113
pppd[0]: remote IP address 10.15.128.1
pppd[0]: primary DNS address 168.210.2.2
pppd[0]: secondary DNS address 196.14.239.2
pppd[0]: Script /etc/ppp/ip-up finished (pid 7089), status = 0x0
Status is: connected
disconnecting from smpppd
trying to connect to smpppd
connect to smpppd
Status is: connected
 
Hey agent,

I still need to do some work on the AT+CSQ command and how to work it nicely...I am thinking of something like - show_signal.sh which will report something like:

4/5 - Good Signal, enjoy the speed :)

Laterz !!!

agentpt said:
Hey !!DV!! Just Murphys law isn't it? Would you mind posting the config changes you made?

Tazz, How do I go about using AT+CSQ to get a signal strength output?
 
When wireless providers refer to i.e. 64k, do they mean 64 kilo bits or 64 or kilobytes, can someone please assist.
 
Thanks, so I presume if they say up to 1MB to refer to mega bits? :confused:

Tazz_Tux said:
Hey jbad,

Normally kilobits :)

Laterz !!!
 
!!DV!! said:
Here we go...

Insert Card (nothing happend ...no beep, no lights..)
restart pcmcia (rcpcmcia restart)


Status is: connected

Thanks !!DV!! Haven't tried it yet, but be sure to let you know, and thanks Tazz 4 ur help as usual...
 
Linux usage

Hello Everyone,

I use this "quick-and-dirty" script to show usage under Linux. I am sure it can be made better, but it was a 2 min job. I have this in my cron jobs that calcs usage for the day, then rotates the log.

I have added a line to my /etc/syslog.conf:

Code:
*.*                /var/log/all.log
Restart syslog after that. I also have debugging on in /etc/ppp/options:

Code:
debug
kdebug 4
calc_usage.sh

Code:
#!/bin/bash
cat /var/log/all.log | grep pppd | grep Sent | gawk -F\  '{print $7"+"}' | xargs > /tmp/sent
echo "0" >> /tmp/sent
echo -n "Sent Total : " && cat /tmp/sent | xargs | bc
cat /var/log/all.log | grep pppd | grep Sent | gawk -F\  '{print $10"+"}' | xargs > /tmp/recv
echo "0" >> /tmp/recv
echo -n "Recv Total : " && cat /tmp/recv | xargs | bc
rm -rf /tmp/sent
rm -rf /tmp/recv

Demo:

localhost tests # ./calc_usage.sh
Sent Total : 9891729
Recv Total : 10027875

Enjoy !!!
 
New version of calc_usage.sh

Hello All,

i have just made a new version of the script - It will now keep track of the sessions in a file, easy to view easy to manage.

You can also edit the first three lines to make it work for you :)

Enjoy !!!

calc_usage.sh
Code:
#!/bin/bash

logfile="/var/log/all.log"
tempfile="/tmp/logs"
datafile="/tests/data_usage"

cat $logfile | grep pppd | grep Sent > $tempfile
cat $datafile >> $tempfile

cat $tempfile | grep pppd | grep Sent | sort | uniq > $datafile

cat $datafile | gawk -F\  '{print $7"+"}' | xargs > /tmp/sent
echo "0" >> /tmp/sent
echo -n "Sent Total : " && cat /tmp/sent | xargs | bc
cat $datafile | gawk -F\  '{print $10"+"}' | xargs > /tmp/recv
echo "0" >> /tmp/recv
echo -n "Recv Total : " && cat /tmp/recv | xargs | bc
rm -rf /tmp/sent
rm -rf /tmp/recv
rm -rf $tempfile
 
Last edited:
I created a shellscript vodacom3g.sh
with this content:

wvdial novatel internet 3gonly 384k

I launched my shell script in ect folder as follows:
./vodacom3g.sh

This is the screen dump of that session :
==============================

--> WvDial: Internet dialer version 1.54.0
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATE0V1&D2&C1S0=0+IFC=2,2
ATE0V1&D2&C1S0=0+IFC=2,2
OK
--> Sending: AT+COPS=0,0,"Vodacom-SA",2
OK
--> Sending: AT+CGDCONT=1,"IP","internet";
OK
--> Sending: AT+CGEQMIN=1,4,64,384,64,384
OK
--> Sending: AT+CGEQREQ=1,4,64,384,64,384
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Sep 26 07:38:31 2005
--> pid of pppd: 9216
--> Using interface ppp0
--> pppd: Command
--> pppd: Command
--> pppd: Command
--> pppd: Command
--> pppd: Command
--> local IP address 10.43.250.12
--> pppd: Command
--> remote IP address 10.64.64.64
--> pppd: Command
--> primary DNS address 10.11.12.13
--> pppd: Command
--> secondary DNS address 10.11.12.14
--> pppd: Command
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> warning, can't find address for `www.suse.de`
--> warning, address lookup does not work
--> Nameserver (DNS) failure, the connection may not work.
--> Connected... Press Ctrl-C to disconnect
--> pppd: Command

In a sepperate Shell Konsole I tried the following pings:
=========================================

It seems that i can only ping my own IP address


linux:~ # ping 10.11.12.13
PING 10.11.12.13 (10.11.12.13) 56(84) bytes of data.
--- 10.11.12.13 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 7998ms

linux:~ # ping 10.11.12.14
PING 10.11.12.14 (10.11.12.14) 56(84) bytes of data.
--- 10.11.12.14 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2009ms

linux:~ # ping 10.64.64.64
PING 10.64.64.64 (10.64.64.64) 56(84) bytes of data.
--- 10.64.64.64 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms

linux:~ # ping 10.43.250.12
PING 10.43.250.12 (10.43.250.12) 56(84) bytes of data.
64 bytes from 10.43.250.12: icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from 10.43.250.12: icmp_seq=2 ttl=64 time=0.037 ms
64 bytes from 10.43.250.12: icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from 10.43.250.12: icmp_seq=4 ttl=64 time=0.033 ms
64 bytes from 10.43.250.12: icmp_seq=5 ttl=64 time=0.024 ms

Please advise How to get working
regards
Nico
 
Hey bank_nut,

When last did you try - I also saw these problems on Sat. and reported them to Vodacom. All seems well now...

You are getting the wrong DNS info. please paste the output of:

Code:
cat /etc/ppp/options

Laterz !!!
 
Please review and advise me
I still get problems connecting i succed one in 8 times
Maybe I should use a fixed name-server IP

regards
Nico
:(
===================here is the settings
noipdefault
noauth
crtscts
lock
modem
asyncmap 0
nodetach
lcp-echo-interval 30
lcp-echo-failure 4
lcp-max-configure 60
lcp-restart 2
idle 600
noipx
file /etc/ppp/filters

should use
linux:~ #

regards
Nico
 
Last edited:
ooooppppsssss - sorry about that - bit of a big file there :)

Anywayz - all seems ok then, what you might wanna do is run that command at the top grep -v ^#... and trim that file down - doesn't make a diff though.

If you really wanna see some wierd numbers and stuff, uncomment the debug lines and make kdebug 4. This will print the neg. between your card and Vodacom into syslog - some neat info there !!!

Enjoy !!!
 
Hi

Unsure if this is the right place but I have 3G card from a Norwegian provider (Netcom) that's not getting detected correctly. It's an Option card model # GT 3G Quad.

uname -a
Code:
Linux buddy 2.6.12-suspend2-r6 #6 SMP Tue Sep 27 20:00:52 CEST 2005 i686 Intel(R) Pentium(R) M processor 1.80GHz GenuineIntel GNU/Linux

I'm running Gentoo with UDEV. PCMCIA and hotplug is installed.

When I insert the card dmesq reports:

Code:
Sep 27 20:54:07 buddy PCI: Enabling device 0000:03:00.0 (0000 -> 0002)
Sep 27 20:54:07 buddy ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Sep 27 20:54:07 buddy PCI: Setting latency timer of device 0000:03:00.0 to 64
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.0: NEC Corporation USB (#15)
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 5
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.0: irq 11, io mem 0x40800000
Sep 27 20:54:07 buddy hub 5-0:1.0: USB hub found
Sep 27 20:54:07 buddy hub 5-0:1.0: 1 port detected
Sep 27 20:54:07 buddy PCI: Enabling device 0000:03:00.1 (0000 -> 0002)
Sep 27 20:54:07 buddy ACPI: PCI Interrupt 0000:03:00.1[B] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Sep 27 20:54:07 buddy PCI: Setting latency timer of device 0000:03:00.1 to 64
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.1: NEC Corporation USB (#16)
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.1: new USB bus registered, assigned bus number 6
Sep 27 20:54:07 buddy ohci_hcd 0000:03:00.1: irq 11, io mem 0x40801000
Sep 27 20:54:08 buddy hub 6-0:1.0: USB hub found
Sep 27 20:54:08 buddy hub 6-0:1.0: 1 port detected
Sep 27 20:54:09 buddy usb 6-1: new full speed USB device using ohci_hcd and address 2

The device does not get associated with any serial device!

I've tried to manually modprobe serial_cs and usbserial (along the lines of this howto) but neither claim the device.

Here are the relevant parts of my kernel config with regards to serial drivers:

Code:
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_CS=m
CONFIG_SERIAL_8250_ACPI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_IPW=m
CONFIG_USB_SERIAL_OPTION=m

Am i missing some kernel stuff here?
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X