On Tue, Jun 22, 2010 at 3:09 PM, Oleg Goldshmidt <[email protected]> wrote:
> On Tue, Jun 22, 2010 at 1:58 PM, Boris shtrasman <[email protected]> > wrote: > > > > > > On Tue, Jun 22, 2010 at 1:44 PM, Oleg Goldshmidt <[email protected]> > wrote: > >> > >> 2010/6/22 Boris shtrasman <[email protected]>: > >> > I noted that many are using AT based modems to surf the net (aka > >> > NetStick) and I wish to buy one. > >> > >> Is this modem a serial device for the kernel? > >> > > NetStick is a generic modem (based on tty) that uses the plain old AT > set. > > They use 2G/3G and HSPA. > > > > As an example Sierra Wireless uses the sierra kernel module. > > A USB serial, as far as I can see (in drivers/usb/serial rather than > /drivers/serial). I don't know if they share the generic serial > infrastructure. > > Then it time for me to search for an answer in LDD again. > In any case, what I meant to say was that you can get the TX/RX byte > count for serial devices from /proc/tty/driver/serial. I did a quick > check of the kernel code and it looks like each specific driver writes > the data (figures) to uart_port.icount.tx/rx that is read from /proc. > This means that id a particular driver does not update the count then > tough luck. I just hope they do. > I didn't immediately see, e.g., the sierra driver doing > that - this does not mean that it doesn't. I also don't see the > corresponding code in usb-serial.c in the kernel. And I don't have a > device to stick in a check. > > Anyway, I meant something along the lines of > > $ sudo cat /proc/tty/driver/serial > serinfo:1.0 driver revision: > 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 > 1: uart:unknown port:000002F8 irq:3 > 2: uart:unknown port:000003E8 irq:4 > 3: uart:unknown port:000002E8 irq:3 > > - see the ts/rx counts? I have no active serial connection, of course. > > I also do not know how the modem interacts with your network devices > (if at all). If it does then, assuming there is a network interface > that is dedicated to traffic going through the modem, you may try sth > like > > now I need to find a person that actually own this kind of hardware. > $ ip -s link show eth0 > 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast > state UP qlen 100 > link/ether 00:23:7d:3f:be:e4 brd ff:ff:ff:ff:ff:ff > RX: bytes packets errors dropped overrun mcast > 127360522 317486 0 0 0 21202 > TX: bytes packets errors dropped carrier collsns > 9834609 77092 0 0 0 0 > > I can't understand from the man file if it is the RX/TX including all the headers (the raw data sent) or only the data segment. > I don't know if all this is helpful or not. > [snip] > > Feel free to forward to the list if you think it is helpful. > > Actually it does. > Good luck, > > -- > Oleg Goldshmidt | [email protected] > -- -- -- Boris Shtrasman ------------ |Gnu/Linux Software developer | | IM : [email protected] | | URL : myrtfm.blogspot.com| _______________________________
_______________________________________________ Linux-il mailing list [email protected] http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
