**** BEGIN LOGGING AT Thu Feb 17 02:59:58 2011 Feb 17 03:00:04 zgli: No idea. What is the hs2230? Or give me the subject line of the patch. Feb 17 03:00:47 Enable hs 2330 MBM modem: Feb 17 03:00:56 it's for udev part Feb 17 03:03:42 What is the subject line of that patch? Feb 17 03:04:38 [PATCH] Enable hs 2330 MBM modem: Feb 17 03:04:49 Do you need I send it again? **** BEGIN LOGGING AT Thu Feb 17 07:32:20 2011 Feb 17 13:34:29 holtmann, denkenz: ping Feb 17 15:36:36 tomaszgr: pong Feb 17 15:41:06 denkenz: i have some questions for you regarding gprs contexts management.... ;) Feb 17 15:42:24 My understanding is that if a context is deleted, the next one will be created with an id based on gprs->last_context_id ... Feb 17 15:43:18 cf: gprs.c add_context() with id_map_alloc_next Feb 17 15:43:49 hi denkez, I am implementing +CEREG: UN support in AT modem, and got into some concerns about it. It is status for LTE network so we would have two statuses: one for 3G, one for LTE but the core has one Feb 17 15:45:18 two solutions come to my mind, add second status in oFono gprs OR combine this two into one with some logic Feb 17 15:45:40 any ideas which way to go? Feb 17 15:48:08 OlivierG: could be, it has been a while Feb 17 15:48:26 ok ...i ll dig in the code ;) Feb 17 15:49:06 tomaszgr: I suspect LTE will need its own atom Feb 17 15:50:24 OlivierG: From what I remember the idmap tries to emulate the pid map from the kernel, so deleting a context and adding a new one will not get you the id of the deleted context Feb 17 15:52:26 As i m trying to completly implement the +CGDCONT, i m facing the problem where you can delete a specific context (eg: +CGDCONT=3) then, create a new one with the same cid (eg: +CGDCONT=3,"IP") .... Feb 17 15:53:20 The context management inside oFono and CGDCONT don't really map Feb 17 15:53:39 Which is why I don't really want to consider this problem right now Feb 17 15:55:15 I m not talking about the "modem side" but i m focused on the emulator side (for DUN)... i can understand that is not a high priority ;) Feb 17 15:56:37 CGDCONT is not required by BT DUN Feb 17 15:57:12 And in some respect I don't even want to expose the configured GPRS contexts to the emulator Feb 17 15:57:29 So all of this might have to be just faked Feb 17 15:57:41 ok...i see ... Feb 17 15:59:52 denkenz: hello, I have some unwanted emulator disconnection: Feb 17 15:59:53 - if I connect to the emulator sample using telnet while modem is enabled, I am able to use online-modem/offline-modem several times Feb 17 15:59:53 - if I connect when modem is online, first call to offline-modem remove the emulator atom Feb 17 16:00:02 HFP needs to keeps the connection during time modem is enabled, even if connection occured when modem is online (it should not disconnect if signal is lost) Feb 17 16:00:58 fdanis: known bug, the atom is created with the same state as the modem, so if the modem is moved to a lower state the atom is removed Feb 17 16:02:40 denkenz: do you have any idea how to fix it ? Feb 17 16:02:40 I did not find one, and HFP also needs to support multiple clients Feb 17 16:03:18 We'll need some way to override the atom state down to offline Feb 17 16:03:42 either a new atom_register variant or a setting function Feb 17 16:09:00 fdanis: btw, in hfp_ag_connect_cb, do we even need a shutdown call? Feb 17 16:09:12 Can't we simply return and have the socket be closed on unref? Feb 17 16:11:05 denkenz: not sure to understand your question, fdalleau fixes the disconnection problem, do you see his fix ? Feb 17 16:11:25 Yeah I applied it Feb 17 16:11:33 But we also have a goto failed in there Feb 17 16:11:49 and a g_io_channel_shutdown at that label Feb 17 16:11:57 The question is whether we can simply return Feb 17 16:13:53 denkenz: you are right, this is no more needed Feb 17 16:14:41 denkenz: do you mean own gprs atom for a new atmodem lte driver? Feb 17 16:16:05 My current thinking is that a brand new atom is needed for LTE bearer management Feb 17 16:16:29 This might include an lte attach status Feb 17 16:19:14 wouldn't it be almost a 1:1 copy of current gprs atom? just extended by lte status? Feb 17 16:22:03 we would need to hand over active contexts between atoms when the barier changes Feb 17 16:22:12 last time I thought about this, which was 3 months ago, the atom was different enough Feb 17 16:22:36 But then I have no LTE hardware or network to play with, so all of this is pure conjecture ;) Feb 17 16:26:14 ok :) well, I am not in much better position but I have some hardware posibilities, for me easiest and cleaniest way would be adding lte status to current gprs atom, but yes, this would break assumption of one atom for one thing Feb 17 16:28:00 I might not be aware of everything, but it looks like 3g, lte and 3g/lte modems differ mainly in having CGREG and CEREG UNs from at commands point of view (+ initial PDN) Feb 17 16:36:41 I need to go, I'll put on the mailing list a patch with proposal for doing this, to have some background for discussion Feb 17 17:03:19 denkenz: for online/offline, I can add __ofono_modem_add_atom_offline() to ofono.h which force atom->modem_state to MODEM_STATE_OFFLINE Feb 17 17:03:19 are you ok with this ? Feb 17 17:08:41 fdanis: why do you need this? Feb 17 17:11:01 padovan: atom created in online state are destroyed when modem goes to offline state Feb 17 17:11:58 HFP needs to stay connected Feb 17 17:14:37 fdanis: Either that or simply hardcode __ofono_modem_add_atom to add emulators in offline mode Feb 17 17:15:06 denkenz: which one do you prefer ? Feb 17 17:15:06 Or maybe we need to bite the bullet and expose modem states into ofono.h Feb 17 17:15:19 Do the atom_offline for now Feb 17 17:40:53 ofonod[31910]: Replied with an error: org.freedesktop.DBus.Error.Spawn.ChildExited, Launch helper exited with unknown return code 1 Feb 17 17:41:08 denkenz: I keep seeing these now. Do you see them as well or is just a Fedora screwup? Feb 17 17:41:32 Haven't seen these myself Feb 17 17:45:21 I think they updated my D-Bus package. Feb 17 17:45:35 Sounds to me like D-Bus autostart or crap like that. Feb 17 17:48:29 denkenz: It is the Bluetooth support. Feb 17 17:48:44 funny Feb 17 17:49:00 I haven't tested the BT support since I don't have bluez installed Feb 17 17:49:15 holtmann: where exaclty? Feb 17 17:49:52 No idea. It must call a org.bluez with something unknown. Feb 17 17:50:10 Maybe the any adapter stuff. However dbus-daemon tries to autostart something. Feb 17 17:50:51 Either add_record_cb or find_adapter_cb Feb 17 17:50:52 Is is on oFono powered -> online state? Feb 17 17:51:07 Nope. It is on ofonod start. Feb 17 17:51:16 All modems powered off. Feb 17 17:56:08 Nothing here. Feb 17 17:56:16 Ah, I had an ideia. Feb 17 18:07:53 So bluetooth_ref sends commands without checking if BlueZ is up and running. Feb 17 18:08:12 bluetooth_watch = g_dbus_add_service_watch(connection, BLUEZ_SERVICE, Feb 17 18:08:12 NULL, bluetooth_disconnect, NULL, NULL); Feb 17 18:08:36 So what is this? There is pure disconnect watch in gdbus. Or you do implement the bluetooth_connect callback. Feb 17 18:13:04 bc793d94 (Frédéric Danis 2011-02-04 19:46:17 -0200 794) bluetooth_send_with_reply("/", BLUEZ_MANAGER_INTERFACE, "GetProperties", Feb 17 18:13:04 bc793d94 (Frédéric Danis 2011-02-04 19:46:17 -0200 795) manager_properties_cb, NULL, NULL, -1, Feb 17 18:13:04 bc793d94 (Frédéric Danis 2011-02-04 19:46:17 -0200 796) DBUS_TYPE_INVALID); Feb 17 18:13:04 bc793d94 (Frédéric Danis 2011-02-04 19:46:17 -0200 797) Feb 17 18:13:07 e0c1c155 (Frédéric Dalleau 2011-02-11 10:31:05 +0100 798) bluetooth_send_with_reply("/", BLUEZ_MANAGER_INTERFACE, "FindAdapter", Feb 17 18:13:10 e0c1c155 (Frédéric Dalleau 2011-02-11 10:31:05 +0100 799) find_adapter_cb, NULL, NULL, -1, Feb 17 18:13:13 e0c1c155 (Frédéric Dalleau 2011-02-11 10:31:05 +0100 800) DBUS_TYPE_STRING, &adapter_any_name, Feb 17 18:13:16 e0c1c155 (Frédéric Dalleau 2011-02-11 10:31:05 +0100 801) DBUS_TYPE_INVALID); Feb 17 18:13:26 A dbus disconnect will fit better there. I didn't figured out when I wrote that the first time Feb 17 18:13:29 fdanis: You can not just call a D-Bus message without ensuring that the daemon is running. Feb 17 18:13:47 we can also do this: Feb 17 18:13:48 if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN)) { Feb 17 18:13:48 DBG("Bluetooth daemon is apparently not available."); Feb 17 18:13:48 goto done; Feb 17 18:13:48 } Feb 17 18:14:02 padovan: No. That is fully wrong. Feb 17 18:14:28 You need to monitor when the daemon becomes available. And only then bootstrap. Feb 17 18:15:06 So the error was clearly visible, but it got ignored and hacked around. Feb 17 18:15:10 Please fix this properly now. Feb 17 18:16:42 I think this bug has been there for a long time Feb 17 18:16:55 Probably ever since the original hfp implementation Feb 17 18:17:25 Could be. Nevertheless it just got hacked around now when adding more logic to it. Feb 17 18:18:15 denkenz: yes, it's from the original hfp code Feb 17 18:18:21 padovan: Also the connect callback from the service watch will be automatically called if the daemon is already running. Feb 17 18:18:41 I remember when I wrote that bug. ;) Feb 17 18:18:52 likely it never came up because bluetoothd was always running in our testing Feb 17 18:19:02 But as I said, I don't even have bluez installed :P Feb 17 18:19:26 Fedora is making bluetoothd exit if no devices are present (rfkill). Feb 17 18:19:26 holtmann: yes, I'm changing the code to have a connect callback, and then start the DBus cals from there. Feb 17 18:21:21 And we actually don't need to call Manager.GetProperties, we are already sticked to the AdapterAdded property Feb 17 18:21:54 zrafa: around? Feb 17 18:21:55 what if we're started after? Feb 17 18:22:48 denkenz: yeah, that is the reason in have both triggers Feb 17 18:22:52 demarchi[WORK]: yes Feb 17 18:22:57 I can remember now. Feb 17 18:23:21 interesting... why do i have this nick? Feb 17 18:23:45 because you are supposed to be working now... Feb 17 18:23:48 i don't remember connecting from anywhere else Feb 17 18:24:31 zrafa: so... about your gps patches Feb 17 18:25:00 zrafa: why do you keep an fd when you open the device and send it through dbus? Feb 17 18:25:06 padovan: You need to call that one. Feb 17 18:25:25 padovan: It could be that bluetoothd is already running. Then you missed the AdapterAdded signal. Feb 17 18:26:21 Yes, Denis just made me figure out that now. Feb 17 18:26:45 demarchi[WORK]: because the api changed completely since you check last time I guess. Now the atom should give via dbus the fd to the external client who asked for it. when external client releases it ofono should close the file. Feb 17 18:27:12 but dbus will dup the ff Feb 17 18:27:15 s/ff/fd/ Feb 17 18:27:27 no need to keep it open Feb 17 18:28:39 demarchi[WORK]: that is like the api was decided. You can change and modify it again ;) Feb 17 18:33:06 demarchi[WORK]: if you do not keep it open, why we would send a fd to some external client?. It would not be a fd Feb 17 18:33:37 demarchi[WORK]: You might wanna keep the fd around. So you can do a shutdown() on it. Feb 17 18:33:38 zrafa: it's a dup'ed fd Feb 17 18:33:47 From oFono side that is. Feb 17 18:34:10 Only if you don't need any control over the fd anymore at anytime, you can just close it. Feb 17 18:35:50 holtmann: but it's not a socket Feb 17 18:37:57 True, I have never tested this on device nodes. Feb 17 18:38:27 Would be good to know if that works as well. However then a close() should trigger a HUP on the duped fd. Feb 17 18:38:52 We don't really know what type of fd it is Feb 17 18:38:57 It might be a socket as well Feb 17 18:39:04 e.g. caif socket or phonet socket Feb 17 18:39:13 also, since the driver opened the device, it's its role to know if it's a socket or not Feb 17 18:39:27 so, no need to the fd on core Feb 17 18:40:07 s/need to/need to keep/ Feb 17 18:41:18 i'd keep the fd inside the driver Feb 17 18:41:48 But I think I need to keep the Feb 17 18:41:48 - if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN)) { Feb 17 18:41:49 - DBG("Bluetooth daemon is apparently not available."); Feb 17 18:42:16 denkenz: then i remove the ofono_location_reporting_get_fd Feb 17 18:42:49 holtmann: what happens if bluetoothd goes down just after ofonod sends a method call. then that check is still needed. Feb 17 18:44:05 demarchi[WORK]: sure Feb 17 18:46:50 padovan: You can cancel outstanding D-Bus method call in case the daemon goes down. Feb 17 18:46:57 Also the error will be a timeout then. Feb 17 18:48:05 no such service probably Feb 17 23:56:44 denkenz: Don't you want to combine sim_file_read and sim_add_file_watch into something like sim_file_read_and_watch that does all the magic for you? Feb 17 23:57:19 At least for simple case where you just have to re-read that single file? Feb 17 23:57:21 not really, there are some places that don't care Feb 18 00:17:44 Just giving a NULL handler or having an extra helper might work then. Feb 18 00:18:33 let this evolve a bit, right now it is not needed Feb 18 00:19:12 we also need to let watches and file reads be cancellable separately Feb 18 00:19:48 Fair enough. Looked just like same code over and over again, when I reviewed it. **** ENDING LOGGING AT Fri Feb 18 02:59:57 2011