IRC log for #maemo-ssu on 20120812

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.39SpacedOutmerlin1991: MohammadAG: I posted a merge request to osso-wlan on gitorious '#1: fix endless failed connection attempts'
01:31.53SpacedOutTrivial fix, someone forgot to NULL terminate the killall argument string.
01:43.31nox-`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.54SpacedOutAt 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.30DocScrutinizer05SpacedOut: 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.48DocScrutinizer05SpacedOut: IIRC the wlan needs `modprobe -r wl12xx` to stop the chip from sucking battery
14:31.58DocScrutinizer05seems the wl12xx.ko driver doesn't support powering down the chip in any other way
14:33.07MrPinguDoes wifiswitcher unload the wl12xx module?
14:33.36kerioDocScrutinizer05: really? :o
14:34.09keriowhy should it use power if the interface is down?
14:36.01DocScrutinizer05hooray, my desktop PC mouse buttons are fscked again, on a system level
14:36.21DocScrutinizer05rather, X11 is fsckd
14:36.25DocScrutinizer05kinda
14:36.57DocScrutinizer05plasma and highlighting texts in any window borked
14:42.49DocScrutinizer05fixed it, ssh xterm hijacked the mouse :-S
14:43.21DocScrutinizer05anyway, this is what happens when device decides to scan for new available WLAN AP:
14:43.25DocScrutinizer05Aug 12 16:38:54 IroN900 kernel: [102724.898712] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a780
14:43.27DocScrutinizer05Aug 12 16:38:54 IroN900 kernel: [102724.914428] wl1251: firmware booted (Rev 4.0.4.3.7)
14:43.28DocScrutinizer05Aug 12 16:38:54 IroN900 wlancond[1608]: Scan issued
14:44.08DocScrutinizer05and this when I switch from WLAN to GPRS:
14:44.17DocScrutinizer05Aug 12 16:33:52 IroN900 wlancond[1608]: Setting BSSID 00:00:00:00:00:00
14:44.18DocScrutinizer05Aug 12 16:33:52 IroN900 wlancond[1608]: Setting SSID:
14:44.20DocScrutinizer05Aug 12 16:33:53 IroN900 kernel: [102423.563049] wl1251: down
14:45.03DocScrutinizer05lemme try again and check if wl12xx.ko is loaded or not during WLAN disconnected
14:49.44DocScrutinizer05hmm, seems module isn't rmmod'ed
14:50.33DocScrutinizer05maybe my info is a tad obsolete and they fixed that with later PR1.n updates
14:51.30DocScrutinizer05andre__ might know, he can scan the NB bugtracker
14:56.14*** part/#maemo-ssu kerio (kerio@unaffiliated/kerio)
15:07.42Raimuhttp://www.youtube.com/watch?v=IEpQFk7_C8c
15:07.51Raimu...jeeze, wrong channel. /retract
15:08.05RaimuSorry. 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.51DocScrutinizer05joy division, you bet I adore :-)
16:02.11SpacedOutDocScrutinizer: 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.01DocScrutinizer05/sys/class/power_supply/bq27200-0/current_now  quite probably is massive fake anyway
16:03.13DocScrutinizer05err nope, sorry
16:03.34SpacedOutMy 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.34DocScrutinizer05I missread
16:04.35DocScrutinizer05:nod:
16:05.04DocScrutinizer05that's expected
16:05.41DocScrutinizer05I 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.50SpacedOutAny 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.24SpacedOutMy 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.35DocScrutinizer05should go to CSSU-T I guess, after proper testing
16:39.47DocScrutinizer05pkg name? nfc
16:40.37DocScrutinizer05invent sth if you can't find which is the pkg that ships this file
16:46.20DocScrutinizer05SpacedOut: first I suggest you open a ticket
16:46.39DocScrutinizer05nice point to collect all related stuff
16:47.56SpacedOutThe script is in libicd-network-ipv4 but the package source isn't available.
17:00.51DocScrutinizer05shit
17:02.15DocScrutinizer05libicd-network-ipv4__patch-<BMOnumber>
17:03.04DocScrutinizer05force the friggin script in via postinstall or whatever
17:03.32DocScrutinizer05BMOnumber = ticket number on bugtracker
17:04.13DocScrutinizer05but please check that suggestion with merlin1991
17:04.37DocScrutinizer05or MohammadAG, or chem|st, or any of our packaging experts
17:05.31DocScrutinizer05first open a ticket ;-)
17:05.48SpacedOutMakes 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.05DocScrutinizer05:nod:
17:06.17DocScrutinizer05err
17:06.44DocScrutinizer05not to extras, it's not really fit for extras, since it messes with system stuff
17:07.24DocScrutinizer05well, 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.16DocScrutinizer05if you publish via extras, we need to consider how we ever could include it in CSSU too, without creating weird conflicts
17:09.35SpacedOutHow 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.37DocScrutinizer05but, as mentioned above, that's not exactly my domain. Please ask our packagers/maintainers how to handle that
17:09.46DocScrutinizer05yep
17:10.08DocScrutinizer05best practice, I guess
17:14.35kerioSpacedOut: does it work fine in all situations with your addition?
17:16.43SpacedOutSo 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.31kerio\_o_/
17:17.44kerioweird shit with gprs0/phonet maybe?
17:18.54SpacedOutThe 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.47keriohm
17:21.53DocScrutinizer05SpacedOut: I gather the bug *I* found several times is unrelated? bug: networks stays associated to an AP 100km away
17:22.14SpacedOutphonet0 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.07keriomeh, good enough for me
17:23.30keriojust add " down" after "0.0.0.0"?
17:24.13DocScrutinizer05SpacedOut: 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.49SpacedOutI 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.08DocScrutinizer05actually after 24h my GPRS connection stalls and I need to tear it down and re-establish it
17:25.11SpacedOutkerio: yes
17:27.01SpacedOutI've not been on gprs for 24 hours at a time to see that problem.
17:27.20kerioand that's why the patch shouldn't be blindly added to cssu :)
17:27.48kerioSpacedOut: are you sure about "down" in zeroconf.deconfig?
17:31.28SpacedOutI 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.28kerioSpacedOut: ping
17:31.38SpacedOut/sbin/ifconfig $interface:1 $ip 0.0.0.0
17:31.46DocScrutinizer05SpacedOut: (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.39SpacedOutHow 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.25kerioDocScrutinizer05: it's a really optimistic phone! :D
17:34.00kerioSpacedOut: meh, i'm just going to ignore the zeroconf stuff
17:34.05DocScrutinizer05indeed, for some reason it hopes for re-associate eventually succeeding
17:34.32SpacedOutInterestingly 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.47kerioi added "down" on the deconfig on my phone, i'll report eventual problems
17:36.10DocScrutinizer05SpacedOut: consider logger lines in that script, to monitor what's actually going on, also for later QA/testing/debugging
17:36.17SpacedOutDocScrutinizer: 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.56DocScrutinizer05SpacedOut: It simply shows the AP as current internet connection
17:37.21DocScrutinizer05and internet access is stalled
17:37.56DocScrutinizer05of course other AP show up
17:38.38DocScrutinizer05since I fix those issues by simply manually switching to my home AP after I left the pub to which the connection sticks
17:38.44SpacedOutkerio: 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.17SpacedOutI 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.29DocScrutinizer05man logger
17:45.39DocScrutinizer05sth like `logger -i -s -t ifconfig-patch "whatever message to tell" `
17:48.13DocScrutinizer05maybe -p kern.debug
17:51.56*** join/#maemo-ssu mase_76 (~mase76@p5DD391D9.dip.t-dialin.net)
17:52.18SpacedOutSince `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.38DocScrutinizer05hmm?
17:54.57DocScrutinizer05sed can do awesome things
17:56.58DocScrutinizer05like 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.15DocScrutinizer05diff -e
18:01.40DocScrutinizer05<PROTECTED>
18:02.40DocScrutinizer05.
18:02.50DocScrutinizer05Upon 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.13SpacedOutkerio: 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.19DocScrutinizer05afaik 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.56SpacedOutThis 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.09zeqSpacedOut: unfortunately iproute2 isn't installed by default
18:28.11SpacedOutI 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.50SpacedOutBut 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.25DocScrutinizer05well, 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.02DocScrutinizer05not that I suggest this is the best and only way to fix your problem, I don't even completely understand it
19:13.13SpacedOutAnd 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.32SpacedOutThe 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.52DocScrutinizer05the design seems fundamentally flawed
19:18.49DocScrutinizer05those two scripts mustn't run concurrently
19:19.14DocScrutinizer05if anything they shall get executed one after the other
19:19.25SpacedOutYes, 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.28DocScrutinizer05or even merged into one
19:21.07SpacedOutAs both scripts are in packages without source I don't see that happening.
19:21.16DocScrutinizer05the obvious method is to check for a process named "script1" and wait for it quitting, as first action in "script2"
19:23.21DocScrutinizer05script2 == zz_static_ip_if_down, script1 == 50_ipv4_network_setup
19:24.23SpacedOutI'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.03SpacedOutkerio: 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.15zeqSpacedOut: I don't know if you could just find sysfs entries to perform the needed ops?
21:28.58SpacedOutI 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.39SpacedOutI 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.

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.