Reply
Thread Tools
Posts: 241 | Thanked: 69 times | Joined on Dec 2009 @ Germany
#131
today i was able to test icq idling over 3g. seems i have to play around with the bytes-count taken into accout for determining unused connection.
 
Posts: 43 | Thanked: 32 times | Joined on Jan 2010
#132
Originally Posted by calvin_42 View Post
Hey azstunt!

Thanks for the feedback. I didn't asked to you directly because I knew what your answers would be (I have read all your interesting previous posts).

Do you think you could you try to identificate the origin of the 42 bytes ? I'm curious and it would help me to understand the process. I just ran a few tests with my home wifi connexion but unfortunately I didn't log any received or sent packets on my device. That's why I assumed my script worked.



As I said before, even if they are a lot more RX packets than TX, I am pretty sure the proportion is the same (TCP needs feedback from the recipient).
Sincerely, I have no idea where these packets are coming from, I've already checked for anything that might be connecting or updating, do you know any command to check actual connections?

You could always keep your script as it is, I mean, in theory that's the way it should work. But considering that you are making an app for end-users, I believe it would be wise to know why it may not work for everybody and how to fix it. Having said that, it may be just for me, so I won't draw any conclusions until many people have tested if they receive or send packets when not using the connection.


PS: My n900 not only receives 1 packet of 42 bytes every 20 seconds or so, it also sends 1 packet of 60 bytes at the same interval. I had not payed attention to TX since I was not using it in my script.
 
calvin_42's Avatar
Posts: 286 | Thanked: 219 times | Joined on Feb 2010 @ France
#133
Originally Posted by azstunt View Post
Sincerely, I have no idea where these packets are coming from, I've already checked for anything that might be connecting or updating, do you know any command to check actual connections?
Code:
apt-get install tcpdump
See http://www.tcpdump.org/tcpdump_man.html for documentation.
 
Posts: 43 | Thanked: 32 times | Joined on Jan 2010
#134
Originally Posted by calvin_42 View Post
Code:
apt-get install tcpdump
See http://www.tcpdump.org/tcpdump_man.html for documentation.
Ok, I've installed it... fooled around with it a bit, etc. Anyway, is any of this useful?

Code:
$ tcpdump -i wmaster0 -vv
tcpdump: WARNING: can't create rx ring on packet socket 3: 92-Protocol not avalaible
tcpdump: WARNING: wmaster0: no IPv4 address assigned
tcpdump: listening on wmaster0, link-type IEEE802_11 (802.11), capture size 96 bytes
14:50:44.391267 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:02.515687 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:22.484437 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:43.375062 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:02.523560 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:22.390687 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:42.350495 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:02.531312 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
14:50:22.500031 0us ARP, Ethernet (len 6), IPv4 (len 4), Reply 1 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
and

Code:
$ tcpdump -i wlan0
tcpdump: WARNING: can't create rx ring on packet socket 3: 92-Protocol not avalaible
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 96 bytes
15:43:40.320800 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.43.40.321075 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:00.404540 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.00.404815 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:21.500182 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.21.500457 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:40.444274 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.40.444549 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
 
Posts: 17 | Thanked: 14 times | Joined on Jan 2010 @ London, UK
#135
Originally Posted by azstunt View Post
Code:
$ tcpdump -i wlan0
tcpdump: WARNING: can't create rx ring on packet socket 3: 92-Protocol not avalaible
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 96 bytes
15:43:40.320800 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.43.40.321075 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:00.404540 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.00.404815 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:21.500182 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.21.500457 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
15:44:40.444274 ARP, Request who-has 192.168.1.68 (Broadcast) tell 192.168.1.254, length 28
15.44.40.444549 ARP, Reply 192.168.1.68 is-at c0:38:f9:b3:07:02 (oui Unknown), length 28
It's your access point at .254 address checking that you're still there every 20s, like you said before. These will be 28 byte rx and tx packets. A very quiet connection for the sample period.
 
calvin_42's Avatar
Posts: 286 | Thanked: 219 times | Joined on Feb 2010 @ France
#136
Hi there! The application is almost finished. Need to build the .deb package now.

I made a small script in if.d :

Code:
#!/bin/sh
echo "$IFACE" >> /var/log/ifup.log
-----------------------

When I connect to the Wifi, $IFACE="wlan0", but when i connect to the 3G, $IFACE is empty instead of containing "gprs0".

Any idea why ?
Thanks.

UPDATE : it appears to be a known issue : https://bugs.maemo.org/show_bug.cgi?id=7733. Please vote!

Last edited by calvin_42; 2010-02-17 at 13:56. Reason: Bug found
 

The Following 3 Users Say Thank You to calvin_42 For This Useful Post:
Posts: 38 | Thanked: 16 times | Joined on Dec 2009
#137
Is there a way to establish the gprs0 connection from the command line/with a simple script?
 
Posts: 30 | Thanked: 5 times | Joined on Jan 2010
#138
installed this script around a week ago seemed to work fine till phone was re-booted . now doesnt work wifi never disconnects when idle.
 
calvin_42's Avatar
Posts: 286 | Thanked: 219 times | Joined on Feb 2010 @ France
#139
Originally Posted by hollow View Post
installed this script around a week ago seemed to work fine till phone was re-booted . now doesnt work wifi never disconnects when idle.
I've made an application here with a .deb package : https://garage.maemo.org/frs/?group_id=1353

Hope it will be on Extra-Devel soon.
 
Posts: 241 | Thanked: 69 times | Joined on Dec 2009 @ Germany
#140
Originally Posted by hollow View Post
installed this script around a week ago seemed to work fine till phone was re-booted . now doesnt work wifi never disconnects when idle.
after the system update some days ago, the script does not properly worl for me either. the connection seems to be taken down, but the connection manager show still connected but no packages can be received by any applkication. i had to manua
lly disconnect and reconnect wifi to make it work again
 
Reply

Tags
automatic, connect, connect automatically, connect on activity, connect on demand, connect on use, data, data connection, disconnect, disconnect automatically, disconnect when idle, fremantle, gprs, internet, maemo, maemo 5, n900, on demand, on use


 
Forum Jump


All times are GMT. The time now is 01:01.