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