libera/#maemo-leste/ Monday, 2023-10-30

Wizzupuvos: right, thanks02:22
Wizzupsomehow I keep forgetting that it has no sd card :D02:22
Wizzup(reader)02:23
Wizzupuvos: so what partition did you install leste to?04:00
Wizzupuvos - the tablet should not draw a lot with the screen off through right?06:27
Wizzupuvos - well I guess stesp one is to install kexecboot, see if android still boots, and then take it from there06:28
Wizzupsicelo: if it only works for some operators, maybe the mobile broadband providers is out of date06:28
tmlindWizzup, uvos: from stock android you can reformat userdata as ext4 with make_ext4fs, then reboot to android and it's ext4 isntead of vfat. this naturally resets the device to defaults06:29
tmlinduvos: got the modem patches rebased, but seeing hangs playing audio on voice, so some issue with the mcbsp tdm with multiple dais i think06:30
tmlindand my mz609 memory issues have gotten so bad i can no longer even copy over files, ordered a mz608 though06:31
Wizzuptmlind: ok, and then put leste on uesrdata?06:36
tmlindWizzup: yes that way you can share it between android and m-l (unless there's some directory name conflict)06:38
Wizzupprobably shouldn't be a conflict, not sure if android will do any crazy stuff to it06:39
tmlindyeah so far no issues here06:39
Wizzupbtw, you said there's a hang for audio on voice, is this even hooked up on the tablets06:40
Wizzuptmlind: ok, sounds like I should try this and document it somewhere06:40
tmlindWizzup: no idea, so far did not get any response on mz617 on the n_gsm serial port from the modem, usb only06:40
WizzupI would not be super surprised is audio is just not hooked up06:41
Wizzup(would be cool if it was, though)06:41
Wizzups/is audio/if audio/06:41
tmlindyeah maybe it is, need to get busy here now, ttyl06:44
Wizzupttyl!06:44
siceloWizzup: no. it's the operator themselves :-)07:28
siceloseems some operators don't support being queried for name. but they do send it without being prompted. the ofono code only shows it if it's a response to a request, so on such operator, there won't be anything showing07:29
sicelohttps://paste.debian.net/1296684/ is a patch i'm working on to workaround that. at line 33, the operator name is saved in `tag` variable. unfortunately, the remainder of the code doesn't actually result in the operator name being propagated correctly through ofono07:32
siceloso i still need to find correct way to do that.07:33
sicelothe 'normal' code (for when it's a response to a request) seems to use this macro, https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L50407:33
sicelooh and the `if` on line 22 doesn't work either ... not sure why, hence i commented it out for the time being07:34
sicelobecause ideally i want to only use this codepath only if operator name was not already set by other means07:47
sicelo08:29 < sicelo> seems some operators don't support being queried for name. but they do send it without being prompted ... oh btw on D4 it works on that 'bad' operator07:48
siceloso it must be in how the n900 radio does it ... but it's exactly the same raw packet over the wire as that which gets sent when on 'good' operator07:56
sicelosome C help please ... bencoh, freemangordon, Wizzup (sorry for pings)11:41
sicelohttps://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L50411:41
sicelothis macro - what are the final/real C statements that end up being run?11:42
freemangordonsicelo: hard to say, because the macro is defined on several places11:57
freemangordonI guess this https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/isiutil.h#L45 is the one that is used11:58
siceloi think we can confine ourselves to the isimodem part11:58
siceloyes, that's the one11:58
freemangordonofono_netreg_operator_cb_t cb = cbd->cb;11:58
freemangordonso it does 'cb(&e, &op, cbd->data);11:59
freemangordon'cb(&e, &op, cbd->data);'11:59
freemangordondoes that answer your question or you want to know what exactly cb() is?12:01
freemangordonBTW, cb stands for 'callback'12:01
siceloyes, i would like to know what it is exactly :-)12:01
freemangordonok, seems to be here https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L51112:01
freemangordoncalled from https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L55112:02
freemangordonand we end up here https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L1172 :)12:02
freemangordonbetter put breakpoint in name_get_resp_cb() and print *cbd12:03
freemangordonand see which function cbd->cb is12:04
siceloi had got as far as that line 511... but that confuses me a bit as. the first/original location is ofono processing the network operator name modem responded with, now in 511 we seem to be starting another request ...12:04
freemangordondoes that help?12:04
sicelofreemangordon: maybe let me state why i am even trying to understand this macro:12:05
freemangordon"got so far"? like, folowing the source or in gdb?12:05
sicelosource12:05
freemangordonsicelo: forget the macro, it just sets an error if needed and then calls the callback12:05
freemangordonif your results are not ok, you have to check what that callback does12:06
freemangordonthe easiest way to see which function is called as a callback is with the debugger12:06
siceloso let me explain a bit: as far as i understand the code and n900 modem: ofono periodically requests modem/network to provide operator name, https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L51112:07
freemangordonok12:07
sicelowhen modem/network has the data, it responds here, https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L45812:07
freemangordonright12:08
sicelounfortunately, in some cases, the response is not successful (from modem/network end), and ofono doesn't display operator name as a result. that's fine12:08
freemangordonok12:08
sicelohowever, the 'live' operator name is also periodically sent by network without being asked for. it returns it in NET_REG_STATUS_IND, which is unsolicited. https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L191 handles it12:09
sicelobut the code doesn't really make that much use of the returned data.12:10
sicelohttps://paste.debian.net/1296684/ is initial code using that data, and the `tag` variable does contain correct operator name at that point12:10
siceloso what i need is to inject it into ofono core12:11
freemangordonahaaa12:11
freemangordonwhy don't you just issue another create_name_get_req()?12:12
freemangordonIOW - just ask ofono to refres the operator name by asking the modem12:12
siceloit will fail, because for this network, when you ask modem, it errors :-)12:13
freemangordonugh12:13
siceloi.e. don't ask modem. it will tell you when it feels like it12:14
freemangordonok, but then are you sure it is properly registered?12:14
siceloyes12:14
freemangordonhmm...12:14
freemangordonhow do you know, if it errors out if you ask for registration status?12:14
sicelolet me show you, just a moment12:15
sicelohttps://paste.debian.net/1296696/12:15
sicelothis is debug data from ofono12:16
freemangordonwhat is NET_CAUSE_COMMUNICATION_ERROR?12:16
siceloline 12 is ofono requesting operator name info, and line 22 is modem/network failing to provide it12:16
freemangordonso, the modem is not registered properly12:16
siceloit is :-)12:17
freemangordonwell, why then it fails to provide op name?12:17
freemangordonBTW...12:17
freemangordonwhat you can do...12:17
sicelono idea. i guess it's operator related, because on a different operator, the call succeeds12:17
sicelonow, look at lines 1-10 ...12:17
sicelothat's the modem sending, unsolicitied, information to ofono, including 3 operator name options to choose from :-)12:18
freemangordonis - cache the name from NET_REG_STATUS_IND, and later on, if NET_OPER_NAME_READ_REQ fails, provide the cached name12:18
siceloso ofono currently does not use any of those three operator names, and that's what i want to add support for12:19
freemangordonok, how do you choose between them?12:19
siceloup to you, i guess. seems gsm standard provides for short name and full name. the SZ 02 is correct short name for Eswatini Mobile ... no idea why they send a third one with no space in between12:20
freemangordonok12:20
freemangordonso, wouldn't caching those fix your issue?12:21
sicelosounds like a good plan what you propose!12:21
freemangordonyeah12:21
siceloi don't know if i'll be able to implement it on my own though, heh, but will try12:22
sicelostill within this context, could you have a look at https://elixir.bootlin.com/ofono/latest/source/drivers/isimodem/network-registration.c#L204 ... this is the block that iterates through the information available in NET_REG_STATUS_IND12:23
siceloi added a `default` case, hoping to find other subblocks from the message, which is  on lines 1-9 of https://paste.debian.net/1296696/12:24
freemangordonsorry, have to run now12:24
freemangordonlaters12:24
sicelosure, thanks12:25
siceloi'll leave it here anyway12:25
siceloso one of the subblocks is the one on byte position 7 of that dump (it's actually 6, since the first byte is ignored ... it's a transaction id). the header for this block goes up to the 0x05, which tells us the number of UCS-2 characters that follow (SZ 02).12:27
siceloi was thinking this block would show up in the default case, but it doesn't ... the first block that shows up is the one on the first 0xE3 on line 5 ...12:28
siceloi don't mind it too much, because, luckily, this is the block i'm most interested in, but i do have some interest in the other block, since there are cases where it's the only extra block available12:29
sicelofor example, in the trace at https://yhbt.net/lore/all/1306164011-29368-1-git-send-email-arunlee@gmail.com/T/12:30
siceloanyway for now, will focus on caching it12:30
dsc_freemangordon: I am moving to a new appartment this month so I may not always have time but we can talk about abook sometime12:59
freemangordonuvos: I was able to run glimagesink on d4, will start using that instead of xvimagesink15:09
* uvos__ is pleased15:25
uvos__how is perf?15:26
uvos__same?15:26
uvos__should be same really, barring issues15:26
freemangordonseems same/similar15:34
sicelofmg, nvm the last part (of the ofono discussion) about parsing the `SZ 02` block. turns out it's not a separate subblock, but that's still part of the first block. so now i have perfect parsing of all three possible operator name subblocks from NET_REG_STATUS_IND21:03
siceloofonod[29468]: drivers/isimodem/network-registration.c:parse_common_info() Short OperName = SZ 02                                      │    time to empty:       3.6 hours21:03
siceloofonod[29468]: drivers/isimodem/network-registration.c:reg_status_ind_cb() Full opername is Swazi Mobile                               │    percentage:          20%21:03
siceloofonod[29468]: drivers/isimodem/network-registration.c:reg_status_ind_cb() Alternate full opername is Swazi Mobile                     │    icon-name:          'battery-caution-symbolic'21:03
sicelothe caching/injecting is next :-)21:04

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