**** BEGIN LOGGING AT Tue Nov 10 02:59:57 2009 Nov 10 04:53:02 denkenz, holtmann ping Nov 10 15:36:05 holtmann, martin_office: I'm here now **** BEGIN LOGGING AT Tue Nov 10 16:04:06 2009 Nov 10 16:42:10 denkenz: Martin will be sleeping. Nov 10 17:07:22 denkenz: You were still on #connman and followed what Martin had commented about his patches? Nov 10 17:31:30 holtmann: Yes, but I don't really understand his points Nov 10 17:32:11 holtmann: The context in oFono can exist without having an interface Nov 10 17:36:27 holtmann: So connman plugin has to wait until activated is true and grab the interface then Nov 10 17:40:32 It is kinda chicken and egg problem. We have to have the interface to create connman_network. Otherwise it doesn't show up. If it doesn't show up, we can't click connect. Neither do auto-connect. Nov 10 17:41:03 Problem is, I might have n contexts defined Nov 10 17:41:08 We can work around it, but I am not sure if we really want that. However a lot of times we only know at attach time which interface name we get. Nov 10 17:41:10 And only 1 active at a time Nov 10 17:41:14 s/attach/activate/ Nov 10 17:41:29 We gonna map each context to its own network. Nov 10 17:41:41 So if you configure two with "internet" they both will show up. Nov 10 17:41:51 That's fine I think Nov 10 17:42:01 However, the device might be "shared" between them Nov 10 17:42:19 And with ppp, we don't know what the device is until we create the tun device Nov 10 17:44:10 holtmann: Also consider that we might have weird setup where we can do high-speed on one port and ppp on another Nov 10 17:44:17 Not sure if the interface will be shared actually. We have no clue at all, but yes, with PPP we only get the interface name when activated. Nov 10 17:44:31 The first context will get the high-speed, the second will get ppp, but unknown until runtime Nov 10 17:45:04 holtmann: It has to be shared Nov 10 17:45:09 I think the newer MBM support multiple high-speed interfaces. Our kernel driver is just too stupid to recognize them. Nov 10 17:45:15 holtmann: If we have internet and visual voicemail for instance Nov 10 17:45:36 holtmann: Sure, but HSO devices only support 1, correct? Nov 10 17:46:03 The current data cards yes, I am not sure about their voice capable cards. I think they have some firmware that can do more than one. Nov 10 17:46:31 But that's the issue, you can have 200 contexts defined Nov 10 17:46:38 But only up to 11 active Nov 10 17:46:48 More like 1-3 on most devices Nov 10 17:47:02 Never the less, I think we just have to listen to the PropertyChanged for Interface and deal with the fact that we have to set the ifindex later. Maybe needs some fixing in ConnMan. Nov 10 17:47:40 We will have to figure out the limits of these cards eventually. I really have no clue what is possible with certain hardware. Nov 10 17:48:00 So that's my point Nov 10 17:48:12 You either have to make connman deal with this, or we have to redesign the GPRS API Nov 10 17:49:07 Personally I don't like it. However if we assume that we always send PropertyChanged("Interface", ...) before PropertyChanged("Active", true) we should be good. Nov 10 17:49:30 Otherwise we are in race condition hell and do round-trips like crazy. Nov 10 17:49:59 We could make 'Active' a readonly property Nov 10 17:50:08 and have a proper Activate/Deactivate methods Nov 10 17:50:17 Activate might event return the 'interface' Nov 10 17:50:43 Having Activate and Deactive method seems better right now. Nov 10 17:51:11 Besides the interface we also need the IP method (DHCP or static) and the address details. Nov 10 17:51:27 Yeah, we need to discuss that Nov 10 17:51:47 We never documented how we do address selection Nov 10 17:52:41 Actually thinking about it, we might wanna do an Activated signal that contains a dict with all the details. Nov 10 17:53:20 and break our PropertyChanged rule? Nov 10 17:53:36 Or not have IP/Gateway as properties at all? Nov 10 17:53:52 We might not wanna have these as properties at all in this case. Nov 10 17:53:59 Including interface. Nov 10 17:54:25 Or we do dict of dict. Nov 10 17:54:41 dict of dict? Nov 10 17:54:46 dict of variant more like Nov 10 17:55:14 Someting like PropertyChanged("Connection", { "Interface": "ppp0", "Address": "192.168.0.1", ... } ) Nov 10 17:55:24 Or call it "Settings". Nov 10 17:56:01 Yuck, glib-dbus weenies will hate us Nov 10 17:56:09 Actually I like that one more. This way you only listen to one signal. Nov 10 17:56:23 And you get all the required details at once. Nov 10 17:57:03 yes, but you do realize that we 'Settings' is a dict of variants Nov 10 17:57:12 So we can send out "Active" when we get it. Then ConnMan can move over to CONFIGURATION state, then gets the "Settings" details, configures the interface and is READY. Nov 10 17:57:37 PropertiesChanged is a variant too Nov 10 17:57:43 hence we get nested variants, fun :) Nov 10 17:57:46 It is a a{sa{sv}} Nov 10 17:58:11 we don't need a nested dict Nov 10 17:58:19 just a{sv} Nov 10 17:58:21 And yes, so be it. dbus-glib should be able to handle it. Zeuthen does something crazy like that with PolicyKit1. Nov 10 17:58:34 ??? Nov 10 17:58:51 why do you need a nested dict? Nov 10 17:58:52 My bad that was for GetProperties ;) Nov 10 17:58:58 heh Nov 10 17:59:03 The signal is sa{sv} Nov 10 17:59:13 signal is sv Nov 10 17:59:23 And in this case the v is a{sv} Nov 10 17:59:40 correct, so sa{sv} :) Nov 10 17:59:49 D-Bus wire protocol wise it results in some nasty containers, but whatever. Nov 10 18:00:20 Anyway, I'm fine with that Nov 10 18:00:28 I think that is the only way to do it without race conditions and not complicating it with too many methods and signals. Nov 10 18:00:49 So Activated -> True, Settings -> dict Nov 10 18:00:57 Activated -> False, Settings -> Empty Dict Nov 10 18:01:09 Emitted in that order Nov 10 18:02:38 Not sure if we need the Settings empty, but for completion it makes sense. Nov 10 18:03:05 We might wanna emit the Settings empty before Activated false, so that ConnMan can clean up the interface before it goes away. Nov 10 18:03:27 What's the difference? Nov 10 18:03:54 strictly speaking we shouldn't even bother for empty settings Nov 10 18:04:04 useless signal anyway Nov 10 18:04:13 Yeah. Just easier for some code path in ConnMan. Nov 10 18:04:15 denkenz: ping Nov 10 18:04:38 padovan: pong Nov 10 18:04:49 holtmann: ok, that's simple enough anyway Nov 10 18:05:39 martin_office: Just read the backlog when you are up. Nov 10 18:07:21 denkenz: I trying to understand the HFP API. To it will works this way: oFono will call org.bluez.HFGW.RegisterAgent and registry it org.bluez.HFAgent, then someone will call org.bluez.HFGW.Connect, which will create a rfcomm link and call the NewConnection method of oFono. Nov 10 18:07:55 denkenz: the oFono ofono will do HFP protocol stuff as it does today. Am I right? Nov 10 18:08:28 padovan: yep, when ofono starts up it looks for all devices with Gateway interface, then creates a modem for each and registers an agent for it Nov 10 18:09:03 padovan: Then either gateway connects / someone calls bluez.Gateway.Connect / someone calls ofono.modem.powered brings up the rfcomm link Nov 10 18:09:22 padovan: NewConnection gets called and ofono does the hfp part as usual Nov 10 18:11:48 denkenz: and when does the SCO is created? Nov 10 18:12:09 jprvita: The AG controls that part Nov 10 18:12:57 hum, ok Nov 10 18:13:19 denkenz: So, I will start with gw.RegisterAgent stuff, and then gw.Connect Nov 10 18:14:00 jprvita: Speak to jhe about it, he knows that part inside out Nov 10 18:14:05 padovan: Sounds good Nov 10 18:14:10 so basically bluez will have to way for a SCO connection from AG, handle the handshake and then pass a fd to one of its audio clients (pulse, alsa) Nov 10 18:15:56 denkenz: I know a bit about it too, since I did the pulse module for HSP/A2DP, and I guess this part would be similar Nov 10 18:16:36 just trying to figure if some changes would be needed on pulse part for HFP Nov 10 18:20:09 jprvita: I doubt it Nov 10 18:20:25 jprvita: But I'm not up to date on how the audio part works anymore Nov 10 18:22:18 denkenz: right, I'll check with jhe latter Nov 10 18:22:51 jprvita: Remember BlueZ already has an HFP Client implementation that works with SCO over HCI Nov 10 18:23:12 jprvita: So I'm assuming the existing infrastructure should handle hfp protocol residing in ofono Nov 10 18:27:07 I'll have a look at that Nov 10 18:27:51 holtmann: We still need to figure out whether to do DHCP assignment from connman or to somehow use static assignment on the device Nov 10 18:28:27 holtmann: So having IP/DNS/Gateway as attributes might actually be required Nov 10 19:28:32 hey, I've just notice the alt text for the "About" link in ofono.org says "About ConnMan" Nov 10 19:28:43 don't know who's the responsible for the website Nov 10 19:29:05 denkenz: I would just add something like "Method" : (dhcp, static) to the Settings dict. Nov 10 19:31:23 denkenz: And GetProperties should return "Settings" of course. So you get all that. Except they are nested, but hey only ConnMan should care about these details aynway. Nov 10 19:43:38 holtmann: But how would set the 'settings' Nov 10 19:44:01 Assuming I want a static IP setup, I must provide IP, Gateway, DNS Nov 10 19:44:16 I'd hate to have to parse & validate the dict :) Nov 10 19:44:21 oFono sets these based on the results it gets from the network. Nov 10 19:44:32 ConnMan will never set them. Nov 10 19:44:38 s/oFono/ Nov 10 19:44:48 ConnMan reads these details and then configures the interface. Nov 10 19:44:59 holtmann: Yes, but can't you have a static IP setup? Nov 10 19:45:08 You lost me. Nov 10 19:45:11 holtmann: In which case the settings need to be passed down to the context Nov 10 19:45:35 holtmann: Ok, lets restart Nov 10 19:45:46 holtmann: You can do assignment via DHCP, or statically Nov 10 19:46:13 holtmann: If DHCP, then IP/Gateway/Netmask/DNS oFono has as blanks, and connman takes care of Nov 10 19:46:21 Yes. MBM being the DHCP exception. Nobody else will implement a DHCP server in their firmware. Nov 10 19:46:39 holtmann: If Static, then these must be setup when context is created Nov 10 19:46:42 Mainly Settings : { Method: DHCP } Nov 10 19:46:54 holtmann: And the information passed down to activate_primary() Nov 10 19:47:16 For static: Settings : { Method: static, Address: 192.186.0.1, ... } Nov 10 19:47:42 That is both from a D-Bus API point of view. Nov 10 19:47:47 Yes, so I must parse the dict full of variants Nov 10 19:47:55 oFono is not touching the IP configuration of the interface. Nov 10 19:47:56 Anyway, can be done, but nasty Nov 10 19:48:16 Seriously. No idea what you wanna parse. You just have to build that dict of dict. Nov 10 19:48:17 Actually, MBM allows you to setup all of those parameters Nov 10 19:48:38 I think you are confusing something here. Nov 10 19:49:23 oFono will activate the context, and then start PPP or whatever method, then get the IP details and export it over D-Bus. MBM is just an exception where it just exports Method=dhcp. Nov 10 19:49:46 Then ConnMan picks up these settings and puts them on the interface. Nov 10 19:50:00 In case of static it just sets them, in case of dhcp it start dhcp. Nov 10 19:50:50 holtmann: Look for AT*EIAIPCPW Nov 10 19:51:13 holtmann: I think static IP assignment by the user is possible Nov 10 19:51:37 Then just ignore that. We don't have to implement it.