00:35.46 | *** join/#maemo-ssu Sicelo (sicelo@us.members.bombshellz.net) |
00:35.46 | *** join/#maemo-ssu Sicelo (sicelo@unaffiliated/sicelo) |
00:37.56 | *** join/#maemo-ssu _xnt14 (~xnt14@2001:470:1f07:14cf:212:3fff:fe4f:3149) |
00:39.57 | *** join/#maemo-ssu chainsawbike (~chainsawb@unaffiliated/chainsawbike) |
01:18.21 | *** join/#maemo-ssu SpacedOut (david@SubSpace.fries.net) |
01:30.39 | SpacedOut | merlin1991: MohammadAG: I posted a merge request to osso-wlan on gitorious '#1: fix endless failed connection attempts' |
01:31.53 | SpacedOut | Trivial fix, someone forgot to NULL terminate the killall argument string. |
01:43.31 | nox- | `oops' |
01:51.20 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
02:17.49 | *** join/#maemo-ssu amiconn_ (amiconn@rockbox/developer/amiconn) |
02:41.07 | *** join/#maemo-ssu taziff (~Taziff@cyr108.internetdsl.tpnet.pl) |
02:56.54 | SpacedOut | At least osso-wlan has source, I'm not as sure what to do about 50_ipv4_network_setup which comes in a package that doesn't. That will call `ifconfig wlan0 0.0.0.0` to clear the ip address, but when it is run last it actually brings the interface up and sucks the battery dry, which happens frequently when I leave the access point, my solution is to change it to `ifconfig $interface 0.0.0.0 down` |
03:17.03 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
03:32.45 | *** join/#maemo-ssu taziff1 (~Taziff@cyr108.internetdsl.tpnet.pl) |
03:43.51 | *** join/#maemo-ssu M13 (~M13@170.133-224-87.telenet.ru) |
04:19.13 | *** join/#maemo-ssu taziff (~Taziff@cyr108.internetdsl.tpnet.pl) |
04:35.57 | *** join/#maemo-ssu taziff1 (~Taziff@cyr108.internetdsl.tpnet.pl) |
06:47.30 | DocScrutinizer05 | SpacedOut: niiiice |
07:04.23 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
07:51.01 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
08:00.20 | *** join/#maemo-ssu LaoLang_coo_ (~LaoLang_c@221.226.175.140) |
08:06.08 | *** join/#maemo-ssu Free-MG (~test@p5DD7C1E1.dip.t-dialin.net) |
08:25.06 | *** join/#maemo-ssu luf (~luf@ip-89-103-223-40.net.upcbroadband.cz) |
09:09.22 | *** join/#maemo-ssu M4rtinK (~M4rtinK@mail.melf.eu) |
09:11.05 | *** join/#maemo-ssu NIN101 (~NIN@p5DD286E7.dip0.t-ipconnect.de) |
10:26.48 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
10:30.19 | *** join/#maemo-ssu mase76 (~mase76@p5DD39967.dip.t-dialin.net) |
10:41.57 | *** join/#maemo-ssu M13 (~M13@170.133-224-87.telenet.ru) |
11:52.23 | *** join/#maemo-ssu mase76 (~mase76@p5DD39967.dip.t-dialin.net) |
12:09.54 | *** join/#maemo-ssu zeq (~s_j_newbu@2a01:348:1e3:1:e6ec:10ff:fe9a:d418) |
12:34.18 | *** join/#maemo-ssu LaoLang_cool (~LaoLang_c@221.226.175.140) |
12:58.01 | *** join/#maemo-ssu MrPingu (~MrPingu@86.92.226.97) |
13:57.00 | *** join/#maemo-ssu _rd (~rd@p57B49917.dip0.t-ipconnect.de) |
14:02.45 | *** join/#maemo-ssu MrPingu (~MrPingu@86.92.226.97) |
14:15.10 | *** join/#maemo-ssu mase76 (~mase76@p5DD39967.dip.t-dialin.net) |
14:18.18 | *** join/#maemo-ssu DocScrutinizer (~halley@openmoko/engineers/joerg) |
14:18.39 | *** join/#maemo-ssu DocScrutinizer05 (~HaleBopp@openmoko/engineers/joerg) |
14:27.45 | *** join/#maemo-ssu Free-MG (~test@p5DD7C1E1.dip.t-dialin.net) |
14:30.48 | DocScrutinizer05 | SpacedOut: IIRC the wlan needs `modprobe -r wl12xx` to stop the chip from sucking battery |
14:31.58 | DocScrutinizer05 | seems the wl12xx.ko driver doesn't support powering down the chip in any other way |
14:33.07 | MrPingu | Does wifiswitcher unload the wl12xx module? |
14:33.36 | kerio | DocScrutinizer05: really? :o |
14:34.09 | kerio | why should it use power if the interface is down? |
14:36.01 | DocScrutinizer05 | hooray, my desktop PC mouse buttons are fscked again, on a system level |
14:36.21 | DocScrutinizer05 | rather, X11 is fsckd |
14:36.25 | DocScrutinizer05 | kinda |
14:36.57 | DocScrutinizer05 | plasma and highlighting texts in any window borked |
14:42.49 | DocScrutinizer05 | fixed it, ssh xterm hijacked the mouse :-S |
14:43.21 | DocScrutinizer05 | anyway, this is what happens when device decides to scan for new available WLAN AP: |
14:43.25 | DocScrutinizer05 | Aug 12 16:38:54 IroN900 kernel: [102724.898712] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a780 |
14:43.27 | DocScrutinizer05 | Aug 12 16:38:54 IroN900 kernel: [102724.914428] wl1251: firmware booted (Rev 4.0.4.3.7) |
14:43.28 | DocScrutinizer05 | Aug 12 16:38:54 IroN900 wlancond[1608]: Scan issued |
14:44.08 | DocScrutinizer05 | and this when I switch from WLAN to GPRS: |
14:44.17 | DocScrutinizer05 | Aug 12 16:33:52 IroN900 wlancond[1608]: Setting BSSID 00:00:00:00:00:00 |
14:44.18 | DocScrutinizer05 | Aug 12 16:33:52 IroN900 wlancond[1608]: Setting SSID: |
14:44.20 | DocScrutinizer05 | Aug 12 16:33:53 IroN900 kernel: [102423.563049] wl1251: down |
14:45.03 | DocScrutinizer05 | lemme try again and check if wl12xx.ko is loaded or not during WLAN disconnected |
14:49.44 | DocScrutinizer05 | hmm, seems module isn't rmmod'ed |
14:50.33 | DocScrutinizer05 | maybe my info is a tad obsolete and they fixed that with later PR1.n updates |
14:51.30 | DocScrutinizer05 | andre__ might know, he can scan the NB bugtracker |
14:56.14 | *** part/#maemo-ssu kerio (kerio@unaffiliated/kerio) |
15:07.42 | Raimu | http://www.youtube.com/watch?v=IEpQFk7_C8c |
15:07.51 | Raimu | ...jeeze, wrong channel. /retract |
15:08.05 | Raimu | Sorry. I don't suppose there're ardent Joy Division fans here. |
15:09.00 | *** join/#maemo-ssu kerio (kerio@unaffiliated/kerio) |
15:24.23 | *** join/#maemo-ssu zeq (~s_j_newbu@2a01:348:1e3:1:e6ec:10ff:fe9a:d418) |
15:48.51 | DocScrutinizer05 | joy division, you bet I adore :-) |
16:02.11 | SpacedOut | DocScrutinizer: I'm watching /sys/class/power_supply/bq27200-0/current_now idle on an access point with the screen off is giving about the same numbers as not connected with wlan0 down 6426 to 18028, `ifconfig wlan0 up` gives 202954, then `ifconfig wlan0 down` returns back to the same low values. |
16:03.01 | DocScrutinizer05 | /sys/class/power_supply/bq27200-0/current_now quite probably is massive fake anyway |
16:03.13 | DocScrutinizer05 | err nope, sorry |
16:03.34 | SpacedOut | My observation is, it is sucking a lot of power when wlan0 is up and not doing power save mode, which is always when up and not associated, so far power draw is good when it is actually down as observed with ifconfig. |
16:03.34 | DocScrutinizer05 | I missread |
16:04.35 | DocScrutinizer05 | :nod: |
16:05.04 | DocScrutinizer05 | that's expected |
16:05.41 | DocScrutinizer05 | I guess in PR1.0 they had a bug in wl12xx.ko that didn't allow to switch down the chip's scanning with ifdown |
16:08.21 | *** join/#maemo-ssu javispedro (~javier@Maemo/community/contributor/javispedro) |
16:08.50 | SpacedOut | Any suggestions on how to or where to push out an updated /etc/maemo-dhcp.d/50_ipv4_network_setup script, that package doesn't have source and it will `/sbin/ifconfig $interface 0.0.0.0` in trying to clear the ip address, but that will bring it up if it was down. There is a race and it can run after what should bring it down and drain the battery. I've been bitten by this many times when I leave an access point. |
16:09.24 | SpacedOut | My solution is to add down to the command, so I'm good, but I would like to spread it around. |
16:31.34 | *** join/#maemo-ssu test__ (~test@p4FFE7306.dip.t-dialin.net) |
16:39.35 | DocScrutinizer05 | should go to CSSU-T I guess, after proper testing |
16:39.47 | DocScrutinizer05 | pkg name? nfc |
16:40.37 | DocScrutinizer05 | invent sth if you can't find which is the pkg that ships this file |
16:46.20 | DocScrutinizer05 | SpacedOut: first I suggest you open a ticket |
16:46.39 | DocScrutinizer05 | nice point to collect all related stuff |
16:47.56 | SpacedOut | The script is in libicd-network-ipv4 but the package source isn't available. |
17:00.51 | DocScrutinizer05 | shit |
17:02.15 | DocScrutinizer05 | libicd-network-ipv4__patch-<BMOnumber> |
17:03.04 | DocScrutinizer05 | force the friggin script in via postinstall or whatever |
17:03.32 | DocScrutinizer05 | BMOnumber = ticket number on bugtracker |
17:04.13 | DocScrutinizer05 | but please check that suggestion with merlin1991 |
17:04.37 | DocScrutinizer05 | or MohammadAG, or chem|st, or any of our packaging experts |
17:05.31 | DocScrutinizer05 | first open a ticket ;-) |
17:05.48 | SpacedOut | Makes sense I'll create a package for that. sed can edit scripts in place, that might be safest. Would I create the bug report, post the package to the extras, update the bug report with the package? |
17:06.05 | DocScrutinizer05 | :nod: |
17:06.17 | DocScrutinizer05 | err |
17:06.44 | DocScrutinizer05 | not to extras, it's not really fit for extras, since it messes with system stuff |
17:07.24 | DocScrutinizer05 | well, you may do it like that, but it's a pretty unclean way, I'd prefer to keep it in CSSU, it's meant for that |
17:08.16 | DocScrutinizer05 | if you publish via extras, we need to consider how we ever could include it in CSSU too, without creating weird conflicts |
17:09.35 | SpacedOut | How about I create the package and add it as an attachment to the bug report and let someone else figure out where it should go? |
17:09.37 | DocScrutinizer05 | but, as mentioned above, that's not exactly my domain. Please ask our packagers/maintainers how to handle that |
17:09.46 | DocScrutinizer05 | yep |
17:10.08 | DocScrutinizer05 | best practice, I guess |
17:14.35 | kerio | SpacedOut: does it work fine in all situations with your addition? |
17:16.43 | SpacedOut | So far. Can you think of any case that dhcp would be calling /etc/maemo-dhcp.d/50_ipv4_network_setup deconfig, to remove an ip address and expect the interface to stay up? |
17:17.31 | kerio | \_o_/ |
17:17.44 | kerio | weird shit with gprs0/phonet maybe? |
17:18.54 | SpacedOut | The options to that script are static, bound, renew, zeroconf for setting an ip, deconfig, zeroconf.deconfig for removing it and zeroconf.dhcpup which does nothing. The change is to down the interface for deconfig, zeroconf.deconfig. |
17:21.47 | kerio | hm |
17:21.53 | DocScrutinizer05 | SpacedOut: I gather the bug *I* found several times is unrelated? bug: networks stays associated to an AP 100km away |
17:22.14 | SpacedOut | phonet0 has never had an ip address that I've seen, so I wouldn't expect dhcp to be involved. I've never seen it go down because of the change. As far as gprs goes, I can't think of when it would be up with dhcp, and dhcp then removing the ip address and wanting to left up. |
17:23.07 | kerio | meh, good enough for me |
17:23.30 | kerio | just add " down" after "0.0.0.0"? |
17:24.13 | DocScrutinizer05 | SpacedOut: GPRS needs a renewal of IP every 24h. Alas the renewal time the carrier delivers with DHCP isn't in sync with the forced "disconnect" after 24h (maybe a German iniosyncrasy) |
17:24.49 | SpacedOut | I would expect it to be unrelated. Does iwconfig list an access point? The 'internet connection' ui in this case acts as if you manually disconnected from the access point, ie it doesn't know that wlan0 is up, and just scanning once will bring it back down (and the battery drain). |
17:25.08 | DocScrutinizer05 | actually after 24h my GPRS connection stalls and I need to tear it down and re-establish it |
17:25.11 | SpacedOut | kerio: yes |
17:27.01 | SpacedOut | I've not been on gprs for 24 hours at a time to see that problem. |
17:27.20 | kerio | and that's why the patch shouldn't be blindly added to cssu :) |
17:27.48 | kerio | SpacedOut: are you sure about "down" in zeroconf.deconfig? |
17:31.28 | SpacedOut | I put it in there, but I've never seen zeroconf used on my N900. First question, does it work without down? Now that I look at it I think the answer is no. |
17:31.28 | kerio | SpacedOut: ping |
17:31.38 | SpacedOut | /sbin/ifconfig $interface:1 $ip 0.0.0.0 |
17:31.46 | DocScrutinizer05 | SpacedOut: (AP 100km away) the phone simply doesn't show any sign of realizing that the AP got out of range - except some "beacon missing" or "signal low" msg in syslog |
17:32.39 | SpacedOut | How is that valid? It is giving two ip addresses, on my desktop, `ifconfig eth1:3 0.0.0.0` gives SIOCSIFFLAGS: Cannot assign requested address, `ifconfig eth1:3 192.168.4.3 0.0.0.0` also SIOCSIFFLAGS: Cannot assign requested address |
17:33.25 | kerio | DocScrutinizer05: it's a really optimistic phone! :D |
17:34.00 | kerio | SpacedOut: meh, i'm just going to ignore the zeroconf stuff |
17:34.05 | DocScrutinizer05 | indeed, for some reason it hopes for re-associate eventually succeeding |
17:34.32 | SpacedOut | Interestingly though either complains but the ip alias interface does go down anyway, so it could be fixed to just be `/sbin/ifconfig $interface:1 down` to avoid the error or left alone. |
17:35.47 | kerio | i added "down" on the deconfig on my phone, i'll report eventual problems |
17:36.10 | DocScrutinizer05 | SpacedOut: consider logger lines in that script, to monitor what's actually going on, also for later QA/testing/debugging |
17:36.17 | SpacedOut | DocScrutinizer: As in it is listed in the 'internet connections' access point list? Do local access points show up? I can't see it being related to this. |
17:36.56 | DocScrutinizer05 | SpacedOut: It simply shows the AP as current internet connection |
17:37.21 | DocScrutinizer05 | and internet access is stalled |
17:37.56 | DocScrutinizer05 | of course other AP show up |
17:38.38 | DocScrutinizer05 | since I fix those issues by simply manually switching to my home AP after I left the pub to which the connection sticks |
17:38.44 | SpacedOut | kerio: I'm not that good about watching the IRC channel, David@Fries.net to contact me. I have also seen the bluetooth eat up power when going out of access point range as they are tied with the coexist antenna logic, but that's unrelated to wlan0 being left up. |
17:41.17 | SpacedOut | I actually replaced ifconfig with a program of mine to log who was calling ifconfig and what the time was to prove that it was sometimes before zz_static_ip_if (which explicitly downs the network) and sometimes after. What would a line to log it look like? It would need to be added to both scripts. |
17:43.29 | DocScrutinizer05 | man logger |
17:45.39 | DocScrutinizer05 | sth like `logger -i -s -t ifconfig-patch "whatever message to tell" ` |
17:48.13 | DocScrutinizer05 | maybe -p kern.debug |
17:51.56 | *** join/#maemo-ssu mase_76 (~mase76@p5DD391D9.dip.t-dialin.net) |
17:52.18 | SpacedOut | Since `patch` isn't installed on the N900 by default I would like to use sed, which means it needs to all be on one line. adding logger would make it a long line. |
17:54.38 | DocScrutinizer05 | hmm? |
17:54.57 | DocScrutinizer05 | sed can do awesome things |
17:56.58 | DocScrutinizer05 | like insert lines, replace one line by 3 lines (s/abc/abc\ndef\nghk/), delete lines, append lines, by line number, line range, relative to file start or end, whatnot else |
18:01.05 | *** join/#maemo-ssu taziff (~Taziff@cyr108.internetdsl.tpnet.pl) |
18:01.15 | DocScrutinizer05 | diff -e |
18:01.40 | DocScrutinizer05 | <PROTECTED> |
18:02.40 | DocScrutinizer05 | . |
18:02.50 | DocScrutinizer05 | Upon startup, patch attempts to determine the type of the diff listing, unless overruled by a -c (--context), -e (--ed), -n (--normal), or -u (--unified) option. Context diffs (old-style, new-style, and unified) and normal diffs are applied by the patch program itself, while ed diffs are simply fed to the ed(1) editor via a pipe. |
18:05.13 | SpacedOut | kerio: Blast it, I normally use static ip addresses on my home system, the fix works fine there, but putting 'down' in there is failing to connect when using dhcp, now I don't know how to both fix my problem, that darn deconfig and support dhcp. |
18:05.19 | DocScrutinizer05 | afaik the only difference between sed and ed is: sed takes data to edit from stdin, while ed opens a file to edit and takes commands from stdin |
18:09.56 | SpacedOut | This situation needs an ifconfig that will clear the ip address without implicitly bringing it up, leave it up or down, whichever way it found it. |
18:13.27 | *** join/#maemo-ssu Free-MG (~test@p4FFE7306.dip.t-dialin.net) |
18:19.09 | zeq | SpacedOut: unfortunately iproute2 isn't installed by default |
18:28.11 | SpacedOut | I guess that means parse ifconfig output to see if it is down, and if it is then down it after clearing the ip address. |
18:33.50 | SpacedOut | But it is a race condition, if this sees it up, the other script puts it down, this will still up it setting the ip address to 0.0.0.0 and since it was up when it checked it will leave it up. loose loose |
19:04.25 | DocScrutinizer05 | well, then implement a 'mutex': killall -SIGSTOP 'concurrent-script'; test state; (killall -9 'concurrent-script'?); ifconfig-change-state; (killall -SIGCONT (-SIGUSR1) 'concurrent-script') |
19:05.41 | *** join/#maemo-ssu nox- (noident@freebsd/developer/nox) |
19:13.02 | DocScrutinizer05 | not that I suggest this is the best and only way to fix your problem, I don't even completely understand it |
19:13.13 | SpacedOut | And if the other script already execed `ifconfig wlan0 down` but hasn't put it down before the check? I'm thinking I might write ifzeroipv4 to check the current interface state, clear the ip address if set, and leave the flags up/down alone. |
19:16.32 | SpacedOut | The problem is when the access point goes out of range it scans for a suitable network, finds none, icd2 initiates both zz_static_ip_if_down (which uses ifconfig to down the interface) and 50_ipv4_network_setup which if run second will bring the interface back up, which is left up and drains the battery. |
19:17.52 | DocScrutinizer05 | the design seems fundamentally flawed |
19:18.49 | DocScrutinizer05 | those two scripts mustn't run concurrently |
19:19.14 | DocScrutinizer05 | if anything they shall get executed one after the other |
19:19.25 | SpacedOut | Yes, I can think of various hacks such as wlancond setting up a timer and making sure the interface is down after a bit. |
19:19.28 | DocScrutinizer05 | or even merged into one |
19:21.07 | SpacedOut | As both scripts are in packages without source I don't see that happening. |
19:21.16 | DocScrutinizer05 | the obvious method is to check for a process named "script1" and wait for it quitting, as first action in "script2" |
19:23.21 | DocScrutinizer05 | script2 == zz_static_ip_if_down, script1 == 50_ipv4_network_setup |
19:24.23 | SpacedOut | I'm really leaning to a custom ifconfig that only clears the ip address and leaves the interface up or down, however it found it. |
19:30.03 | SpacedOut | kerio: adding 'down' prevents connections when using dhcp, I was only using static ip addresses for testing so I didn't find that until I did further testing, sorry about that. |
20:24.34 | *** join/#maemo-ssu kgu (~kgu@freebox.dk) |
21:04.15 | *** join/#maemo-ssu taziff (~Taziff@cyr108.internetdsl.tpnet.pl) |
21:16.04 | *** join/#maemo-ssu MrPingu (~MrPingu@86.92.226.97) |
21:23.15 | zeq | SpacedOut: I don't know if you could just find sysfs entries to perform the needed ops? |
21:28.58 | SpacedOut | I hadn't thought of that. Looking for wlan0 (and my desktop), it seems to only address the device, address is the MAC and other more hardware pieces of data. If it is there I don't see it. |
21:29.39 | SpacedOut | I did write a little program that does just what I want, clear the ip address don't touch the up/down status. I plan on going with that for a solution. |