**** BEGIN LOGGING AT Tue Jun 28 02:59:58 2011 Jun 28 05:00:31 Hello Jun 28 05:00:34 everyone Jun 28 05:00:54 Anybody has worked on ofono Plugin for Connman Jun 28 05:00:56 ?? Jun 28 05:01:04 for GPRS Jun 28 05:01:04 ? Jun 28 13:39:09 Anybody has worked on ofono Plugin for Connman Jun 28 13:39:11 ? Jun 28 13:44:38 rishi_: Hi, yes I have started to work on it, but for now I am waiting for the Private network patches to be applied on ConnMan side to submit a new version to oFono. Jun 28 17:11:35 Anybody here had luck with F3607gw UTMS modems in ofono 0.50? Jun 28 17:12:22 With MeeGo (hand built ofono-0.50 pkg) list-modems shows nothing. Jun 28 17:12:40 ...although ifconfig shows wwan0 (udev seems to work.) Jun 28 17:13:42 The F3607gw is a HP device (Ericsson really but relabeled by HP.) Jun 28 17:14:02 ...and this relabeling is the reason I handbuilt the latest sources. Jun 28 17:14:23 Using the MeeGo 1.2 distro ofono 0.48 didn't work either. Jun 28 17:34:03 MSvB: You will have to step-through add_mbm to figure out what is wrong, not much anyone can do to help you without having the hardware Jun 28 17:49:34 Hello Denis, but what is the proper way to know when things are working correctly? Jun 28 17:50:00 It seems that the ofonod -n -d plugins/udev* command you suggested shows the correct output, right? Jun 28 17:50:27 ...so the question becomes 'how can I debug this problem?' Jun 28 17:56:09 MSvB: no, -d option simply prints debug output Jun 28 17:56:28 you know the modem is detected correctly when it shows up in list-modems Jun 28 17:57:03 denkenz: Okay that's what I thought, so I can use the list-modems command indeed. Jun 28 17:57:16 The earlier patch should make this all work, unless there are funny characters in the usb descriptions Jun 28 18:05:23 denkenz: Doing my best to try to find the mismatch... Jun 28 18:06:15 lsusb is no help, it only produces 'Bus 001 Device 004: ID 03f0:271d Hewlett-Packard'. Jun 28 18:10:17 dmesg | grep -i broadband gives... Jun 28 18:10:27 [ 1.988239] usb 1-5: Product: HP hs2330 Mobile Broadband Module Jun 28 18:10:29 [ 1.993377] usb 1-5: Manufacturer: ðHP hs2330 Mobile Broadband Module Jun 28 18:10:31 [ 10.394978] cdc_ether 1-5:1.6: wwan0: register 'cdc_ether' at usb-0000:00:1d.7-5, Mobile Broadband Network Device, 02:80:37:ec:02:00 Jun 28 18:11:27 ...but udev.c does not have 'g_str_has_suffix(desc, "Broadband Module") || Jun 28 18:11:47 ...rather it has "Broadband Modem" Jun 28 18:12:47 There are four places to try to change this in udev.c. Jun 28 18:13:25 Where each block tests what ofono_modem_get_string(modem, ...) returns. Jun 28 18:14:14 The four blocks correspond to 'MODEM_DEVICE', 'DATA_DEVICE', 'GPS_DEVICE', 'NETWORK_INTERFACE'. Jun 28 18:31:09 MSvB: the contents of 'desc' variable is already printed in the debug statement Jun 28 18:31:21 They do not necessarily match what dmesg has Jun 28 18:33:18 denkenz: ofonod -n -d reports that all four modem udev events are correctly matched now. Jun 28 18:33:28 ...I had to really hack the crap out of udev.c. Jun 28 18:34:09 So does add_mbm get to the point of calling ofono_modem_register? Jun 28 18:34:13 What I mean is that my HP butchered F3607gw has one binary character causing the g_str_has_suffix to fail. Jun 28 18:34:37 That's what I thought Jun 28 18:34:56 denkenz: You want me to find out if ofono_modem_register is being reached? Jun 28 18:35:06 I would have to rehack/recompile/install/run... Jun 28 18:35:10 If it Jun 28 18:35:12 If Jun 28 18:35:32 If it's important I'll do it, but my gut feeling is that list-modems has proven that no? Jun 28 18:35:48 If the g_str_has_suffix is failing, then it won't register Jun 28 18:36:18 Anyway, the hack I did was to match for 'Data Modem'. I don't like that. Jun 28 18:36:30 Such a general match is probably not good. Jun 28 18:36:47 Is there another function besides g_str_has_suffix that I can consider? Jun 28 18:36:59 I guess g_str is part of glib-2. I Jun 28 18:37:20 Which string has the binary character? Jun 28 18:37:26 I'd rather not hand-hack together something with strncmp(3). Jun 28 18:37:49 The very first entry of ofonod that I wrote in the email. Jun 28 18:38:16 It is 'HP hs2330 Mobile Broadband Module| Data Modem Jun 28 18:38:34 ...but I think the 'bar' after Module is a binary character. Jun 28 18:38:39 Not sure why its there. Jun 28 18:38:58 Because HP is stupid Jun 28 18:38:58 And maybe it is just an ASCII bar as well, no idea. Jun 28 18:39:14 It looks like it is non-printable, since it isn't showing up in the email Jun 28 18:39:46 Yeah, this is lame. So if you have no idea, I'll start looking around the glib docs. Jun 28 18:39:47 can you quickly hexdump the output? Maybe we can insert it using hex form into the g_str Jun 28 18:39:58 Ah, that's a good idea. Jun 28 18:40:15 I'll have to recompile. Wait. Jun 28 18:50:04 denkenz: Okay you ready? Here it is... Jun 28 18:50:26 The end of the line is 'Module Data Modem.' But... Jun 28 18:50:56 Between the 'Module' and 'Data' there is no 0x20 space character as there should be. Jun 28 18:51:45 Instead, between the 0x65 e character and 0x44 D character are two byes: Jun 28 18:52:51 Or are they byes? In any case, DBG("... %x") is outputting ffffffc2 and then ffffffa0 instead of the space character. Jun 28 18:53:26 That looks like two negative byte long numbers to me. Jun 28 18:55:07 They are signed chars being converted to unsigned ints Jun 28 18:55:28 can you cast to unsigned char first, otherwise this is hard to decipher Jun 28 18:55:38 denkenz: Okay, hold on. Jun 28 18:58:51 ...the two problem characters are 0xc2 and 0xa0. Jun 28 18:59:05 Ok, so if we do: Jun 28 18:59:39 g_str_has_suffix(desc, "Module\xc2\xa0Data Modem") Jun 28 18:59:41 will things work? Jun 28 19:00:10 Good question, I was just browsing through the gnome developer docs where g_str_... are documented. Jun 28 19:00:13 I'll try it. Jun 28 19:03:31 Didn't work, but I think it's because \xa0 is being interpreted as \xa0D rather. Jun 28 19:03:55 yes, you probably need to do ..\xa0" "Data Modem" Jun 28 19:04:07 just unlucky with the capital D I guess Jun 28 19:04:49 pain in the ass ;) Jun 28 19:12:08 Hmm. Computer overheated, that's a first. Okay I'm still checking this out with the hex values. Jun 28 19:12:22 Seems to me that we're almost finished with adding a new device. Jun 28 19:23:55 Okay, now list-modems is reporting: Jun 28 19:24:06 [ /0044017003593710 ] Jun 28 19:24:08 Features = sim Jun 28 19:24:10 Emergency = 0 Jun 28 19:24:12 Powered = 1 Jun 28 19:24:14 Lockdown = 0 Jun 28 19:24:16 Interfaces = org.ofono.SimManager Jun 28 19:24:18 Online = 0 Jun 28 19:24:20 Model = hs2330 Jun 28 19:24:22 Revision = R1G05 Jun 28 19:24:24 Serial = 004401700359371 Jun 28 19:24:26 Manufacturer = Ericsson Jun 28 19:24:28 [ org.ofono.SimManager ] Jun 28 19:24:30 Retries = [pin2 = 3] [puk2 = 10] [pin = 3] [puk = 10] Jun 28 19:24:32 FixedDialing = 0 Jun 28 19:24:34 SubscriberNumbers = Jun 28 19:24:36 PreferredLanguages = de en fr Jun 28 19:24:38 BarredDialing = 0 Jun 28 19:24:40 CardIdentifier = 894921001105635262 Jun 28 19:24:42 LockedPins = pin Jun 28 19:24:44 PinRequired = pin Jun 28 19:24:46 Present = 1 Jun 28 19:24:48 ...so that's good. Jun 28 19:26:25 Unfortunately I don't see the way to 'choose' this modem from any applet or panel. Jun 28 19:26:54 What is the typical way that ofono discovered modem devices are used? Jun 28 19:27:12 I know how they're used in network-manager, but not ofono. Jun 28 19:27:33 Does connman play a role here, or what supplies the user interface? Jun 28 19:28:26 MSvB: ConnMan doesn't see this modem yet because you have a PIN set Jun 28 19:28:53 You need to enter-pin, after that it will show up in your network list Jun 28 19:29:10 Or should anyway Jun 28 19:30:38 Also, please email/paste me the final string you ended up with in g_str_has_suffix, or better yet submit it as a patch, whatever your prefer Jun 28 19:31:15 denkenz: Don't worry, I'm going to submit the patch nice and neat. Jun 28 19:31:28 The problem I'm facing now is that my development computer keeps overheating. Jun 28 19:31:40 Good, since that also gives credit where it is due Jun 28 19:32:20 And how does one enter the pin, do I hard code it into a ofono config file somewhere? Jun 28 19:32:49 test/enter-pin Jun 28 19:33:08 I don't recall whether the netbook UI has a proper PIN dialog, probably not Jun 28 19:37:24 What exactly does pin_type refer to? I tried PIN1 and that's not right. Jun 28 19:37:34 test/enter-pin [PATH] pin_type Jun 28 19:37:51 I assume PATH can be left out, but pin_type seems to be undocumented. Jun 28 19:38:32 pin_type is the same as what list-modems PinRequired wants Jun 28 19:38:44 e.g. test/enter-pin pin 1234 Jun 28 19:41:52 Yes, I got that and the pin entry succeeded. Jun 28 19:42:10 Now I can see a half-baked UI for accessing this modem in the MeeGo network panel. Jun 28 19:42:29 Half-baked because there's plenty of text missing and incomplete buttons. Jun 28 19:42:53 Then now come the joys of figuring out what the 'Plan name' are for my account. Jun 28 19:43:38 Do I need to use other commands in the test/ directory? Like enable-modem? Jun 28 19:44:04 If you already know your carrier settings, then test/create-internet-context is easiest Jun 28 19:44:33 That is a quick way to set apn/user/pass without going through dialogs Jun 28 19:45:01 Hopefully not, ConnMan should take care of the rest once the modem is recognized & pin entered Jun 28 19:47:24 After clicking 'connect' the UI responds 'the connection failed.' Jun 28 19:47:34 Is there a log file or a way to get more info than that? Jun 28 19:47:48 Or do I need to ask at connman at this point? Jun 28 19:47:57 export OFONO_AT_DEBUG=1; src/ofonod -n -d Jun 28 19:48:05 That will give you more than you ever wanted to know Jun 28 19:48:37 OFONO_AT_DEBUG enables AT traces, -d you are familiar with Jun 28 19:50:09 In /var/log/messages: SetProperty(Active) org.ofono.Error.Failed Operation failed. Jun 28 19:50:16 I'll try what you suggested with OFONO_AT_DEBUG now... Jun 28 19:53:07 Didn't get anything too useful (but a lot of text.) Jun 28 19:53:29 I have the feeling that when I was prompted to type my 'Plan name' I gave the wrong name. Jun 28 19:53:46 I typed 'Default', but there was no error or other output after that. Jun 28 19:56:08 Okay, after rebooting and using 'create-internet-context' it's not asking for a plan name anymore. Jun 28 19:56:24 The APN/user/pwd I'm giving, as well as the PIN are all correct. Jun 28 19:56:28 Hmm. Jun 28 20:09:54 If you're sure they are correct, then run test/activate-context Jun 28 20:11:32 /usr/lib/ofono/test/activate-context Jun 28 20:11:56 Error activating //context1: org.ofono.Error.Failed: Operation failed Jun 28 20:12:21 What do you see in the AT trace? Jun 28 20:12:22 Does this mean that the problem (or another one) is still in ofono? Jun 28 20:12:43 look for ENAP Jun 28 20:14:13 Likely the settings Jun 28 20:15:16 Seems that it worked this time, I got an IP. Jun 28 20:15:40 Maybe you signal is crap Jun 28 20:15:45 s/you/your Jun 28 20:16:10 The mbm cards will fail to connect in that case Jun 28 20:21:07 No, it seems to work if I run test/activate-context from the command line. Jun 28 20:21:40 ...but clicking 'connect' from the MeeGo network panel UI fails every time. Jun 28 20:21:57 Here's the AT trace output (sorry): Jun 28 20:22:05 ofonod[6806]: src/gprs.c:ofono_gprs_status_notify() / status 1 Jun 28 20:22:07 ofonod[6806]: src/gprs.c:netreg_status_changed() 1 Jun 28 20:22:09 ofonod[6806]: src/cbs.c:cbs_location_changed() 1, 40519, 165104613, 4, 26203 Jun 28 20:22:11 ofonod[6806]: src/cbs.c:cbs_location_changed() 0, 0, 1 Jun 28 20:22:13 ofonod[6806]: drivers/atmodem/network-registration.c:cops_numeric_cb() Cops numeric got mcc: 262, mnc: 03 Jun 28 20:22:15 ofonod[6806]: drivers/atmodem/network-registration.c:cops_cb() cops_cb: blau.de, 262 03 2 Jun 28 20:22:17 ofonod[6806]: src/network.c:current_operator_callback() 0x9a6e6d8, 0x9a7cf00 Jun 28 20:22:19 ofonod[6806]: src/gprs.c:ofono_gprs_status_notify() / status 1 Jun 28 20:22:21 ofonod[6806]: src/gprs.c:netreg_status_changed() 1 Jun 28 20:22:23 ofonod[6806]: src/cbs.c:cbs_location_changed() 1, 40519, 165104583, 4, 26203 Jun 28 20:22:25 ofonod[6806]: src/cbs.c:cbs_location_changed() 0, 0, 1 Jun 28 20:22:27 ofonod[6806]: drivers/atmodem/network-registration.c:cops_numeric_cb() Cops numeric got mcc: 262, mnc: 03 Jun 28 20:22:29 ofonod[6806]: drivers/atmodem/network-registration.c:cops_cb() cops_cb: blau.de, 262 03 2 Jun 28 20:22:31 ofonod[6806]: src/network.c:current_operator_callback() 0x9a6e6d8, 0x9a7cf00 Jun 28 20:22:33 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_gprs_activate_primary() cid 1 Jun 28 20:22:35 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_cgdcont_cb() ok 1 Jun 28 20:22:37 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_enap_up_cb() ok 1 Jun 28 20:22:39 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_state_changed() state 2 Jun 28 20:22:41 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_state_changed() connecting Jun 28 20:22:43 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_state_changed() state 0 Jun 28 20:22:45 ofonod[6806]: drivers/mbmmodem/gprs-context.c:mbm_state_changed() disconnected Jun 28 20:22:47 ofonod[6806]: src/gprs.c:pri_activate_callback() 0x9a6d080 Jun 28 20:22:49 ofonod[6806]: src/gprs.c:pri_activate_callback() Activating context failed with error: Unknown error type Jun 28 20:22:51 So it's the last line that seems to confirm the error. Jun 28 20:23:00 But sadly enough, even with AT tracing enabled, there is no better message than 'Unknown error type.' Jun 28 20:23:10 run test/list-contexts Jun 28 20:23:55 How many contexts are there? Jun 28 20:24:42 Just one: test/list-contexts Jun 28 20:24:46 [ ] Jun 28 20:24:48 [ /context1 ] Jun 28 20:24:50 Username = blau Jun 28 20:24:52 Protocol = ip Jun 28 20:24:54 Name = Internet Jun 28 20:24:56 Settings = { } Jun 28 20:24:58 IPv6.Settings = { } Jun 28 20:25:00 Active = 0 Jun 28 20:25:02 AccessPointName = internet.eplus.de Jun 28 20:25:04 Password = blau Jun 28 20:25:06 Type = internet Jun 28 20:25:50 Then there should be no difference between test/activate-context and doing it via ConnMan Jun 28 20:26:01 They basically do the same thing Jun 28 20:26:12 ...but it does seem that in order to connect (using the command line works) I must enter the create-internet-context internet.eplus.de blau blau command every time again. Jun 28 20:26:43 Run with AT tracing enabled and look for the CGDCONT Jun 28 20:26:52 is it setting the APN to the same thing you entered? Jun 28 20:27:01 Yes. Jun 28 20:27:16 Then create-internet-context is not needed Jun 28 20:27:28 Oh wait, no you're right. Jun 28 20:28:01 When I click on the GUI then the APN name is wrong, it is 'Default' just as I gave on the very first time it asked. Jun 28 20:28:12 Then our UI developers need to be shot Jun 28 20:28:19 ...so I need to find out where ofono/connman is storing this value. Jun 28 20:28:31 No, oFono is doing this just fine Jun 28 20:28:46 Then it's connman that is the culprit I suppose. Jun 28 20:28:54 No, its our UI Jun 28 20:29:18 for reference, oFono stores all settings in IMSI keyed file in /var/lib/ofono Jun 28 20:29:26 What is 'our'? I ask, in order to more quickly find the proper config file that contains the wrong APN value. Jun 28 20:29:30 Where your settings are safe across reboots, sim insertions, etc Jun 28 20:29:53 Seems that Meego UI is trying to be too smart and overwriting the settings Jun 28 20:30:57 Can I clear that stuff out of /var/lib/ofono (rm -rf) and then reboot to try this again? Jun 28 20:31:18 It won't help you, the 'Default' is not coming from oFono Jun 28 20:31:30 it is coming from networks-panel or whatever the UI is Jun 28 20:31:43 Well... Jun 28 20:32:05 find . -exec grep Default {} \; -print Jun 28 20:32:08 AccessPointName=Default Jun 28 20:32:20 /gprs Jun 28 20:32:51 Sure, oFono stores whatever was last given to it Jun 28 20:34:05 The problem is that the UI should not be provisioning settings every time Jun 28 20:35:08 Anyway, see if you can make the UI use the right settings, I will go smack our UI developers at some point Jun 28 20:38:14 Still broken. The problem is that the button click method always replaces the APN in /var/lib/ofono//gprs with the wrong value. Jun 28 20:38:29 It's probably the wrong value that I gave in the beginning. Jun 28 20:38:47 That's what I said ;) Jun 28 20:39:10 Look for 'Default' somewhere in your home directory Jun 28 20:39:16 That is probably where the UI stores its settings Jun 28 20:39:22 Or maybe in gconf Jun 28 20:40:38 Found it. /var/lib/connman/default.profile Jun 28 20:40:59 I guess I need to kill -HUP connmand now or something like that, because it's still putting the wrong APN value in. Jun 28 20:43:08 Okay, hallelujah. Seems to work. Now for the reboot test. Jun 28 20:47:03 Now it's working, thank you very much Denis. Jun 28 20:47:14 And just in time to get to bed at a reasonable hour. Jun 28 20:47:29 The final verdict is, pain the ass but it works. Jun 28 20:47:54 Maybe it's time to start working on a pinentry applet now... Jun 28 20:48:34 I could check out what network-manager does and just copy that I guess. **** ENDING LOGGING AT Wed Jun 29 02:59:56 2011