libera/#maemo-leste/ Monday, 2021-08-16

tmlinduvos: nice to hear voice calls are getting usable :) did you sort out the power consumption issue you mentioned few days ago with modem?06:42
Wizzupuvos: did you build sphone for -devel?12:16
parazydYeah12:16
Wizzuphm, I don't see any icons12:16
Wizzupand I did uprade12:16
parazyd0.1 ?12:16
Wizzupit didn't upgrade on apt upgrade12:17
Wizzupbbiab12:17
parazydYes because of wrong version12:17
parazydRemove it with apt and reinstall12:17
parazydIn Debian logic 0.06 is > 0.1 so I removed the former from the repos12:18
Wizzupparazyd: hm, ok13:11
Wizzupuvos: I managed to make a call first attempt, cool13:13
tmlindlong press on + sign does not seem to work :)13:16
Wizzupyeah13:16
Wizzupif the phone is locked it doesn't unlock and bring up the window, too13:19
Wizzupbtw parazyd uvos: maybe the xsession script should use dsme to launch the thing, in case it crashes?13:28
Wizzups/the thing/sphone/13:28
parazydThe thing is it starts sooner than ofono13:28
parazydSo something has to be done in that regard13:28
parazydNot sure if dsme is the correct solution13:28
Wizzupparazyd: why is that a problem?13:29
parazydWhat?13:30
parazydThe timing or dsme?13:30
Wizzupwhy is it a problem if sphone starts before ofono?13:30
parazydBecause currently sphone doesn't start without ofono running and being on dbus13:31
parazydsrc/ofono.c:11213:32
Wizzupwell, that should be fixed I think13:33
Wizzupalso, what I don't understand, if the xsession just uses dsme to spawn it, it should still be fine, no?13:33
Wizzupthe timing would be the same13:33
parazydWhy not start sphone with openrc instead?13:35
Wizzupbecause that's not how the majority works, and it won't be restart when it crashes then13:36
parazydWhy would it crash13:36
parazydI would rather avoid this way of thinking13:37
parazydWhat has to be done is just start ofono before sphone13:37
parazydAlso there's supervise-daemon13:37
parazydAnd then with openrc you get dependency management for free13:38
Wizzupshall we just do that when we eventually, if ever, get rid of dsme? I don't see the point of having multiple ways of doing this13:39
WizzupI'll take a look at what fremantle does for the phone app in a bit, but I'm pretty sure it'll be using dsme13:39
Wizzupand sphone should not depend on ofono being running, as it also has to work through restarts13:40
Wizzupso that's not a reason to have it depend on ofono in some init script13:40
parazydsphone has a runtime dep on ofono13:40
Wizzupno13:40
parazydIt can't work without13:40
Wizzupin fact sphone can live just fine through ofono restarts13:40
WizzupI already tested that13:40
parazydThat's not the issue here13:41
parazydI'm saying you can't start sphone without ofono13:41
Wizzupyes, that is a bug13:41
parazydAnd the dsme approach of having it fail a dozen times until ofono starts is shit13:41
Wizzup?13:41
Wizzupnobody is suggesting that?13:41
parazydWhat then?13:42
Wizzuphttps://github.com/maemo-leste/sphone/commit/b5fdb99695f409d50e70ade69756e5efed812afb#diff-8cef3bb1fe8770e0c473799c7796a61f957fbeba785b46691b07ba145df35947R213:42
Wizzupif that uses dsme, the timing won't change13:42
Wizzupat all13:42
parazydYeah, so that means it'll keep trying and failing until ofono starts13:42
parazydYou can rather use dsme from an initscript and get dependency handling for free13:42
parazydAnd later on switch it out for supervise-daemon13:43
Wizzupwhy would it keep trying and failing?13:44
WizzupI don't understand this13:44
Wizzupthe way it is written now, does it crash in your xsession, and just never starts?13:44
parazydBecause the xsession runs before ofono13:44
Wizzupmaybe we should just revisit the conversation once I fix the bug where it needs ofono running to start the app13:44
parazydSo the implication is that even with dsme, sphone fails to start N times13:44
Wizzupbecause that's really a bug13:44
parazydBy having this in openrc, you can depend on the ofono initscript and have it fail 0 times13:45
Wizzupplease13:45
Wizzupofono running is *not* a hard dep for the thing to start up13:45
Wizzupif it is, it is a bug and we need to fix it13:45
Wizzupjust try /etc/init.d/ofono stop, then app will keep running np13:45
parazydyes but it's useless13:45
Wizzup???13:45
parazyde.g. I can't make a call13:46
Wizzupyeah, so?13:47
Wizzupthat has nothing to do with it being a bug that it cannot start when ofono is not running13:47
Wizzupby design this should be no problem, and it should just pick up on ofono when it arrives on the bus13:47
Wizzupit's entirely unrelated to what the startup looks like13:47
Wizzupin any case let's wait for uvos and see what he thinks13:48
parazydactually when I look at the code it's using g_error13:48
parazydThis is wrong13:48
parazydBecause this calls abort()13:48
parazydHence the failure13:48
parazyduvos ^13:49
uvosWizzup: just started working again18:09
uvosWizzup: i gues the blocking takes a while to propogate18:09
uvosWizzup: also ill just get blocked again as soon as the original spammer who i share an ip with gets reported again :\18:09
uvosthis isp nat has been the the bane of my existance before :P18:10
uvosyeah so the fact that sphone needs ofono to run is accidental-on-purpose18:11
uvosso sphone registers lots of handlers for interfaces on dbus for ofono18:11
uvosand it only dose this once (now and with the old dbus code)18:11
uvosso it dosent work if started later18:11
uvosthe old code dident exit18:12
uvosbut it dident work either if ofono was not available18:12
uvosnow we could/ should improve this18:12
uvosbut thats the current state18:12
uvosparazyd: Wizzup: so openrc should not start user services, it afaik dosent have any real features to support those (unlike systemd)18:13
uvoswe should thus not start sphone with openrc18:13
uvosjust like dsme should not be starting system services....18:14
uvoslong term we need a real session manager of some kind18:14
uvoswe could lift one from elsewhere or reduce and ammend (mostly reduce) dsme  until its usable as a session manager and dosent do anything else anymore.18:15
WizzupI think dsme makes sense here, we use it in other places, and in the rare  case that sphone might crash, it's kinda nice to have it start again, esp if it crashes in the background18:15
Wizzupno need to really revisit the dsme discussion again imho, but we can check what fremantle does18:15
uvosright dsme makes sense for now18:15
uvosbut long term dsme needs to be removed from system service invokation18:15
Wizzupfor me I think that if the phone app crashes in the background, the phone should really try to recover, notify, and if all else fails, maybe reboot or something18:15
uvossure18:15
uvospls not reboot tho18:15
Wizzupyeah, ok, but there's no point to revisit it every time :p18:15
Wizzupuvos: well if you disable the lg then it won't matter I think18:16
Wizzup(for you at least)18:16
uvosright18:16
WizzupI managed to get an audio call going with a friend btw18:16
uvosnice18:16
Wizzupit looked like when I picked up, the vibration did not stop though18:16
WizzupI had to manually mute the vibration18:16
uvoshmm18:16
uvosok18:16
Wizzup(just giving feedback, you probably know)18:16
uvosno18:16
uvosworked for me :P18:16
Wizzupand audio worked when I set the profile to 'Make a phone call' in pavucontrol18:17
uvosright18:17
uvosspeakerphone only tho18:17
Wizzuphm I did earpeace18:17
uvosit goes to the speakerphone18:17
uvosno matter what you select18:17
Wizzuphm, ok18:17
uvosthis is the kernel problem18:17
uvosi have a hack that fixes this in my kernel18:17
WizzupI don't know how nokia does it exactly, but I think a phone call unlocks the phone and locks it again after that18:17
uvosbut its not something we should/can include18:17
uvosWizzup: mce gets put into call mode18:18
Wizzupnot quite sure how that is done securely if at all (i have no lock code set on my phone)18:18
Wizzupok18:18
Wizzupso mce takes care of it then18:18
uvosmce takes care of ti18:18
uvosalso it takes care of the proximitry screen blanking18:18
uvossphone just dosent tell mce about the ongoing call rn18:18
uvosotherwise the mce stuff works allready18:18
Wizzupok18:18
uvosoh right the thing with vibration not stopping makes sense18:19
uvosthis is ofonos fault18:20
uvosfor some reason the state of the call never changes after its initalized in ofono18:20
uvosso a outgoing call is stuck at dialing forever18:20
uvosand a incomeing call is stuck at ringing forever in ofono18:20
uvosuntill the call is hungup18:21
uvosthen it changes to dissconeccted18:21
uvosfunny thing18:21
uvosthis bug existed in 2010 on the htc device too18:21
uvossphone src has a workaround for the outgoing part18:21
uvosi gues i never picked up since i implmented vibration18:22
uvostmlind: regarding pm its still broken for me with the modem online18:22
tmlinduvos: ok18:22
uvostmlind: but i have made no effort to look into it so ill report when i know more18:22
tmlindok18:22
uvostmlind: regarding asoc18:22
uvostmlind: so i really still dont know what to do about the PGA18:23
tmlindok18:23
uvostmlind: i asked at on the alsa-devel mailing what do in this situation18:23
uvosbut no replies so far18:23
uvossre also remains mia18:24
tmlindheh ok :) so for parsing the /dev/gsmtty1 notifications..18:24
tmlindthere needs to be a counter for WAKEUP initialized to 018:24
tmlindif three WAKEUP instances are seen, alert as it means phone call or sms18:24
tmlindbut18:24
uvosok18:24
bencohWizzup: wait, you don't want to unlock phone during phone call?18:25
uvosbencoh: we do18:25
uvosbencoh: it dosent currently18:25
tmlindcounter needs to be set back to = -1 if any outgoiong status is seen18:25
bencohoh and iirc, nokia only unlocks phone app18:25
uvosbencoh: just inimplemented18:25
uvosbencoh: just unimplemented18:25
bencohI don't think you can switch to other apps18:25
uvosmce unlocks the deivce (tklock at least)18:25
Wizzupbencoh: I don't know how it prevents switching, I never use a lock code on fremantle18:26
Wizzupbut we'll see I guess :)18:26
uvosthe nokia phone app is override redirect18:26
Wizzupok18:26
uvosits its own lock screen18:26
Wizzupclever18:26
uvosidk if i want to do this18:26
uvostbh18:26
uvosbut later anyhow18:26
uvosi also dont know what they do if some other app holds a screen grab18:27
bencohyeah18:27
uvoscant just not accept the call then18:27
uvosso not sure what they do.18:27
uvosin this case18:27
uvostmlind: failing this would break pm?18:28
uvostmlind: or what is the context here18:28
tmlinduvos: you should see +CIEV notifications on /dev/gsmtty1 for phone status changes18:28
uvoswhat status exactly? in call vs idle?18:28
uvosobv rn i have not dealt with gsmtty directly at all18:28
uvossince im just using ofono18:28
tmlinduvos: incoming call, incoming sms, call status changing to connected and so on18:29
uvosok18:29
tmlindso sounds like more +CIEV notifications needs to be parsed in ofono probably18:29
uvosand this suspect the handling of this in ofono, or lack thereof relates to the pm problem or the problem that the ofono calls tate dosent change?18:29
uvosok so call state not changeing18:29
tmlindyup18:29
tmlindand also what to do with WAKEUP events18:30
uvosok18:30
uvoswho ported ofono to motomdm?18:30
uvosor did generic qmi work?18:30
tmlindas there are also WAKEUP events for outgoing calls that need to be filtered out when a +CIEV is seen by setting counter to -1 instead of 0..18:30
* tmlind ducks18:30
uvoshe18:31
uvos*hehe18:31
uvosok ill look at the ofono porblems later18:31
uvos(sphone and asoc first)18:31
tmlindok18:31
tmlindi have not had a chance to get back to ofono for a while..18:31
uvoswe also have problems with gprs18:32
uvosbut that might be Wizzups fault also18:32
uvosand not ofonos18:32
tmlindbut we need to listen to /dev/gsmtty* in ofono for notifications, then trigger qmi notifications for usb18:32
uvosok18:32
uvoshttps://mailman.alsa-project.org/pipermail/alsa-devel/2021-August/188505.html <-- here is alsa-devel email in case some one here is versed in asoc18:32
tmlinduvos: fyi, the motmdm related changes are in https://github.com/tmlind/ofono/commits/motmdm18:36
Wizzupuvos: I use mdbus2 for gprs, not icd2, and it still fails18:36
Wizzupbut there might be more to be done somehow, in how I use mdbus2 to talk to ofono, maybe18:37
parazyduvos: In case you missed it, I'm pretty sure you should be using g_critical/g_warning instead of g_error in the code, because g_error does abort()18:37
uvosparazyd: right but the abort is on purpose rn because the failure would cause sphone to be in a state where it cant rescive calls but the user dosent know18:38
uvosid rather it exits18:38
uvosbut in reality it should deal with this situation sanely ofc18:38
Wizzupsounds like you're on top of things18:38
tmlinduvos: you do have those ofono commits from the motmdm branch above, right? otherwise only limited qmi usb functionality will work18:42
tmlinduvos: i recall pavel's usb tty changes got merged but that interface is limited and buggy18:43
uvostmlind: i have whatever leste has in its repos18:47
uvostmlind: i gues Wizzup or parazyd knows18:47
WizzupI'm pretty sure we're using the latest from tmlind18:47
tmlindhmm i think my most recent branch may have been actually https://github.com/tmlind/ofono/commits/motmdm-serdev-ngsm18:48
tmlindWizzup: is it the upstream-forks ofono or which one?18:48
Wizzupour HEAD of your branch is 2b9b5e2553274dde6992edb894712034c27aee8218:48
Wizzuphttps://github.com/maemo-leste-upstream-forks/ofono-d418:48
Wizzupand then here18:48
Wizzuphttps://github.com/maemo-leste-upstream-forks/ofono-d4/tree/maemo/beowulf-devel18:48
tmlindok yup that's it18:49
uvoshehe tmlind's increasing annoyance at how the motmdm works is apperant in the commit messages18:51
tmlindheh yeah :) so on the ofono list we discussed we should just use ell for /dev/gsmtty* handling instead of the legacy g_at stuff18:52
tmlinda lot of the issues are related to g_at, and depending of the firmware terminating line breaks are different..18:53
uvostmlind: btw do you use gprs/umts data on your hacky sway setup?18:53
uvosxD @ changeing line breaks18:54
tmlinduvos: yeah just used it last weekend, but it seems that caused battery to drain18:58
uvosok script/ dbus calls that you use to set it up might be usefull18:59
uvosto compear with what icd dose18:59
uvos(and mostly fails)18:59
tmlinduvos: i'm pretty sure using data did not used to cause battery drainage after disconnecting18:59
uvostmlind: ok but im mostly worried about data flat out not working most of the time19:00
tmlinduvos: well leave wwan0 for voice19:00
uvostmlind: we can look at pm when it works19:00
tmlindso wwan0, wwan1 for data, wwan2 works only once don't use, use wwan3 for mms19:01
tmlindso again: so wwan0 for qmi and ofono voice, wwan1 for data, wwan2 works only once don't use, use wwan3 for mms19:02
uvosok19:02
uvosWizzup: ^^^19:02
Wizzuphm, I think we use whatever ofono gives us19:03
tmlindofono defaults to wwan0 yeah19:03
WizzupI am not sure if I can tell ofono what interface to use for the context19:04
Wizzupwill have to check..19:04
tmlindright.. that might be missing19:04
uvoswhats the reason behind this setup ?19:04
uvosdo we know?19:04
tmlindbut no need for ofono to configure data connection? mms connection might be needed from ofono?19:04
uvoswe would like ofono to abstract data too19:05
uvosbecause we have other devices with different modems....19:05
tmlindyeah, sounds like ofono needs different connections if not supported19:05
tmlindmms connection seems like it must be a separate configuration and not usable for internet connection19:05
Wizzupso I just get this:19:06
Wizzup# mdbus2 -s org.ofono /motmdm_0/context1 org.ofono.ConnectionContext.SetProperty Active true19:06
Wizzup[ERR]: GDBus.Error:org.ofono.Error.Failed: Operation failed19:06
Wizzupmaybe the apn is not configured correctly or something, but usually ofono takes care of that, iiuc19:07
Wizzup(it does work in other places, btw, so maybe this is it)19:08
Wizzupbut apart from the above, it still sometimes just times out19:09
tmlindyeah probably it's possible to use wwan0 via ofono for both ofono voice commands and internet. but not for both internet and mmc connection19:09
Wizzupwhat is funny is that when I try to do active the context, I see this in dmesg:19:10
Wizzup[21188.396331] mot-mdm6600-codec 4806a000.serial:modem:audio-codec@2: motmdm_voice_get_state: ciev=5,0,619:10
Wizzups/active/activate/19:10
tmlindyeah there is a +CIEV on /dev/gsmtty1 for connection status changes too19:11
tmlindthat's a kernel debug message19:11
Wizzupok, so it's not somehow ending up in the wrong path19:11
tmlindWizzup: rather something is not being parsed in ofono from /dev/gsmtty119:12
Wizzupok19:12
Wizzupuvos: fwiw sometimes removing (or something else) /var/lib/ofono can help if it's in some weir dstate19:13
tmlinduvos: so you want my qmicli commands for a data connection?19:13
tmlinduvos: here's a paste of the qmicli commands i use19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi --uim-get-card-status19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi --dms-get-operating-mode19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi '--dms-set-operating-mode=online'19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi '--device-open-net=net-802-3|net-no-qos-header' --dms-noop19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi --nas-get-system-selection-preference19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi '--nas-set-system-selection-preference=umts'19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi --nas-get-signal-strength19:17
tmlindqmicli -d /dev/cdc-wdm1 --device-open-qmi '--wds-start-network=apn=internet' --wds-follow-network19:17
tmlindthen start dhcp client on wwan119:20
tmlindi did not have much success configuring stuff in /etc/network/interfaces although it's supposed to work19:21
tmlindi tried this with /etc/network/interfaces:19:23
tmlindiface wwan1 inet dhcp19:24
tmlindpre-up qmi-network --profile=/etc/qmi-internet.conf /dev/cdc-wdm1 start19:24
tmlindpost-down qmi-network --profile=/etc/qmi-internet.conf /dev/cdc-wdm1 stop19:24
tmlindwith cat /etc/qmi-internet.conf19:24
tmlindAPN=internet19:24
uvostmlind:19:29
uvoshmm great that works while icd fails at the same time19:29
uvosWizzup: ^^^^19:30
Wizzupuvos: icd or ofono :)21:22
uvostrue22:00
uvosim not assigning blame22:00
uvosjust describing what i observe :)22:00
Wizzupuvos: check :p23:15
uvosthere sphone now also puts mce into the right mode23:56
uvoslightly tested only23:56
uvosalso proximetry dosent work23:56
uvosbecause of the ofono problems sphone never gets into call state so sphone and mce stay in rinnging mode, the only diff being prox23:57
uvosmight just work on pp23:57
uvosoh and you need to load callstate mce module23:57
uvosoh and i have not tested it with tklock only lock-generic so ymmv23:58
Wizzupwhen it is in the right mode, does it still require unlock, or did you make it override?23:59
Wizzup(also: exciting)23:59
uvosshould unlock23:59
uvosand lock-generic dose23:59
uvostklock should to23:59
uvosbut dident test23:59

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