Facebook   Twitter    e-mail newsletter    YouTube    RSS Feed    Android App    iPhone and iPad App     BlackBerry App


Page 5 of 53 FirstFirst 1 2 3 4 5 6 7 8 9 15 ... LastLast
Results 61 to 75 of 793

Thread: Linux - HOWTO (With Stats)

  1. #61
    Master
    Join Date
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    708

    Default

    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.

  2. #62

    Default

    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?

  3. #63
    Master
    Join Date
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    708

    Default

    Sorry for the delay was very busy this week will post configs shortly...

  4. #64
    Master
    Join Date
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    708

    Default 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

  5. #65
    Linux Guru
    Join Date
    Jan 2005
    Location
    New Germany, Durban
    Posts
    622

    Default

    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 !!!

    Quote Originally Posted by agentpt
    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?

  6. #66

    Default

    When wireless providers refer to i.e. 64k, do they mean 64 kilo bits or 64 or kilobytes, can someone please assist.

  7. #67
    Linux Guru
    Join Date
    Jan 2005
    Location
    New Germany, Durban
    Posts
    622

    Default

    Hey jbad,

    Normally kilobits

    Laterz !!!

    Quote Originally Posted by jbad
    When wireless providers refer to i.e. 64k, do they mean 64 kilo bits or 64 or kilobytes, can someone please assist.

  8. #68

    Default

    Thanks, so I presume if they say up to 1MB to refer to mega bits?

    Quote Originally Posted by Tazz_Tux
    Hey jbad,

    Normally kilobits

    Laterz !!!

  9. #69
    Linux Guru
    Join Date
    Jan 2005
    Location
    New Germany, Durban
    Posts
    622

    Default

    Correct !

    Quote Originally Posted by jbad
    Thanks, so I presume if they say up to 1MB to refer to mega bits?

  10. #70

    Default

    Quote Originally Posted by !!DV!!
    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...

  11. #71
    Linux Guru
    Join Date
    Jan 2005
    Location
    New Germany, Durban
    Posts
    622

    Default 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 !!!

  12. #72
    Spammer be gone bug spray
    Join Date
    Nov 2004
    Location
    A nearby event horizon
    Posts
    13,885

    Default

    Excellent, will give it a bash .
    Q: How does one win games that trolls play?
    A: The only way to win games that trolls play, is to starve them, and refuse to play their games.

    Q: What's the difference between trolls and mosquitoes?
    A: None, they both stab you in the back and suck you dry.

    Telkodemonopolies is proof that time dilation fields definitely exist.

    NB: I'm offline during normal business hours.

  13. #73

    Default

    give it a bash
    Pun intended?

  14. #74
    Spammer be gone bug spray
    Join Date
    Nov 2004
    Location
    A nearby event horizon
    Posts
    13,885

    Default

    Quote Originally Posted by rsachoc
    Pun intended?
    Yep .
    Q: How does one win games that trolls play?
    A: The only way to win games that trolls play, is to starve them, and refuse to play their games.

    Q: What's the difference between trolls and mosquitoes?
    A: None, they both stab you in the back and suck you dry.

    Telkodemonopolies is proof that time dilation fields definitely exist.

    NB: I'm offline during normal business hours.

  15. #75
    Linux Guru
    Join Date
    Jan 2005
    Location
    New Germany, Durban
    Posts
    622

    Default 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 by Tazz_Tux; 23-09-2005 at 08:08 AM. Reason: Saved some CPU cycles on the double grep'ing

Page 5 of 53 FirstFirst 1 2 3 4 5 6 7 8 9 15 ... LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •