**** BEGIN LOGGING AT Sun Jul 18 02:59:56 2010 Jul 18 16:21:02 denkenz: Thanks for the email. I can't get the sim into the online state on huawei e176. Jul 19 01:49:34 denkenz: So about the bluetooth stuff. Jul 19 01:49:59 How are we planning to do DUN? Purely as a plugin with its own D-Bus interfaces. Or as a separate daemon? Jul 19 01:51:11 which DUN profile? Jul 19 01:51:30 The thought is to do DUN client as separate daemon (for the silly dial string stuff) Jul 19 01:51:52 and the DUN server as part of a greater modem emulator framework being atom based inside oFono core Jul 19 01:51:54 For DUN server, I think we do an atom, right? Jul 19 01:52:07 So now what about the client? Jul 19 01:52:22 separate daemon Jul 19 01:52:42 Something like we do with obex-client? So for example dialup-client. Jul 19 01:53:11 I've never peeked into that one, but basically something like a stripped down oFono Jul 19 01:53:24 it can listen to BlueZ dun uuids Jul 19 01:53:34 create modem objects with a simple interface Jul 19 01:53:44 like Connect/Disconnect + Dial String property Jul 19 01:54:06 Then ppp connection info gets emitted similar to how oFono does it Jul 19 01:54:16 So basically gsmdial with D-Bus interface. Jul 19 01:54:37 Yep, a fancy gsmdial Jul 19 01:55:24 Hence why I want bluetooth stuff as a separate lib Jul 19 01:55:35 Are we using purely TTY's as base? Or also direct Bluetooth RFCOMM socket magic? Jul 19 01:55:53 I was assuming same setup as HFP Jul 19 01:56:10 e.g. BlueZ DUN client interface + Agent Jul 19 01:56:14 then fd passing Jul 19 01:57:33 Actually. Doing similar to org.bluez.Network.Connect() would be better. Jul 19 01:57:40 It is more similar to PAN. Jul 19 01:57:56 You connect/dial and you get a network interface back. Jul 19 01:57:58 I'm not sure the Agent is really needed for DUN Jul 19 01:58:01 Would make it easier for ConnMan to use. Jul 19 01:58:26 Probably .Connect/.Disconnect on oFono side and oFono simply owns the connection might be easier Jul 19 01:58:35 BlueZ has a org.bluez.Serial.Connect() that can connect to DUN, but it just gives you a TTY back. Jul 19 01:58:54 Just use BlueZ for device UUID tracking Jul 19 01:59:03 And create modem devices automagically Jul 19 01:59:31 Also we can adjust this internally. Initially use Serial.Connect() and TTY. Then later switch to direct RFCOMM socket. Jul 19 01:59:35 Honestly I think bluez.Serial is overkill for this, especially once we run PPP Jul 19 01:59:49 Doing a direct socket is way better Jul 19 01:59:58 I want this similar to PAN interface. ConnMan calls a method and gets a network interface as result. Jul 19 02:00:41 Sure, but connman doesn't see the details of tty vs socket Jul 19 02:00:50 It doesn't care. Jul 19 02:00:52 So we might as well do it right the first time Jul 19 02:01:04 Especially since we know we want to go in that direction anyway Jul 19 02:01:32 My only point here is that eventually a dialup-client should also be capable to be used over USB with ttyACM0. Jul 19 02:02:09 Yeah, this is up to padovan Jul 19 02:02:22 We can probably do a very similar setup with drivers & jazz Jul 19 02:02:28 just like mini-ofono Jul 19 02:02:42 Not sure if that much is needed. USB is pretty static. Jul 19 02:02:59 So to summarize. Jul 19 02:03:05 You still need at least basic powered / presence tracking Jul 19 02:03:17 We concentrate all bluetooth handling in bluetooth/ directory. Jul 19 02:03:23 After that its just a socket Jul 19 02:03:38 Then we can create a dialup/ directory for the dialup-client daemon. Jul 19 02:05:02 We can argue about names later, but yes that's what I'm thinking Jul 19 02:05:23 bluetooth/ with general BlueZ utilities, dialup/ with the dund Jul 19 02:06:40 I do wanna support dialup over USB as well. If this means we do some udev magic to detect USB modems and alike and not interfere with oFono itself, then that is what we have to do. Jul 19 02:07:51 Yeah, I think we should get proper present / powered logic inside dund Jul 19 02:08:03 Similar to how we do it in oFono Jul 19 02:08:08 But waay simpler Jul 19 02:08:15 Strictly speaking from a Profile point of view, that should not be needed. Jul 19 02:08:20 Then we can support fds from bluetooth or usb Jul 19 02:08:37 However I assume that most modems are just fucked up anyway. Jul 19 02:08:38 Or even TCP/IP :P Jul 19 02:09:23 Yeah I know, if the dial string wasn't necessary we could have made it an oFono atom driver Jul 19 02:10:03 But we'd need to fake some netreg / sim logic, so its a wash Jul 19 02:10:16 You don't see a way that we can make this work as an atom driver? Jul 19 02:10:23 Like some special modem quirk? Jul 19 02:10:48 The core has lots of baggage for something this simple Jul 19 02:11:01 e.g. sim pin, sim presence, netreg suitability, attachment Jul 19 02:11:19 We probably could make it work, but we'd have to short circuit alot of paths Jul 19 02:11:36 So from a ConnMan point of view speaking it would be nice. Jul 19 02:11:44 We save a lot of logic there. Jul 19 02:12:11 Since in the end we just care about if it is a real full blown modem or just a dialup. And that we can easily export. Jul 19 02:13:04 My feeling right now is that unnecessary complexity within the core of oFono is too much crud Jul 19 02:13:15 However, what we *can* do is use the atmodem driver statically Jul 19 02:13:30 That way all the ppp magic comes for free Jul 19 02:13:53 My problem currently is that we would have two daemons running where we could just have one. Jul 19 02:14:45 Sure, but there's also overhead in using oFono setup, since we'd require extra objects Jul 19 02:14:56 As much baggage oFono carries around, it would need to run anyway. So why not just use it. Jul 19 02:15:36 So the Bluetooth plugin would have to create modems (with dialup marker set) for every Bluetooth DUN device we have paired. Jul 19 02:15:46 I'm not set in stone either way actually, just thinking that surgery inside oFono core for this feature might be too invasive Jul 19 02:16:17 lots of paths to check, and the logic for GPRS is actually nasty Jul 19 02:16:34 Lets assume we need the SIM atom, netreg ATOM and GPRS. Wouldn't we just get away with it. Jul 19 02:17:16 We would if the driver provides a custom interface for setting the Dial string Jul 19 02:17:22 Best would be to just do SIM + GPRS actually. netreg + GPRS and one GAtChat is actually nasty. Jul 19 02:17:47 netreg would just return fake info Jul 19 02:17:49 Why do we bother with the dial string. Aren't they suppose to support CGDATA anyway. And if not we can map it. Jul 19 02:18:07 Or that, a special dunmodem/netreg.c driver. Jul 19 02:18:09 Some modems actually require +CGDCONT Jul 19 02:18:18 and ATD*99 Jul 19 02:18:27 + some people use weird contexts for dialup Jul 19 02:18:53 Fair enough. Then it will just fail in some cases. Jul 19 02:19:19 Faking netreg and sim can be done Jul 19 02:19:48 Its the context setup / dial string that is a bit nasty Jul 19 02:19:58 And the complexity of using oFono API for something as simple as DUN Jul 19 02:20:20 oFono API is not really that complex. And ConnMan already supports it anyway ;) Jul 19 02:20:47 Yeah, but your autoconfig magic for PrimaryContexts won't work for instance Jul 19 02:20:57 so someone has to go in and setup the dial string Jul 19 02:21:08 That is something that is nasty anyway and I wanna get rid off. Jul 19 02:21:25 Also, the context info is actually useless Jul 19 02:21:29 We have to figure that out anyway. Jul 19 02:21:36 You really want the dial string and not the context info Jul 19 02:21:57 Why? Jul 19 02:22:11 We can't present that to the end users anyway. Jul 19 02:22:37 Asking them for APN is a complicated enough question. Jul 19 02:23:06 Fair enough, we might need some testing here Jul 19 02:23:19 We could ask for APN and CID if we want a bit more flexibility, but dial string. They can't answer. Jul 19 02:23:21 If 99% of the market simply does a CGDCONT=1,IP,apn Jul 19 02:23:39 Then we can simply use oFono atom driver and be done with it Jul 19 02:23:41 Even the APN question to the shop that sold you the SIM card is sometimes too much. They are clueless. Jul 19 02:24:09 So my Novatel card on Apple MacOS X asks me for APN and CID. That is it. Jul 19 02:24:23 Besides the username/password stuff if I want to. Jul 19 02:24:50 Maybe we just add an extra property for CID and if != 0 then we use that. Jul 19 02:25:24 CID is a bit funny because we actually manage uniqueness internally Jul 19 02:25:37 But we can think of something Jul 19 02:25:59 So I'm fine doing it this way too Jul 19 02:26:08 I know. Initially I would just try 1 and then see what actually fails. Jul 19 02:26:28 You do get alot of stuff for free doing it this way Jul 19 02:26:36 But you need to fake some info Jul 19 02:26:39 Maybe these are all rumors of people having had problems, but they were clueless what they were doing. Jul 19 02:27:02 I could be that 99% really will just work. Jul 19 02:28:52 If we go this direction then bluetooth.c can remain in plugins Jul 19 02:28:59 Though we can still make it a separate lib Jul 19 02:29:11 I have no preference there Jul 19 02:29:52 We can dump some btio stuff from bluez for use by oFono plugins Jul 19 02:30:38 Could be a bit overhead since we only care about RFCOMM clients. Jul 19 02:30:47 The BtIO is more for server connections. Jul 19 02:30:55 We need both eventually Jul 19 02:31:00 e.g. for DUN Server Jul 19 02:31:33 That needs some extra looking into, but in general we can. Jul 19 02:31:54 Yeah we don't have to solve it now, let it evolve Jul 19 02:31:56 So I am all for doing a fake SIM and netreg dunmodem atom driver. Jul 19 02:32:00 But something to keep in mind Jul 19 02:32:25 So lets do this for now, keep bluetooth.c the way it is in plugins/ Jul 19 02:32:31 We will make that a standalone library. Just need to get the Bluetooth 4.0 work sorted out first. It might change some details in actually. Jul 19 02:32:33 Have padovan try the atom approach Jul 19 02:32:42 And see how far we get Jul 19 02:33:51 So the only part left is that when activating the context, we need to establish the Bluetooth connection first. Jul 19 02:34:14 And we need a special marker in the modem properties so that ConnMan can tell that this is dialup thing. Jul 19 02:35:08 Yeah, the semantics of powered are going to be funny Jul 19 02:35:51 Anyway it is worth a try. Jul 19 02:36:05 padovan: I assume you are reading the backlog here. Go with the atom approach for DUN client. Jul 19 02:36:15 And see how far you get with it. Jul 19 02:36:25 sure, just it has some funny problems Jul 19 02:36:50 But maybe they are minimal enough the positives outweigh the negatives Jul 19 02:41:24 I would almost assume so. However we only know after we tried. **** ENDING LOGGING AT Mon Jul 19 02:59:56 2010