**** BEGIN LOGGING AT Fri Oct 16 02:59:57 2009 Oct 16 17:46:44 yup everyone Oct 16 17:47:14 just discovered ofono... looks like some magic stuff that can do everything, but I cannot see clearly if I can use it for my project Oct 16 17:48:22 that would be to create a phone interface that can use both voip, rtc and gsm from a computer (with the sound acquired on the computer) Oct 16 17:48:34 could I use ofono to be (part) of the backend ? Oct 16 17:49:03 yes Oct 16 17:49:45 oFono will drive the GSM modem, you still need to perform hardware level integration Oct 16 17:50:01 e.g. getting sound in/out, etc Oct 16 17:52:03 ok Oct 16 17:52:11 and can I use an external phone for this ? Oct 16 17:53:59 theoretically Oct 16 17:54:28 all phones are different, but the basics should work on almost every one Oct 16 17:54:42 Still, there might be utterly broken ones out there Oct 16 17:55:39 aren't they lots of vendor locks or things like that ? Oct 16 17:56:13 Not all phones expose a full set of functionality over usb/bluetooth Oct 16 17:56:36 And oFono is meant as a full-featured stack, that goes over the bare metal (hardware) Oct 16 17:57:05 yeah I can see that Oct 16 17:58:52 thanks Oct 16 18:09:48 zhenhua: ping Oct 16 18:12:28 padovan: PRC comes alive a bit later, though they might already be off for the weekend Oct 16 18:13:48 Feel free to discuss the patch here anyway, since it'll be for my benefit as well Oct 16 18:15:06 denkenz: Right, I'm still trying to test it, test-modem script is not working for hfp. Oct 16 18:15:46 hmm, lemme see Oct 16 18:16:52 Did you setup modem.conf to point to an rfcomm device? Oct 16 18:17:11 You might also wanna establish the connection, not sure if gatchat will work otherwise Oct 16 18:17:30 denkenz: yes, and I did the bind. Oct 16 18:17:49 Yeah, bind worries me Oct 16 18:17:57 Since it does crazy stuff underneath Oct 16 18:37:23 hmm, it's not registering the modem. Oct 16 18:37:51 hmm? Oct 16 18:39:59 denkenz: hfp driver does nothing on hfp_init(), I think it need to register itself on ofono_modem_driver_register. Oct 16 18:40:31 the patch does this... Oct 16 18:41:31 yes, I found that here :-( Oct 16 18:42:16 Make sure hfp is your only modem defined in modem.conf, since enable-modem looks for entry 0 Oct 16 18:42:53 sure Oct 16 18:56:50 Gah, I now see why you submitted that patch ;) Oct 16 19:00:42 so it works for me Oct 16 19:01:02 Of course the driver doesn't get very far since my phone doesn't support CHLD Oct 16 19:03:10 padovan: Here are the steps that I took: Oct 16 19:03:22 edit ofono's modem.conf: Oct 16 19:03:26 [hfp] Oct 16 19:03:28 Driver=hfp Oct 16 19:03:29 Device=/dev/rfcomm0 Oct 16 19:03:51 rfcomm connect 0 Oct 16 19:04:00 ofonod -nd, enable-modem Oct 16 19:04:28 also you probably want to export OFONO_AT_DEBUG=1 before starting ofonod to see the AT commands in their glory Oct 16 19:04:39 hmm. let me see. Oct 16 19:04:58 rfcomm bind probably won't work right now since we open the tty non-blocking Oct 16 19:05:17 And that won't work with bind'ed rfcomms Oct 16 19:16:47 It worked, but failed at BRSF handshake, debugging here.. Oct 16 19:20:06 cool, my failed at CHLD handshake, but I'm using some POS SE phone right now Oct 16 19:23:51 holtmann: Feel free to cut 0.8 at commit eb2c60469cb703999219fd377eae43e185315d12 Oct 16 19:25:42 my bad, it's working, I was using the wrong rfcomm channel. :( Oct 16 20:14:24 denkenz: holtmann: all the HF side of HFP will be at ofono? I mean, will anyhing be done into BlueZ? Oct 16 20:14:54 The current thinking is oFono will be used for proper HFP devices (e.g. GSM, car kits) Oct 16 20:15:27 And perhaps a basic implementation inside BlueZ for VoIP only devices (apparently there's a new HFP rev coming) Oct 16 20:18:30 Right. Oct 16 20:35:19 denkenz: The 0.8 is uploading right now. Oct 16 20:51:21 fuck glib is evil Oct 16 20:51:46 g_at_chat_shutdown: 0x5b852a8 Oct 16 20:51:48 g_at_chat_unref: freed chat Oct 16 20:51:49 read_watcher_destroy_notify: 0x5b852a8 Oct 16 20:51:52 anyone detect a problem? :) Oct 16 21:34:58 end to end compressed voice? Oct 16 21:35:08 speex or celt in firmware? Oct 16 21:36:06 holtmann: do you thing audio service will ever end up in something like pulseaudio? Oct 16 22:12:16 tmzt: Nokia has already done this with N900 Oct 16 22:16:03 sorry, i mean bluetooth audio rather than socket from pulse to bluez/bluetoothd Oct 17 02:05:34 padovan: pong, do you still have question about hfp patch? Oct 17 02:18:54 zhenhua: not about the patch. But I have other questions. Will you keep working on HFP into ofono? Oct 17 02:19:41 we are studying a solution with HFP and maybe we wil help ofono with that. Oct 17 02:20:51 padovan: the answer is yes ;) Oct 17 02:21:06 padovan: yes. Oct 17 02:21:36 padovan: as i said in ML, i am working on voicecall now. :) Oct 17 02:22:09 the multicall is tricky because of status machine. but i believe i can fix them soon. Oct 17 02:24:02 zhenhua: denkenz: do you have a estimative when all should be done? Oct 17 02:24:34 it depends, the current patch needs some work, but its mostly correct Oct 17 02:25:14 The netreg aspect should be trivial Oct 17 02:25:24 I'm looking to it, but I need to read spec yet. Oct 17 02:25:51 voicecalls are a bit tricky, but if we make it work with a 'good' implementation before we focus on crappy ones Oct 17 02:26:13 The real pain is BlueZ audio integration Oct 17 02:26:21 yes Oct 17 02:26:49 I don't know how much changes need to be made at BlueZ side Oct 17 02:26:58 and audio part need a small patch too Oct 17 02:27:29 I see. Oct 17 02:28:14 currently, single call works fine but multiparty call is problematic. HFP always send callsetup/call but no info about which call line status is changed Oct 17 02:28:30 we need keep a status machine here. Oct 17 02:29:12 yep, mostly it can use ideas from the generic voicecall driver Oct 17 02:30:10 Sure. Oct 17 02:32:46 denkenz: do u see any issue with my patch, feel free to let me know Oct 17 02:33:06 Ok, so lets talk about it Oct 17 02:33:25 First off, I don't like the split that you did Oct 17 02:33:46 drivers/hfpmodem/hfp.c needs to be moved into plugin/hfp.c Oct 17 02:34:12 let me check Oct 17 02:35:08 essentially you need to merge those two files together for the most part Oct 17 02:35:31 right. but that would cause plugin/hfp.c a bigger file. Oct 17 02:35:40 That is fine Oct 17 02:35:51 Move AT+CHLD=? query to voicecall driver Oct 17 02:36:13 Also feel free to create a shared structure between plugin/hfp and driver/hfp/* Oct 17 02:36:28 e.g. something like struct hfp_data { }; Oct 17 02:36:41 query CHLD after SLC is created? not after BRSF? Oct 17 02:37:03 why need move CHLD to voicecall. Oct 17 02:37:03 Query CHLD when you initialize the voicecall driver Oct 17 02:37:11 Because it logically belongs there Oct 17 02:37:31 okay Oct 17 02:37:46 but it makes someone may confuse. Oct 17 02:37:56 Basically the plugin/hfp.c should setup things which are shared Oct 17 02:37:59 spec is define the handstake process Oct 17 02:38:02 e.g. BRSF query Oct 17 02:38:06 CIND query Oct 17 02:38:15 SLC establishment Oct 17 02:38:26 so hfp.c is only a part of handshake process Oct 17 02:38:57 I know, but the rest of the handshake can be separated into 2 aspects Oct 17 02:39:01 netreg and voicecall Oct 17 02:39:06 yes. Oct 17 02:39:25 another point: feel free to create a shared structure between plugin/hfp and driver/hfp/* Oct 17 02:39:47 normally we don't share structure between plugins and driver Oct 17 02:39:57 because they should look transparently to user Oct 17 02:40:15 We kinda do, check how quirks are done Oct 17 02:40:16 so i use struct gateway to hide some logic behind Oct 17 02:40:50 do u think we should keep struct gateway Oct 17 02:41:00 But I say this because we need to share the BRSF results anyway Oct 17 02:41:11 which quirks we have? i don't find it Oct 17 02:41:33 We share the quirks definition among multiple plugins Oct 17 02:41:49 i will check it later Oct 17 02:42:02 See drivers/atmodem/vendor.h Oct 17 02:42:19 The other thing is that the driver can simply copy the data it needs into its own structure Oct 17 02:42:33 We don't need to use 1 monolithic struct Oct 17 02:43:15 I'd rename struct gateway into struct hfp_data Oct 17 02:43:18 i will try to study that Oct 17 02:43:33 The only thing you need out of that is GAtChat, int ag_features and GSList *indies Oct 17 02:43:56 and mpty_features too Oct 17 02:44:11 No, that can be part of the voicecall data Oct 17 02:44:23 i see Oct 17 02:44:47 I also suggest breaking GSList *indies into multiple index variables Oct 17 02:44:58 e.g. roaming_index, signal_index Oct 17 02:46:08 You need a handful only anyway, service, call, callsetup, callheld, signal, roam, batt Oct 17 02:46:15 Easier than to parse the GSList every time Oct 17 02:46:17 GSList *indies is Mingjun's old code. so i don't change that part Oct 17 02:46:25 Yah, get rid of it Oct 17 02:46:40 and put all into hfp_data? Oct 17 02:46:45 yes Oct 17 02:47:00 no problem Oct 17 02:47:09 The netreg driver can copy the necessary indices into its own structure if needed Oct 17 02:47:15 i still not get about vendor. Oct 17 02:47:19 same with voicecall data Oct 17 02:47:47 Basically you can share structs between drivers/plugins/etc Oct 17 02:48:20 drivers/atmodem/vendor.h is only a emum Oct 17 02:48:28 enum, not structure Oct 17 02:48:45 yep, but the point is the enum is shared across multiple drivers Oct 17 02:49:03 so there's no difference if it is a struct Oct 17 02:49:08 it's const value Oct 17 02:49:36 do you wanna a static structure that shared across multiple drivers? Oct 17 02:50:12 sorry for my stupid if my question is troubling you. :) Oct 17 02:50:16 Put it this way: drivers/hfp/hfp.h should have struct hfp_data Oct 17 02:50:26 right Oct 17 02:51:01 and you should do something like ofono_voicecall_create(modem, 0, "hfp", hfp_data) Oct 17 02:51:04 then we use memcpy passing it to different driver? Oct 17 02:51:16 and in voicecall_probe you simply do: Oct 17 02:51:25 struct hfp_data *hd = data Oct 17 02:51:32 okay. that should be work fine. Oct 17 02:51:46 then g_new struct hfp_voicecall_data() and copy the data from hfp_data into voicecall_data as needed Oct 17 02:51:48 i am glad to do that. :) Oct 17 02:52:36 get rid of is_rfcomm_tty function, its pointless Oct 17 02:53:05 Get rid of all the pointless state tracking Oct 17 02:53:06 it exists because tty is got from bluez before Oct 17 02:53:30 Doesn't matter, in fact on some systems it might not be called rfcomm0 Oct 17 02:53:43 okay Oct 17 02:53:55 i am also worry about timeout. Oct 17 02:54:08 We don't worry about those details for now Oct 17 02:54:14 Make the protocol work first Oct 17 02:54:31 hfp_cleanup -> move everything over to hfp_remove Oct 17 02:54:35 and it works now. only code structure need change Oct 17 02:54:49 okay Oct 17 02:55:24 Or hfp disable Oct 17 02:55:45 Yeah, hfp_disable is what I meant Oct 17 02:56:14 any other thing? Oct 17 02:57:03 get rid of hfp_service_level_connection Oct 17 02:57:14 Simply initiate the BRSF part in hfp_enable or something Oct 17 02:57:55 + str = g_at_result_iter_raw_line(&iter); Oct 17 02:57:56 + while (str[i] != ')') { Oct 17 02:57:58 + if (str[i] == ',') { Oct 17 02:57:59 + value[index] = '\0'; Oct 17 02:58:00 + ofono_debug("%s", value); Oct 17 02:58:02 + get_mpty_features(&mpty_feature, value); Oct 17 02:58:04 + index = 0; Oct 17 02:58:05 + } Oct 17 02:58:07 + Oct 17 02:58:11 + if (((str[i] >= '0') && (str[i] <= '4')) || str[i] == 'x') { Oct 17 02:58:13 + value[index] = str[i]; Oct 17 02:58:15 + index++; Oct 17 02:58:17 + } Oct 17 02:58:19 + i++; Oct 17 02:58:21 + } Oct 17 02:58:23 yuck Oct 17 02:58:25 why don't you use next_string here? Oct 17 02:58:36 this is Mingjun's code. Oct 17 02:58:41 i don't change that part Oct 17 02:59:06 he want to parse thing like 'CHLD=0, 1, 1x, 2, 2x' **** ENDING LOGGING AT Sat Oct 17 02:59:57 2009