From owner-freebsd-net@FreeBSD.ORG Mon Jan 30 11:08:48 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C2381065672 for ; Mon, 30 Jan 2012 11:08:48 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 138F78FC24 for ; Mon, 30 Jan 2012 11:08:47 +0000 (UTC) Received: from [82.113.106.85] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Rrp6M-0003Jy-I9 for freebsd-net@freebsd.org; Mon, 30 Jan 2012 12:08:46 +0100 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q0UB9Lmx001286 for ; Mon, 30 Jan 2012 12:09:21 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q0UB9KOq001285 for freebsd-net@freebsd.org; Mon, 30 Jan 2012 12:09:20 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Mon, 30 Jan 2012 12:09:20 +0100 From: Matthias Apitz To: freebsd-net@freebsd.org Message-ID: <20120130110919.GA1249@tiny> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.106.85 Subject: UMTS Huawei monitor X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2012 11:08:48 -0000 Hello, I'm used to connect my FreeBSD laptop or netbooks to Internet using Huawei USB modems (E220 or E1750) with good results, if the networks coverage of the provider is good enough in the place in question. While monitoring my modems and searching around in Google I see that the modems are providing not only the port used by the ppp(8) daemon, in my case /dev/cuaU0.0, but also some additional monitor port, the E1750 as /dev/cuaU0.3. If you just hook a terminal or kermit(1) to that port you see from time to time lines like this one: ^RSSI: 11 which gives the signal quality in a range from 0 (poor) to 31 (best) and in addition every 2 seconds a line of: ^DSFLOWRPT:00000B3A,00000054,00000054,00000000001B0785,0000000000573ABA,000BB800,000E2900 with the following meaning of the hex values: ^DSFLOWRPT: N1, N2, N3, N4, N5, N6, N7 N1: Connection duration in seconds N2: current upload speed (bytes per second) N3: current download speed (bytes per second) N4: number of sent bytes N5: number of received bytes N6: connection, supported by the maximum upload speed N7: connection, supported by a maximum download speed I'm thinking in writing a small, ncurses(3) based tool which will just read the RSSI and DSFLOWRPT lines from the modem and building some semi graphical representation of them as seen below, which gets updated every two seconds. Any comments about this or any pointers to existing software which could be adopted for this? Thanks matthias +========================================================================+ |uptime: hh:mm:ss | |RSSI: current 11 of 31 [last values: 13, 11, 12, 11, 11. 11. 11, 11, 11]| | (Mbps): 0.........1.........2.........3.........4.........5..| |cur. upload speed: [---------->| ]| |c. download speed: [---------------------------------->| ]| |total bytes upld: 1.554.561 | |total bytes down: 5.477.584 | +========================================================================+ -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5