**** BEGIN LOGGING AT Fri May 14 02:59:56 2010 May 14 03:03:58 zhenhua: Btw I haven't had time to look at your patches in depth, I was too busy with Yang's May 14 03:04:10 zhenhua: However, my feeling is you're on the right track May 14 03:05:08 denkenz: okay, and i expect to see your comments so that i can revise and make sure we are in the good shape May 14 03:05:40 zhenhua: Nod, might not be until next week due to my impending travel May 14 03:06:42 denkenz: okay, i can still move forward to implement locally, there're still lots of work and i will update schedule to majid. May 14 03:07:50 denkenz: for telephony_str_to_err patch, do u want to resend it to remove strcasecmp part? May 14 03:08:32 zhenhua: I'm still not sure what that one is supposed to do May 14 03:09:13 zhenhua: all the modems in the world should support CMEE=1 May 14 03:09:27 its just a matter of sending the right init May 14 03:09:42 denkenz: yes, but current decode_at_error simply return 0 error code May 14 03:10:10 we need to record the code so DUN client can get that May 14 03:10:16 yeah, so fix decode_at_error to do the right thing, e.g. report the CME/CMS error code May 14 03:10:39 comparing messages is a really bad idea May 14 03:11:15 If you want to handle CMEE=2 inside the emulator and use the messages in common.c that's fine though May 14 03:11:31 okay, so it's clear. i just remove string comparing part and it should be done. May 14 03:11:56 handle CMEE=2 is not intention of this patch May 14 03:12:08 yeah, basically just check for CMS/CME prefix and parse the error code May 14 03:12:44 beside, i found CEER syntax is 'CEER: ERROR xxx' instead of 'CEER ERROR: xxx' May 14 03:13:02 Yeah, someone was being stupid :) May 14 03:13:27 heh, i am done. yang will ask u questions. May 14 03:13:29 might have to quirk the error function just like everything else May 14 03:14:14 i don't have such plan yet. :-) May 14 03:14:40 Nod, CEER is pointless anyway May 14 03:15:11 Unless some modem actually can give us a decent error report May 14 03:15:59 denkenz: Thank you for your modifications on my code. But I have several parts unclear. May 14 03:16:13 which? May 14 03:16:28 1. the sequence of refresh May 14 03:16:43 The sequence in spec is not the same with test spec May 14 03:16:53 So I followed the spec May 14 03:17:25 So i think you may rollback the last patch May 14 03:17:30 TS 102.223 Refresh is 6.4.7 May 14 03:18:05 what spec are you using? May 14 03:18:13 Oh, maybe we are using different version May 14 03:18:27 ah I see May 14 03:18:31 102.223, v9.0.0 May 14 03:18:34 6.4 and 6.6 have different sequence May 14 03:18:46 6.6.13 refresh May 14 03:18:57 I downloaded the latest one. May 14 03:19:11 Thus I know the reason. May 14 03:19:40 That would be fine. May 14 03:19:49 Second question May 14 03:20:04 It's about the usage of parse_dataobj() May 14 03:20:24 I think we can allow to use it several times May 14 03:20:33 one by one I mean May 14 03:21:10 we can, but why? May 14 03:21:27 Current one has a problem: it will move one iter ahead even if all the dataobjs are matched May 14 03:22:11 Thats what we want, no? May 14 03:22:14 So we need the code: if (l->next == NULL) break; May 14 03:23:16 That's to say, we need to read next iter in parse_item_list May 14 03:23:34 Instead of reading it in dataobj() May 14 03:23:34 Ok, so I'm actually abusing the system May 14 03:25:33 ok, I'm actually confused May 14 03:25:59 why is consuming the iterator in parse_dataobj a problem? May 14 03:26:32 For example May 14 03:26:49 We have a case with two dataobj in it May 14 03:27:15 we can call parse_dataobj() once and pass the two dataobjs as parameters May 14 03:27:53 We also need to allow to call parse_dataobj() twice, and pass item_0 and item_1 separately. May 14 03:28:14 where is that useful? May 14 03:29:31 But it has no reason parse_dataobj() read ahead if it doesn't use it at all. May 14 03:29:55 Once all the expected dataobjs are matched. May 14 03:30:07 who cares? :) May 14 03:31:04 That's natural we think of a parser. May 14 03:31:53 But anyway, if you don't think this is a problem. I will be fine May 14 03:32:05 I have the third question May 14 03:32:06 I don't know, for me its more natural for it to consume it May 14 03:32:14 item can be empty May 14 03:32:24 there's no right and wrong here, as long as it works in all cases May 14 03:33:09 btw, how did your unit tests pass on empty item? :) May 14 03:33:32 Heh, that's my third question. May 14 03:33:49 The empty item will have a NULL list May 14 03:34:08 I swear I tested your patch before making the modifications to parse_item_list and unit tests passed May 14 03:34:09 But it seems in your solution, your list has one item. May 14 03:34:46 Right, it passed all the cases. May 14 03:35:17 I still think we should have a NULL list here. May 14 03:35:31 ah I see, you ignored the empty case May 14 03:35:40 Ok, so I actually agree May 14 03:35:48 However, this has to be done in the main logic May 14 03:35:56 The reason they did this is: May 14 03:36:00 My original patch handles this case. May 14 03:36:16 Item 1 is actually labeled mandatory May 14 03:36:26 However, you can have empty menus, so the entire thing makes no sense May 14 03:36:40 hence they invented a NULL item May 14 03:36:46 utter stupidity on their part May 14 03:37:02 So, let the list parser remain as is May 14 03:37:28 However, in the main logic, check to see if the list is of size 1 and the text is NULL / id 0 May 14 03:37:48 In that case free the list, set it to NULL May 14 03:38:02 all other cases of id 0 / text NULL are actually invalid May 14 03:38:09 Why not handle this in parse_item_list? May 14 03:38:22 [22:38] all other cases of id 0 / text NULL are actually invalid May 14 03:39:39 I think all the item with id==0 shouldn't be added to list May 14 03:40:57 It won't matter since the command will get rejected May 14 03:41:44 or should be anyway May 14 03:44:58 So the modification would be: allow item with id=1 to be added to list. May 14 03:45:28 After returning the list, check the size is 1 or not, and text is NULL /id 0? May 14 03:46:22 I still like my original solution, use a gboolean to show if the mandatory item exists. All the empty will not be added to the list. May 14 03:46:33 Thus a NULL list is returned. May 14 03:47:22 Use ret to judge parse_item_list() is success or not. May 14 03:48:20 I'd rather us be pedantic, if the SIM sends us two NULL items that should be an error May 14 03:48:31 not a successful parse May 14 03:49:08 If you want to do that inside parse_item_list, that's fine May 14 03:49:21 Two NULL items are valid, right? May 14 03:49:57 Not according to the spec: "The identifier is a single byte between '01' and 'FF'. Each item shall have a unique identifier within an Item list." May 14 03:50:20 as I said, the whole NULL item thing is a special case because the guys who wrote the spec were idiots May 14 03:50:28 But these two items have no id May 14 03:50:54 I agree with you;) May 14 03:51:09 agree with you that they were idiots;) May 14 03:51:33 But for the ber-tlv that has two NULL items, it's still valid May 14 03:51:52 If NULL item is valid May 14 03:51:56 it really shouldn't be according to the rules of Item definition May 14 03:52:21 But they have the case of NULL item. May 14 03:52:28 a single one yeah May 14 03:52:49 ok. Which solution do you prefer? May 14 03:52:54 How would you treat nul nul nul valid nul nul? May 14 03:52:56 I can make the patch May 14 03:53:07 Imo the entire thing should be thrown out May 14 03:53:21 End with a list that has only one item of valid one May 14 03:53:57 The first nul one meets the mandatory requirement. May 14 03:54:05 Anyway, that doesn't matter. May 14 03:54:23 We should have a way to code with it. May 14 03:54:29 Lets throw it out for now May 14 03:54:50 ok, I will make the patch based on this rule. May 14 03:54:53 if we ever actually meet that foolishness then we come back to it May 14 03:55:07 Fine. I will make the patch. May 14 03:55:21 That's all for questions, thank you. May 14 12:31:56 seems gcc 4.3.2 can't take the array item initializers in test-stkutil.c in setup_menu_nnn tests (or there's something else wrong with my gcc) May 14 12:51:14 either .items = {{ ... }, { ... }} or .items = { [0] = { ... }, [1] = { ... }} style initialisers work May 14 13:42:44 balrog-k1n: Send a patch then May 14 14:16:57 denkenz: ping May 14 14:28:13 akiniemi: pong May 14 15:50:03 denkenz: about the sms atom... May 14 15:50:35 it doesn't seem to set the mms flag with multipart sms May 14 15:50:43 should it? May 14 15:55:23 akiniemi: I'm pretty sure it did May 14 15:55:54 However, we actually keep track of the last time we set the mms flag May 14 15:56:45 Maybe we never update it properly May 14 15:57:01 denkenz: ok, then I suspect it might be a bug. I will try to take a look May 14 15:57:40 if ((g_queue_get_length(sms->txq) > 1) && May 14 15:57:41 ((ts - sms->last_mms) > 60)) May 14 15:57:43 send_mms = 1; May 14 15:57:50 Sounds like we should also set last_mms too May 14 15:58:43 ah, I read that part but missed the bug ;) May 14 15:59:44 oh, btw, isimodem now does SMS :) May 14 16:00:01 sweet May 14 16:04:19 akiniemi: What is still missing from isimodem btw? May 14 17:18:18 denkenz: SIM PIN May 14 17:18:47 Also, the hacks we have in the SIM driver to fake EF access is a bit incomplete May 14 17:19:01 STK haven't been started yet May 14 17:19:28 Also, ssn and call meter not done May 14 17:20:30 Then, for the N900, we need a plugin that toggles GPIO lines for modem power up/down May 14 17:21:49 In the short term, we will work to make the N900 adaptation work well May 14 17:22:12 Then at some point we will start to generalize the isimodem for newer ISI modem APIs... May 14 17:22:39 ... adding things like PN_UICC support for a proper SIM driver May 14 17:34:38 akiniemi: Well the core doesn't have STK, so no biggie May 14 17:47:21 akiniemi: is your single-socket client code in main repo yet? May 14 17:49:46 pessi: you around to talk about your patches? May 14 17:51:55 sure May 14 17:52:25 +unsigned int __ofono_modem_add_state_watch(struct ofono_modem *modem, May 14 17:52:27 + ofono_state_watch_func notify, May 14 17:52:28 + void *data, ofono_destroy_func destroy); May 14 17:52:30 + May 14 17:52:31 +gboolean __ofono_modem_remove_state_watch(struct ofono_modem *modem, May 14 17:52:33 + unsigned int id); May 14 17:52:34 + May 14 17:52:36 I'm not quite sure who is the target for those? May 14 17:53:07 aki wanted atoms to know when modem is online or not May 14 17:53:33 what's the use case though? They're not used in your later patches May 14 17:53:34 that makes sense for call atom May 14 17:54:01 hm? May 14 17:54:28 As in, why would I even bother doing a watch instead of just checking the state before doing any action May 14 17:54:30 no, there is nobody using them May 14 17:55:16 aki probably had a use case for them May 14 17:55:26 e.g. Dial -> get state(), if offline, fail May 14 17:55:50 I can't figure out anything May 14 17:56:11 heh, ok, so in general, don't add APIs unless you have an immediate use case May 14 17:56:18 That just confuses everyone :) May 14 18:00:48 the emergency call handling in maemo used similar mechanism May 14 18:01:18 but it was a real pita May 14 18:01:49 I'm not denying it might be useful, but I don't want to introduce any APIs without reviewing the consumers May 14 18:02:01 what you think about the patch in general? I can ditch the watch and add change_state to at modem drivers May 14 18:02:33 +enum ofono_modem_state { May 14 18:02:35 + OFONO_MODEM_STATE_POWER_OFF, May 14 18:02:36 + OFONO_MODEM_STATE_PRE_SIM, May 14 18:02:38 + OFONO_MODEM_STATE_OFFLINE, May 14 18:02:39 + OFONO_MODEM_STATE_ONLINE, May 14 18:02:40 I'm a bit uneasy about the marriage of the atoms and modem states May 14 18:02:41 +}; May 14 18:02:42 + May 14 18:02:44 So I really don't like introducing this May 14 18:03:19 can't we handle all this internally? May 14 18:03:28 what kind of mechanism you would prefer? May 14 18:04:03 I mean I'm fine with online() to enable / disable radio May 14 18:04:26 the sim hot swap is problem here I'm trying to solve May 14 18:04:30 However, I'm not happy with change_state instead of pre_sim / post_sim May 14 18:04:46 haven't we already solved it? May 14 18:05:08 I don't know May 14 18:05:16 Andrew's patches already solve sim hotswap May 14 18:05:33 The only atom affected is sim and voicecall May 14 18:05:55 huh? May 14 18:06:05 all the atoms in post sim state are flushed May 14 18:06:25 As they should be, right? May 14 18:06:39 yep May 14 18:06:55 So the only atoms that deal with sim insertion / removal are sim and voicecall May 14 18:07:04 The online state is entirely separate May 14 18:07:18 other atoms just gets flushed? May 14 18:07:39 yeah, because hotswap implies removing the SIM first May 14 18:07:59 Since all of oFono stores settings by IMSI, we have to flush May 14 18:08:11 Besides, we don't know if the new SIM requires a PIN May 14 18:08:14 so I'm still looking this from the isimodem pow May 14 18:09:16 even if we have sim hotswap, someone has to tell isimodem to go offline mode May 14 18:09:25 so this is not the case with generic atmodem? May 14 18:09:52 It depends on the modem May 14 18:10:05 Some don't allow tx/rx on without a SIM May 14 18:10:12 (probably most) May 14 18:10:16 Others do May 14 18:11:04 I'm actually fine if the core triggers online(false) when the SIM is removed May 14 18:11:56 Or we can assume the driver does it May 14 18:12:54 the point of change_state was to keep drivers simple May 14 18:13:49 so they don't have to keep state and they would have a single function to create atoms May 14 18:14:06 no driver keeps state today May 14 18:14:16 so I'm not sure why this is a concern? May 14 18:17:01 it is just how I did the isimodem driver May 14 18:17:24 because core had atom watch I did not want to duplicate it May 14 18:18:18 and I suspected that all the drivers supporting sim hot swap would also have to add the watch May 14 18:18:45 but perhaps adding call to online(mdoem, false) is better approach here May 14 18:18:55 Not really, no watch required for atoms to support hotswap May 14 18:19:26 so can we take that approach for now? add online to modem driver and an extra populate function May 14 18:19:51 ok May 14 18:22:10 ...and now some stupidd questions about at modems... May 14 18:24:11 can you say at+cops=4 (or something similar) to get modem alive after at+cops=0 ?? May 14 18:24:21 or is is completely modem-specific? May 14 18:24:58 at+cops=0 on nokia modems seems to usually misbehave May 14 18:27:51 but -> sauna May 14 18:30:09 Nope May 14 18:30:20 AT+COPS=0 takes the modem off the bus in most cases May 14 18:32:18 < pessi> akiniemi: is your single-socket client code in main repo yet? May 14 18:32:25 pessi: it's in no repo ;) May 14 18:33:08 pessi: likely a client will always take two sockets May 14 18:33:23 it makes dispatching indications and responses a lot easier May 14 18:34:04 I was planning to take client creation away from the driver probe()s and into the isimodem plugin May 14 18:34:40 ...so we can share clients between atoms, e.g., all those talking to a single ISA resource share a client May 14 18:35:51 But haven't started on this yet May 14 19:04:21 denkenz: ok, that was what I expected... May 14 19:10:19 akiniemi: can we assume all the indications have 0 in trans_id? May 14 19:10:52 pessi: I think it's just more elegant to use a dedicated socket to subscribe to them May 14 19:11:21 That way, we can map NTF requests easily to subscriptions, too May 14 19:11:22 well, that is true May 14 19:11:32 (see my recent patches to gisi client) May 14 19:11:41 ntf use same trans_id? May 14 19:12:25 Of course, they could use transid=0, haven't checked actually... May 14 19:15:11 s/could/should **** ENDING LOGGING AT Sat May 15 02:59:56 2010