libera/#maemo-leste/ Sunday, 2022-08-28

freemangordonWizzup: why is not connui-cellular beowulf-devel not merged to master? shall I merge it?16:55
Wizzupfreemangordon: lots of wip commits16:55
Wizzupeventually it needs to be merged yeah16:55
freemangordonshall I merge now?16:56
freemangordonas I am going to call pinui from status menu plygin16:56
freemangordon*plugin16:58
freemangordonWizzup: shall we revert https://github.com/maemo-leste/connui-cellular/commit/67a318dd198a98d8c3279f6078c083e9fc4cdb7b ?17:16
freemangordonremoving sleep 1517:16
freemangordonOTOH, maybe it does not make much sense to call it at all, given hot-plug functionality17:20
Wizzupfreemangordon: this also removes the call to the startup pin entry17:21
Wizzupfreemangordon: do you mean https://github.com/maemo-leste/connui-cellular/commit/fcc709919a836a9aa6d5833697b36627a035ba2017:21
freemangordonumm...17:22
freemangordonI mean both it seems17:22
freemangordonas 67a318dd198a98d8c3279f6078c083e9fc4cdb7b disables strtup-pin-query17:22
freemangordonI remember there was some issue on n90017:22
freemangordonis it still there?17:22
Wizzupwell, one just waits17:25
Wizzupthe other stops calling pinentry alltogether17:25
freemangordonmhm17:31
Wizzupdepending on how you do it in status applet I am fine with removing the xession17:32
Wizzupxsession*17:33
freemangordonI think it is better to stay17:34
freemangordonbut, I'll have to do some flock() trickery17:34
Wizzupwhy?17:34
Wizzupto prevent having two run at once?17:34
freemangordonotherwise it will become racy17:34
freemangordonmhm17:34
Wizzupthen just remove it from xsession imho17:34
WizzupI think the main thing is that this is for matchbox (non h-d) workflow17:34
Wizzupwhere it shows pinentry and nothing else is started17:34
Wizzupbut on several of our devices this is not feasible due to how slow modem is to see sim17:35
freemangordonIIUC, the xsession thingie is to prevent you from using the device with sim17:35
freemangordonthat's pin-locked that is17:35
Wizzupthen just take out the sim :)17:36
Wizzupand you get the device17:36
freemangordonsure17:36
freemangordonyeah, lets remove xsession script17:36
freemangordonstill, we may have race17:37
freemangordonbetween control panel and status menu17:37
Wizzupwell the main UX problem is that we will randomly have startup pinentry run17:37
freemangordonit seems thats what android does17:37
freemangordonI tried it17:37
Wizzupok17:37
freemangordonand TBH I cannot come up with any better idea17:37
freemangordonif you have one, please share17:38
freemangordonlets count on that by the time status menu starts, SIM will already be there17:38
freemangordonso it will be more or less similar to xsession17:39
freemangordonstill, some flock will be needed17:40
freemangordonor exclusive open17:40
freemangordonor not?17:41
Wizzup17:38 < freemangordon> lets count on that by the time status menu starts, SIM will already be there17:55
Wizzupthat won't be the case jfyi17:55
freemangordonon n900 it will be17:55
Wizzupthe xsession also doesn't work in the d4 because it takes over two minutes after module probe17:55
freemangordonwill see17:56
freemangordonbut anyway, I think we already agreed to remove xsession, no?17:56
Wizzupsure17:56
freemangordonI think it will happen way faster if we online the modem17:58
freemangordonan dI guess we can keep that in xsession17:58
freemangordonhmm, actually it is better to keep it there17:59
freemangordonas it asks you to exit flight mode17:59
freemangordonso I will add a parameter18:00
freemangordonwhether to wait for sim or not18:00
Wizzupok18:00
freemangordonand if not in flightmode to online the modem18:00
Wizzupinstead of icd2?18:01
freemangordonwell, icd onlines the modem only if you open the connections dialog, no?18:01
freemangordonwe want modem online way earlier18:02
freemangordonalso, IIRC icd2 does it only if needed18:02
freemangordonso we will want to keep the code there18:02
freemangordonexample:18:02
freemangordonflightmode on boot, you say "do not exit flightmode" to SPQ, then you select connections dialog and wat to exit flightmode18:03
freemangordons/wat/want18:03
freemangordonicd2 onlines the modem18:03
freemangordonmakes sense?18:03
Wizzupok18:09
uvosandroid dosent randomly have pinentry run btw18:10
uvosthis is a quirk of the motorola implementation18:10
freemangordonhow does it handle sim swap?18:11
uvosit runs "randomly" (well directly after sim insertion)18:11
uvosbut on statup it waits18:11
uvosso that the device cant be used with locked sim18:11
freemangordonsame18:12
uvosbut imo this bhavior is sensless security theater18:12
freemangordonmhm18:12
freemangordonugh, ofono crashed18:17
Wizzupuvos: directly after sim insertion, or two minutes after sim insertion?18:18
uvospretty fast18:18
uvosnot 2 minutes18:18
uvosseveral seconds18:18
uvosbut its incosistant18:18
uvosi have seen it not see the sim for quite some time on boot for instanve18:19
uvos*instance18:19
uvosbut usualy its fairly fast18:19
uvosi dont think i have ever seen android take 2 minutes18:19
uvosmore like 30s tops but usally <1018:20
freemangordonuvos: I think mce shall send SCRN on startup as well18:21
freemangordonnot only on unlock18:21
uvosdose the modem start with scrn=0?18:21
uvosthen sure yes18:21
freemangordonI guess18:21
freemangordonas it is offline18:21
uvosbut i dose send scrn=1 or?18:22
freemangordonno18:22
uvossince the display datapipe is triggerd on startup18:22
uvosit should i think18:22
freemangordonlemme paste18:22
uvosthe question is if we want mce to do this directly at all18:22
uvosor if ofono can somehow abstract it?18:23
uvosmabye it has modem idle states?18:23
uvosthat we could wire up18:23
freemangordonsee https://pastebin.com/7H3atLkC18:23
freemangordonwell, I guess we can write ofono plugin (like the one for upower)18:23
freemangordonthat handles screen lock/unlock18:23
uvossure18:23
uvosif we can teach ofono to abstract scrn18:24
uvosthat would then be best since it would work on other devices too18:24
freemangordonit shoudl already have some support for power states18:24
freemangordonmhm18:24
freemangordonsee pastebin^^^18:24
freemangordonthis is boot log18:24
freemangordonSCRN comands you see are screen lock/screen unlock18:24
freemangordonimmediately after SCRN=1 you have MSIM18:25
uvosand modem dosent send rssi after onlineing it?18:25
freemangordonit is offline18:25
uvosif you dont set SCRN=118:25
uvosby hand18:25
freemangordonI modem is offline18:25
uvossure but if you dont start mce at all and online the modem18:25
uvosdose it then start reporting rssi18:25
uvosi think it dose iirc18:25
freemangordonI don;t care about RSSI18:25
freemangordonbut about MSIM18:25
uvosbut thats what scrn dose mainly no?18:26
uvosenable disable rssi?18:26
freemangordonnot so sure18:26
freemangordonmaybe it affects MSIM as well18:26
uvoshmm18:26
freemangordonsee the log18:26
freemangordonabout a second after SCRN:OK we have MSIM18:26
freemangordoncould be coincidence, but I doubt18:27
uvosthat might just be scrn kicking the modem18:27
uvostry issueing something else18:27
freemangordonlemme keep it unlocked and see18:27
freemangordonright18:28
freemangordonit is kicking the modem18:28
uvosWizzup seeing sim after 2 min18:29
uvosis probubly mces 2min kick timer18:29
uvos(it also explicitly kicks it at this interval)18:29
freemangordonif he relock he will see sooner :)18:29
uvosso the kernel is missing an irq or something is going on18:30
freemangordonmhm18:30
freemangordonWizzup: what is the cheapest (code-wise) way to call "online-modem"?19:10
freemangordonhmm, do we plan to support hot-plugging of modems?19:15
uvoswe must for pp19:15
uvosbecause of the kill switch19:16
uvosiiuc19:16
freemangordonThe more I think about that, the more I am getting convinced we must have a daemon that takes care of modems19:16
uvosthats kinda ofono tho no?19:16
freemangordonNot really19:17
freemangordonyou shoudl explicitly enable and online the modems19:17
freemangordonunless we are in flight mode19:17
freemangordonWizzup: shall I extend icd2 ofono plugin?19:17
freemangordonto take care of flight mode and online/offline modems according to it?19:18
Wizzupthat is possible, but I think we should also think if we should maybe have one thing 'manage' most of this, and if that should be icd219:28
Wizzupthe icd2 one if libgofono atm19:29
Wizzupone if -> one is19:29
WizzupI know how to make the context code work well now I think, but I didn't write it yet19:29
freemangordonWizzup: that's why I want to implement onlining the modem in icd2 ofono plugin19:45
freemangordonah, "if that"19:45
freemangordonwell...19:46
freemangordonicd2 already has lots of code for that19:46
freemangordonbut yeah, we shall decide on it19:47
freemangordonwhether to write some daemon or extend icd219:47
Wizzupright19:52
freemangordonhonestly, I think daemon is the correct thing to do19:52
freemangordoncellulard? celld?19:54
Wizzupfreemangordon: I would just make it part of some daemon imho20:14
Wizzupmaybe mce20:14
Wizzupor maybe just icd220:14
Wizzupbut I suppose uninstalling icd2 internet context plugin should not break modem20:14
freemangordonI don't think mce is tha correct place20:15
freemangordon*the20:15
freemangordonwhy not dedicated daemon?20:15
WizzupI don't really like more daemons I suppose, but I guess we can20:17
WizzupI guess nokia had its own daemon20:17
Wizzup(csd?)20:17
freemangordonmhm20:17
freemangordonand not only20:17
Wizzupand all this would do it power and online modem depending on offline mode?20:17
Wizzupwould do is*20:17
freemangordonmhm20:18
WizzupI mean it feels a bit much to have a modem just for that20:18
freemangordonI guess you mean 'daemon just...'20:18
Wizzuponline/offline "mode" might fit mce's mode plugins20:18
Wizzupfreemangordon: yes20:18
freemangordonbut then we shall teach mce to talk to ofono20:18
Wizzupin a plugin over dbus, right20:19
freemangordonand mce shall run in actdead as wll20:19
WizzupI suppose it also saves some ram if we do it this way20:19
WizzupI don't mind the separate daemon, but yeah20:19
freemangordonnot really, as it will be .launch anyway20:19
freemangordonso there will be almost no overhead, if any20:19
sfaHello20:20
freemangordonhello20:20
freemangordonWizzup: so, cellulard?20:20
Wizzupfreemangordon: if you ask me mce is a good fit really20:20
Wizzupbut I am fine with either I suppose20:20
sfaI just installed Maemo-Leste on my Pinephone .... I used to ues Maemo on my N810 many years ago.20:20
freemangordonno, please, lets not make yet another systemd20:20
freemangordonI mean...20:21
Wizzupfreemangordon: it's literally a mode for the mode control entity, but ok20:21
Wizzupagain, no strong opinions either way20:21
sfaI'm guessing there's no default cellphone app on maemo-leste and I'll need to insteall something like ofono?20:21
sfaIs there a recommended app for phone and texting?20:21
freemangordonsfa: what we are discussing ATM is exactly cellular stuff20:21
Wizzupsfa: there is a call app, but the app and the other packages are not included in the standard repo20:21
freemangordonbut, all this is in development20:21
sfafreemangordon: ah I see20:22
WizzupI haven't tried it yet on my PP recently20:22
Wizzupbut our stuff works good enough for call/text on the droid 4, so I imagine it might work20:22
sfaWizzup: cool thansk,  I guess I need the "extra" repo?20:22
Wizzupno, beowulf-devel20:22
sfaah okay20:22
WizzupI don't know if instructions exist, we're trying to get it all to stable so we don't need to provide the instructions :)20:22
sfaWizzup: nice!20:22
freemangordonWizzup: re mce - if we go that route, we shall also write wifi module tehre20:23
freemangordon*there20:23
Wizzupone of these days we'll get the meta package set up and such, right now I don't have the right answer atm, I can look later today or tomorrow or a package list20:23
Wizzupfreemangordon: wifi isn't really an on/off mode I think20:23
Wizzupbut I am fine if you want a separate daemon20:23
freemangordondoes not matter. it still shall obey flightmode20:23
freemangordonok, will write cellulard then20:24
Wizzupsfa: you want beowulf-devel repo and then at least install hildon-connectivity-mobile20:24
Wizzupsfa: to be clear beowulf-devel supplements regular beowulf repo from us20:24
sfaWizzup: awesome!  let me go try that!  Thanks!20:24
freemangordonsfa: don;t expect miracles though :)20:25
freemangordonas I said - this is still WIP20:25
sfait's probably better than default image that comes with the pinephone that is horrible. :)20:26
Wizzupmaemo leste should work pretty smooth, especially if you upgrade from -devel repo20:26
Wizzup(faster 2d/3d)20:26
freemangordonWizzup: maybe we shall push that to stable20:26
freemangordonmesa/clutter that is20:27
sfadeb https://maedevu.maemo.org/leste beowulf-devel main contrib non-free <device_name>  where devicename = {droid4 or pinephone or whatever}  is that correct?20:28
freemangordonWizzup: hmm, wouldn't ofono-cellulard be more appropriate name?20:28
Wizzupfreemangordon: I think it is more maemo specific than ofono specific, well, I guess both20:31
freemangordonok, will see20:31
Wizzupsfa: yeah just copy the maedevu beowulf line, paste it, and make it beowulf-devel20:31
sfacool thanks.20:33
Wizzupfreemangordon: yeah, there is more to push to stable I think20:35
freemangordonWizzup: all calls to  g_variant_print() in wpaicd.c leak memory21:55
Wizzupfreemangordon: yikes22:08
freemangordonWizzup: could you help me with thos gvariant things22:09
freemangordonI have a dbus signal, and g_variant_print() results in "signal ('normal',)"22:10
freemangordonhow shall I get the value?22:10
freemangordon g_variant_get (value, "s", &result);22:10
freemangordonor  g_variant_get (value, "g", &result);22:10
Wizzupneed a moment to dive back into this22:11
Wizzupis this in wpasupplicant?22:12
freemangordonno22:12
freemangordonthis is in my code22:12
Wizzupfreemangordon: ah yeah I think that's hidden behind the debug compile, maybe I didn't fix it because of that22:13
freemangordonyeah, but still22:13
freemangordonanyway, can you help with "signal ('normal',)"22:13
Wizzupso do you know what type the variant is>22:13
freemangordonwhat is 'signal' in terms of GVariant22:13
freemangordonit is string22:13
freemangordonthis is   MCE_DEVICE_MODE_SIG signal22:14
Wizzupwhat are the old gnome doc links22:14
Wizzupold-developer22:14
Wizzupno22:14
Wizzupdeveloper-old22:14
freemangordonthis https://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/glib/glib-GVariant.html22:14
Wizzuphttps://developer-old.gnome.org/glib/stable/glib-GVariantType.html22:14
freemangordon?22:14
Wizzupso I think you need to know the type to get the value22:15
Wizzupyou can probably print the type of the variant as well22:15
freemangordonwell,  "signal ('normal',)" is the result of g_variant_print()22:16
freemangordonso I guess the type is signal :)22:16
Wizzupthere is no such type in gvarianttype iiuc22:16
Wizzuphttps://developer-old.gnome.org/glib/stable/glib-GVariant.html#g-variant-get-type22:17
freemangordonwell, why it prints it then?22:17
freemangordonmaybe dbus signature?22:17
Wizzupmaybe you need to unpack the dbus variable first to get the gvariant?22:18
WizzupI don't really know, maybe it's a custom registered variable22:19
freemangordonok22:19
Wizzupsorry22:20
freemangordonnp22:20
freemangordonWizzup: ugh, I am stupid :)22:21
freemangordonthis 'signal' thingie is just a string I printf() ;)22:22
freemangordonthe signature is (s) otherwise22:22
Wizzupha22:22
uvosmce runs in actdead anyhow22:24
uvosin fremantle22:24
freemangordonyes, thats why I don;t want to pull ofono stuff into it22:25
uvosbut i would strongly strongly strongly STRONGLY suggester never to use the "actdead" method of implementing what actdead implements in fremantle22:25
uvosits an extreamly lame implementation22:25
freemangordonwell, we shall have some runlevel that implements that22:25
uvosright22:25
freemangordonI think we already agreed on that :)22:26
uvosin this runlevel you just dont run the deamon (whatever onlines the modem)22:26
uvosand this deamon offlines the modem on exit22:26
uvosso when runlevel is switched to "actdead"22:26
uvosmodem offlines and thats that22:26
uvosor do we need it?22:27
freemangordonok22:27
freemangordonI think no22:27
freemangordonbasically we show alarms (or charge there)22:27
uvosright22:27
uvosi honestly think icd is the most sane22:29
uvossince as you point out wifi also has to obay flightmode22:29
freemangordonit already does22:30
uvosand icd is the most sane place to put that22:30
uvosand then icd reacts to flight mode, and it handles cellular too for data22:30
uvosso it allready has all bits22:30
uvosso just add this one little thing22:30
uvosi dont think voice has to work without icds cellular module really22:30
uvosi also kinda think a deamon just to online the modem is overkill22:32
freemangordonlet me finish what I started already, I think it will be some 100 LOC22:32
freemangordonnot really, as .launch will make it more or less free for us22:32
uvosuh mameo-launcher dosent make a process context any cheaper22:35
uvosfreemangordon: btw should we even have a "flight mode"22:45
uvosfreemangordon: i dont think so22:45
freemangordonwhat?22:45
freemangordonwtym?22:45
uvosfreemangordon: we should just have 2 toggle switches, one for wifi one for mobile data22:45
uvoswell flight mode is sensless22:45
freemangordonno22:45
WizzupI don't think flight mode is about mobile data22:45
uvosit used to make sense because it was a thing required in flight22:45
freemangordonall radios shall be turned off22:45
Wizzupuvos: they still do22:46
uvosbut its not true anymore22:46
freemangordonit is22:46
Wizzupall the planes I go on anyway22:46
uvosno they require cellular radios to be of22:46
uvosthats a different thing22:46
freemangordonat least was last time I was on-board (an year ago)22:46
Wizzupthat's not the same as mobile data?22:46
uvosandroid no longer turns all radios off in flight mode22:46
uvosit turns just the cellular modem off22:46
Wizzupuvos: so can you be called in flight?22:46
freemangordonhow noce22:46
uvosno22:46
freemangordon*nice22:46
WizzupI think we're saying the same thing?22:46
uvosxno22:46
Wizzupuvos - are you talking about bluetooth or something?22:46
uvosso on old phones and old android22:46
uvosflight mode = all radios off22:46
uvosnow flight mode = just cellular modems off (gsm utms lte 5g etc)22:47
uvosbecuase thats how the laws changed22:47
Wizzupthat's mostly what our flight mode would do22:47
freemangordonand what is on? wifi/bt?22:47
uvosyes any other radio22:47
freemangordonwhat other radio?22:47
uvosthat includes wifi bt22:47
freemangordonah22:47
Wizzupfreemangordon: fm I suppose22:47
uvosso flight mode is just a wierd name of cellular off now22:47
uvoswe could ditch that22:48
freemangordonwell, actually mce supports normal/flight/offline modes22:48
uvosand just call it what it is22:48
uvosand have 3 toggle switches somewhere22:48
freemangordonno, please22:48
uvosIe cellular off, bt off wifi off and fm off22:48
freemangordonthis will become nightmare22:48
Wizzupuvos: we already have bt off, we have wifi off (through applet), we have flight mode which is cellular22:48
WizzupI think we're there already22:49
uvosyeah but flight mode turns off all radios22:49
Wizzupuvos: well, "we" don't have bt off yet, but we will once we have the fremantle stuff in place22:49
uvos(as was required by law untill 2012 or so)22:49
uvosbut that means we have no state where wifi and bt and so on can be on22:49
uvosbut cellular is off22:49
freemangordonok, but right now, noone turns cellular radios off22:49
freemangordonso, this is what I am implementing22:49
Wizzupfreemangordon: btw regarding the wpaicd.c memleak, do you have a recommendation on how to fix it other than make a tmp var, and free it after the print?22:50
freemangordonand, as I said, we support 3 modes22:50
freemangordonWizzup: not really22:50
Wizzupok22:50
freemangordonuvos: so, lemme implement what flightmode is supposed to do in terms of cellular22:50
uvossure22:51
uvosi was just suggesting renameing it22:51
freemangordonthen we can think of changing other daemons to listen for "offline" mode and acti accordingly22:51
freemangordon*act22:51
uvossince the name is a legacy artifact22:51
freemangordonit is not, we still need 'flight' mode. maybe it is not correctly handled ATM, but this is another story22:51
uvosif your flight mode just turns off cellular sure22:53
uvossince thats all thats requried in flight22:53
Wizzupfreemangordon: https://github.com/maemo-leste/libicd-network-wpasupplicant/commit/ea027fa16da11b61d9b93a1c86a705f5eba27aba22:53
uvosotherwiese its a name thats also wrong and should just be call all offline or radios off or something22:53
freemangordonright22:53
freemangordonWizzup: ^^^22:53
Wizzupfine by me22:53
freemangordonbut I would create a macro22:54
WizzupI considered it but didn't want to22:54
Wizzup:D22:54
Wizzupif there were more I would have22:54
freemangordonwell... up to you :)22:54
WizzupI know it's not that clean, I'll remove the prints later in any case22:54
Wizzupthere is one more bug I have to hunt for22:54
freemangordonuvos: I understand your reasoning and agree with it22:54
uvosbtw do we really have wifi off?22:56
uvoswhere is it?22:57
uvos@Wizzup since you mentioned it22:57
freemangordonin icd222:58
Wizzupuvos: bencoh made the applet22:59
uvosah its not preinstalled22:59
Wizzupright, it's also (I suppose) a bit more clunky than something in settings22:59
uvosok sure22:59
sicelofreemangordon: in the 3 modes, what's difference between flight and offline mode?23:16
freemangordonin flight mode only cellular is off23:17
siceloas for flight mode in old android, there's still flight mode (with a plane icon) on my Android One (Android 12) phone. so not sure about "old android"23:18
freemangordonthe point is that it turns only cellular radios off23:19
freemangordonwifi/bt remain intact23:19
siceloi guess what you call flight mode is what people on tmo call 'tablet mode'23:20
freemangordonthat would be "offline" mode23:20
freemangordonI guess23:21
sicelono. offline is what you get on power key. that one turns everything off. you can't even enable wifi or bt in offline mode23:21
freemangordonmhm23:21
siceloah, actually you can enable bt, but not wlan. trying to connect to wlan pops up a request to exit offline mode23:22
siceloscratch that ... you can't even enable bt. that results in request to exit offline mode too23:22
siceloanyway i think we're all in agreement with the 3 proposed modes :-)23:23

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!