**** BEGIN LOGGING AT Fri Jun 11 02:59:57 2010 **** BEGIN LOGGING AT Fri Jun 11 04:19:31 2010 Jun 11 14:20:48 kvalo: I pushed some fixes to your crash problem Jun 11 14:21:03 holtmann: see my comment on git HEAD Jun 11 14:21:26 holtmann: You might want to test your Novatel atchat disconnect handler behavior Jun 11 14:24:30 I'm having troubles with the compound command getting to work. Jun 11 14:24:49 what kind of troubles Jun 11 14:24:49 now I have simplified to a single command and still my parsing fails Jun 11 14:25:11 paste the output and your code snippet Jun 11 14:25:16 right Jun 11 14:25:22 g_at_chat_send(nd->chat, "AT_OCTI?;_OUWCTI?", none_prefix, Jun 11 14:25:23 option_tech_cb, cbd, g_free); Jun 11 14:25:54 ah I post it on pastebin Jun 11 14:26:07 I already see your problem Jun 11 14:26:16 none_prefix is wrong there Jun 11 14:26:28 You want the _OCTI: and _OUWCTI: prefixes in there Jun 11 14:27:01 http://pastebin.com/UkfFVBsy Jun 11 14:28:36 yeah, so something like static const char *hso_techs_prefix[] = { "_OCTI:", "_OUWCTI:", NULL }; is what you want Jun 11 14:29:01 cool, now it works. thanks! Jun 11 14:29:30 I tried that prefix trick today but it did not work. Propably a stupid typo Jun 11 14:29:34 too hot today Jun 11 14:30:13 heh Jun 11 14:34:01 not relying on the notification seems anyway a good idea. Jun 11 14:35:59 depends, it is a good idea if the modem firmware is sane Jun 11 14:36:26 however, they're all pretty much crap Jun 11 14:36:58 now I have only to track the octi/ouwcti output Jun 11 14:37:17 and both report something with AT_OCTI? Jun 11 14:37:26 while AT_OSSYSI? didn't Jun 11 14:37:55 probably just do something like if (octi == 0 && owcti == 0) tech = -1 Jun 11 14:38:03 if (octi > 0) .. Jun 11 14:38:08 if (owcti > 0) .. Jun 11 14:38:39 don't even really need to track them Jun 11 15:16:52 denkenz: just send a new version of the patch. it needs more testing Jun 11 15:17:38 do like the the general structure of it? it's a bit more complicated than I hoped Jun 11 15:28:05 wagi: I think its a bit too complicated Jun 11 15:28:41 wagi: for creg_query, I'd just send owcti/octi query and set tech as before Jun 11 15:30:02 and there's no need to put the parser into atutil, doesn't really belong there Jun 11 15:35:24 yeah, I though about that. but I'd like to have only one option_tech_cb function Jun 11 15:35:51 right, I update the patch Jun 11 15:39:54 so do all the parsing + conversion in one function Jun 11 15:40:00 but two callbacks Jun 11 16:20:02 denkenz: I am not sure if I have enough time for the release. So it might end up being done tomorrow. Jun 11 16:20:12 So feel free to get the tech reporting for HSO merged. Jun 11 16:21:25 holtmann: Its not ready yet anyway Jun 11 16:21:50 You have another 24 hours. Since I will not get to it earlier. Jun 11 16:23:03 its Daniel who has 24 hours ;) Jun 11 16:26:56 yeah :) Jun 11 16:27:11 another version is ready Jun 11 16:27:44 I let you guys sort this ;) Jun 11 16:29:42 have to leave Jun 11 16:55:23 back online Jun 11 16:59:39 + switch (ouwcti) { Jun 11 16:59:40 + case 1: /* UMTS */ Jun 11 16:59:42 + case 2: /* HSDPA */ Jun 11 16:59:43 + case 3: /* HSUPA */ Jun 11 16:59:44 + case 4: /* HSPA */ Jun 11 16:59:46 You might as well parse that properly Jun 11 17:00:07 :) Jun 11 17:00:30 + case OFONO_VENDOR_OPTION_HSO: Jun 11 17:00:32 + /* Jun 11 17:00:33 + * Send AT_OCTI?;_OUWCTI? to find out the current tech, it will be Jun 11 17:00:35 + * intercepted in option_tech_notify Jun 11 17:00:36 + */ Jun 11 17:00:38 + g_at_chat_send(nd->chat, "AT_OCTI?;_OUWCTI?", Jun 11 17:00:39 + option_tech_prefix, NULL, NULL, NULL); Jun 11 17:00:46 That comment is wrong, it actually won't be intercepted in option_tech_notify Jun 11 17:00:55 especially since you set the option_tech_prefix Jun 11 17:02:12 + g_at_chat_register(nd->chat, "AT_OCTI?;_OUWCTI?", option_tech_notify, Jun 11 17:02:13 I registered the option_tech_notify at_creg_set_cb Jun 11 17:02:13 FALSE, netreg, NULL); Jun 11 17:02:24 That is actually wrong too ;) Jun 11 17:02:32 oh damn Jun 11 17:02:57 I'd just do it this way: Jun 11 17:03:11 query_creg -> send octi?owcti? to one callback Jun 11 17:03:20 Set the tech in there, then creg? will fire Jun 11 17:03:27 then in creg_notify: Jun 11 17:03:48 if option quirk -> create a structure with status/lac/ci and fire off octi?owcti to another callback Jun 11 17:04:01 Then report back to netreg in that one Jun 11 17:04:27 No need to mess with g_at_chat_register or add status/lac/ci tracking into the netreg_data Jun 11 17:05:15 e.g. struct tech_query { int status, lac, ci; struct ofono_netreg *netreg }; Jun 11 17:06:50 thanks Jun 11 17:07:51 I'm going to add a concept of transactions to GAtChat Jun 11 17:08:21 so you can do multiple commands and carry along a single data object through all of them Jun 11 17:08:47 We do this kinda in some circumstances, but it becomes extremely ugly to make sure the data object is destroyed properly Jun 11 17:09:58 So things like registration_status implementation will be much easier to do Jun 11 17:10:53 sounds like a good plan to me :) Jun 11 17:16:51 sorry to ask again. me feeling stupid... I have not yet understood where this "query_creg" comes in play. My guess is to add this additional inderection for octi/ouwcti in at_registration_status. Jun 11 17:17:22 yeah, that's what queries creg Jun 11 17:17:56 sorry, I'm taking shortcuts in my explanations ;) Jun 11 17:18:33 no problem. you know sometimes I'm slow in understanding. so I always asume that the problem is on my side Jun 11 17:43:58 denkenz: nice, thanks. I'll test your fixes next week Jun 11 18:31:45 argh, those *!#@+ zerocd thing makes me mad. I'm unable to disable it here at home. usb_switchmode doesn't do the trick Jun 11 18:33:52 google ozercdoff Jun 11 18:35:43 already tried that one. at work ozerocdoff worked but here not. there must be some gremling going around Jun 11 18:36:02 sometimes unplug / replug helps Jun 11 18:36:10 but ozercdoff does the trick for me Jun 11 18:38:09 usbcore: registered new interface driver hso Jun 11 18:38:09 usb 2-1: hso received invalid serial state notification Jun 11 18:38:09 usb-storage: device scan complete Jun 11 18:38:09 scsi 49:0:0:0: Direct-Access SD HSUPA Modem PQ: 0 ANSI: 2 Jun 11 18:38:09 sd 49:0:0:0: Attached scsi generic sg3 type 0 Jun 11 18:38:11 sd 49:0:0:0: [sdb] Attached SCSI removable disk Jun 11 18:38:35 that's what I see after ozerocdoff Jun 11 18:38:48 it's also the same logs for usb_modeswitch Jun 11 18:39:01 funny, probably the option driver in the kernel is screwing up Jun 11 18:39:11 *reboot*? :) Jun 11 18:40:05 "ein reboot tut immer gut" works only in german but it says "a fresh boot is always good" Jun 11 18:40:08 :) Jun 11 18:41:47 anyway the patch looks really nice now. but I can't test it right now Jun 11 18:42:09 heh, send it anyway Jun 11 18:42:47 okay Jun 11 18:50:08 + struct ofono_error error; Jun 11 18:50:09 + Jun 11 18:50:11 + decode_at_error(&error, g_at_result_final_response(result)); Jun 11 18:50:12 + Jun 11 18:50:14 why bother ? :) Jun 11 18:50:48 + if (g_at_chat_send(nd->chat, "AT+CREG?", creg_prefix, Jun 11 18:50:49 + at_creg_cb, cbd, g_free) > 0) Jun 11 18:50:51 + return; Jun 11 18:50:53 + Jun 11 18:51:02 And I'd actually just send the CREG as before Jun 11 18:51:13 If the parser fails, just set tech to -1 Jun 11 18:52:03 same thing here: Jun 11 18:52:04 + struct ofono_error error; Jun 11 18:52:06 + int tech; Jun 11 18:52:07 + Jun 11 18:52:09 + decode_at_error(&error, g_at_result_final_response(result)); Jun 11 18:52:10 + Jun 11 18:52:12 no use decoding the error Jun 11 18:52:19 + if (!ok) Jun 11 18:52:20 + return; Jun 11 18:52:29 That is actually bad, simply report creg but with -1 for tech Jun 11 18:52:42 okay Jun 11 18:53:16 + tq = g_new0(struct tech_query, 1); Jun 11 18:53:18 + if (!tq) Jun 11 18:53:19 + return; Jun 11 18:53:21 + Jun 11 18:53:22 + tq->status = status; Jun 11 18:53:24 + tq->lac = lac; Jun 11 18:53:25 + tq->ci = ci; Jun 11 18:53:27 + tq->netreg = netreg; Jun 11 18:53:28 + Jun 11 18:53:30 + cbd = cb_data_new(NULL, tq); Jun 11 18:53:31 + if (!cbd) { Jun 11 18:53:33 + g_free(tq); Jun 11 18:53:34 + return; Jun 11 18:53:36 + } Jun 11 18:53:37 + Jun 11 18:53:39 Ok, there's no need to actually do both Jun 11 18:53:40 creating tq is enough Jun 11 18:54:24 and if tq creation fails, might be a good idea to simply signal creg Jun 11 18:54:38 as returning is also kinda bad Jun 11 18:54:55 But I think this is basically the approach I like Jun 11 18:55:05 Just clean it up some more and I'll merge it Jun 11 18:55:27 okay, thanks for your input! Jun 11 19:07:34 argh forgot to put v4 through checkpatch Jun 11 19:07:39 of course a trailing space Jun 11 19:09:22 + if (g_at_chat_send(nd->chat, "AT+CREG?", creg_prefix, Jun 11 19:09:23 + at_creg_cb, cbd, g_free) > 0) Jun 11 19:09:25 + return; Jun 11 19:09:26 + Jun 11 19:09:28 + if (cbd) Jun 11 19:09:29 + g_free(cbd); Jun 11 19:09:35 send the CREG in at_registration_status Jun 11 19:10:15 or actually just remove it, since you're doing it twice it seems Jun 11 19:11:05 rest looks good Jun 11 19:11:23 right Jun 11 19:13:03 soon a friend will pick me up for a party Jun 11 19:13:11 this has to fixed till then :) Jun 11 19:14:23 lol Jun 11 19:18:16 have a nice weekend, cu **** ENDING LOGGING AT Sat Jun 12 02:59:56 2010