You are not logged in.

#1 2008-04-13 16:47:55

_nalle
Member
From: Stockholm/Sweden
Registered: 2006-01-11
Posts: 70
Website

Link quality monitoring on Huawei modems

After ircing for some time during a trip on the train via my Huawei 3G modem I started getting annoyed with not knowing the quality of the link via the modem.

So I started googling some. What I found was that gnomes networkmanager-people are still working on implementing it.
This however is not fast enough wink

So my question is: Does anyone know of an application that can get the link quality and display it?

Thanks in advance


Swedish Archlinux Mirror Administrator - ftp.gigabit.nu

Offline

#2 2008-04-13 21:09:31

armin
Member
From: the Caribbean. Arrr...!!!
Registered: 2007-02-26
Posts: 46

Re: Link quality monitoring on Huawei modems

I haven't used it in ages, but here's a script that should output some info about the connection. You could display the output via conky or zenity. IIRC there's also a xfce panel-applet which displays signal info.

#!/usr/bin/env perl

use strict;
use warnings;

my $modem = "/dev/tts/USB1";

# signal strength     meaning
# 0                   -113 dBm or less
# 1                   -111 dBm
# 2..30               -109...-53 dBm
# 31                  -51 dBm or greater
# 99                  not known or not detectable
#
# bit error rate      meaning
# 0...7               the lower, the better :-)
# 99                  not known or not detectable

$SIG{ALRM} = sub {
        close(MODEM);
        die("timeout: no response from modem $modem\n");
};

open(MODEM, "+<", $modem) or die("can't open modem $modem");
alarm(10);
print(MODEM "AT+CSQ\n\r");
while (<MODEM>) {
        if (m/^\+CSQ/) {
                my ($x, $s) = split(' ', $_);
                my ($signal, $err) = split(',', $s);
                print("signal strength: $signal, bit error rate: $err\n");
        }
        if (m/OK/) {
                close(MODEM);
                exit(0);
        }
}

I'm a Pastafari

Offline

#3 2008-04-13 21:14:47

_nalle
Member
From: Stockholm/Sweden
Registered: 2006-01-11
Posts: 70
Website

Re: Link quality monitoring on Huawei modems

Oh nice, you had the AT line I've been looking for! smile


Swedish Archlinux Mirror Administrator - ftp.gigabit.nu

Offline

Board footer

Powered by FluxBB