Re: [MM] [PATCH 4/5] novatel: Poll for whether the connection still exists.

2012-05-07 Thread Nathan Williams
On Sun, May 6, 2012 at 11:42 AM, Aleksander Morgado aleksan...@lanedo.comwrote: Given that the $NWQMISTATUS reply is not bearer-specific (reports overall status of the modem), I was thinking in moving the periodic connectivity check to MMIfaceModem instead, and plug it in using the same logic

Re: [MM] [PATCH 4/5] novatel: Poll for whether the connection still exists.

2012-05-07 Thread Nathan Williams
On Mon, May 7, 2012 at 10:37 AM, Aleksander Morgado aleksan...@lanedo.comwrote: Given that the $NWQMISTATUS reply is not bearer-specific (reports overall status of the modem), I was thinking in moving the periodic connectivity check to MMIfaceModem instead, and plug it in using the

Re: [mm][PATCH 1/5] novatel: Add support for connecting to specific APNs and specifying username/password.

2012-05-02 Thread Nathan Williams
+networkmanager-list On Wed, May 2, 2012 at 10:43 AM, Nathan Williams n...@google.com wrote: On 05/01/2012 06:07 PM, Nathan Williams wrote: Subject: [PATCH 1/5] novatel: Add support for connecting to specific APNs and specifying username/password. While here, pass through the other

Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Nathan Williams
On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado aleksan...@lanedo.comwrote: On 05/01/2012 06:07 PM, Nathan Williams wrote: Date: Thu, 22 Mar 2012 16:18:24 -0400 Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing. Is it that the modem exposes

Re: [MM] [PATCH 5/5] novatel: Remove band-setting implementation to improve connections

2012-05-02 Thread Nathan Williams
, but I think this is too dangerous to include. - Nathan On Wed, May 2, 2012 at 6:29 AM, Aleksander Morgado aleksan...@lanedo.comwrote: On 05/01/2012 06:09 PM, Nathan Williams wrote: Subject: [PATCH 5/5] novatel: Remove band-setting implementation to improve connections The $NWBAND

[MM] [PATCH] Add a utility routine to do ITU V.250 quoting of strings for AT commands.

2012-05-02 Thread Nathan Williams
Needed by the Novatel plugin. - Nathan 0001-Add-a-utility-routine-to-do-ITU-V.250-quoting-of-str.patch Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org

Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Nathan Williams
Updated patch attached. - Nathan On Wed, May 2, 2012 at 11:25 AM, Aleksander Morgado aleksan...@lanedo.comwrote: On 05/02/2012 04:53 PM, Nathan Williams wrote: On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado aleksan...@lanedo.com mailto:aleksan...@lanedo.com wrote: On 05/01

Re: [MM] [PATCH 4/5] novatel: Poll for whether the connection still exists.

2012-05-02 Thread Nathan Williams
Excellent point. Revised. - Nathan On Wed, May 2, 2012 at 6:24 AM, Aleksander Morgado aleksan...@lanedo.comwrote: On 05/01/2012 06:09 PM, Nathan Williams wrote: +static gboolean +poll_connection (MMBroadbandBearerNovatel *bearer) +{ +mm_base_modem_at_command ( +bearer

[mm][PATCH 1/5] novatel: Add support for connecting to specific APNs and specifying username/password.

2012-05-01 Thread Nathan Williams
This is the first in a series of patches to submit the code we've been using on ChromiumOS. - Nathan 0001-novatel-Add-support-for-connecting-to-specific-APNs-.patch Description: Binary data ___ networkmanager-list mailing list

[MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-01 Thread Nathan Williams
0002-novatel-Use-the-ALLOWED_SINGLE_AT-property.-Saves-5-.patch Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list

[MM] [PATCH 3/5] novatel: Implement load_access_technologies.

2012-05-01 Thread Nathan Williams
0003-novatel-Implement-load_access_technologies.patch Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list

[MM] [PATCH 4/5] novatel: Poll for whether the connection still exists.

2012-05-01 Thread Nathan Williams
0004-novatel-Poll-for-whether-the-connection-still-exists.patch Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list

[MM] [PATCH 5/5] novatel: Remove band-setting implementation to improve connections

2012-05-01 Thread Nathan Williams
0005-novatel-Remove-band-setting-implementation-to-improv.patch Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list

[ModemManager] Two SMS bugs in the new code

2012-04-25 Thread Nathan Williams
1. When a new single-part message arrives, an Added signal is sent but the Completed signal is not sent. 2. Multipart messages don't seem to work - the multipart bit isn't getting set correctly somewhere?. See logs: 2012-04-25T16:56:55.500166-07:00 localhost ModemManager[1238]: debug

[MM] [PATCH] Adjust parsing of +CNUM response to permit spaces in the alphanumeric descriptor.

2012-04-13 Thread Nathan Williams
As described. This replaces a regexp of ?\S*? , which doesn't match the string Line 1 because of the embedded whitespace, with a somewhat more elaborate regular expression that does. It also accommodates escaped quotes inside the quoted string. (A more general tokenize v.250 comma-separated

[MM] [PATCH] mm_modem_{get,dup}_own_numbers(): Fix inverted logic.

2012-04-13 Thread Nathan Williams
Pretty much what it says. With this and the prior patch mmcli -m 0 now shows me the modem's number. - Nathan 0001-mm_modem_-get-dup-_own_numbers-Fix-inverted-logic.patch Description: Binary data ___ networkmanager-list mailing list

Re: [MM 0.6] Plumb up the SPN display-rule bits

2012-03-09 Thread Nathan Williams
On Fri, Mar 9, 2012 at 8:19 AM, Aleksander Morgado aleksan...@lanedo.comwrote: Hey Nathan, The command to get the SPDI in the code didn't work for me: -- AT+CRSM=176,28621,0,0,255 -- +CRSM: 103,0 OK Ah, bummer. With that change on, the list is properly parsed: $ mmcli -i 0 SIM

Re: [MM 0.6] Plumb up the SPN display-rule bits

2012-03-09 Thread Nathan Williams
On Fri, Mar 9, 2012 at 9:30 AM, Nathan Williams n...@google.com wrote: On Fri, Mar 9, 2012 at 8:19 AM, Aleksander Morgado aleksan...@lanedo.comwrote: A possible fix to handle the case where we don't know how much we can read would be to try to read the first bytes of the record (3 or 4

Re: [MM 0.6] Plumb up the SPN display-rule bits

2012-03-08 Thread Nathan Williams
Also, if we do expose these two properties we also need to load and expose the SPDI network list, or the properties will be useless. Here's a patch to do that. There's a bit of annoying fighting with gchar ** and gdbus's idea of constness, but it seems reasonable otherwise. It works for me on

Fwd: [MM 0.6] Plumb up the SPN display-rule bits

2012-03-07 Thread Nathan Williams
[I accidentially sent this reply just to Dan; I wondered why it hadn't gotten any traction on the list. Resending] So let me think this through... bit 1 is about what to display when the registered network is a well-known network, ie a PLMN known to the SIM. Right. 0 means that the phone

Re: [MM 0.6] Plumb up the SPN display-rule bits

2012-03-01 Thread Nathan Williams
+    property name=DisplayRegisteredNetworkNameAtHome type=b access=read / Quoting from the TS: b1=0: display of registered PLMN name not required when registered PLMN is either HPLMN or a PLMN in the service provider PLMN list. b1=1: display of registered PLMN name required when

[MM 0.6] Plumb up the SPN display-rule bits

2012-02-29 Thread Nathan Williams
This is required for properly displaying local-operator-vs-home-provider information, per 3GPP (31.102 section 4.1.2 on EF_SPN and 22.101 Annex A). Suggestions welcome on the long and somewhat unwieldy property/function names. - Nathan

[ModemManager] [PATCH] mm_gsm_parse_scan_response(): Improve regex-construction error handling

2011-11-30 Thread Nathan Williams
This was the only code in ModemManager using g_error(), and not appropriately, I think. The codebase is still mixed on how to handle errors compiling regular expressions; other places in this file use g_assert(), while the rest of the code tends to report some kind of parse-failure error. Perhaps

[ModemManager] [PATCH] Fix two bugs with multipart SMS handling: signals and listing.

2011-11-30 Thread Nathan Williams
These errors slipped through my testing last time. (For ChromeOS development, I have rigged up a black-box ModemManager test system under autotest, which creates a fake gudev device and a fake modem that responds to AT commands to test this kind of thing. It might be interesting to adapt it into

Re: [ModemManager] [PATCH] Fix two bugs with multipart SMS handling: signals and listing.

2011-11-30 Thread Nathan Williams
BTW, I think you forgot the patches attached. You're right, of course. Sorry about that. This time for sure. - Nathan From f29a410f4763c1237da7699853579cc0be618a66 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Tue, 22 Nov 2011 17:55:34 -0500 Subject: [PATCH] Fix

Re: [ModemManager] [PATCH] mm_gsm_parse_scan_response(): Improve regex-construction error handling

2011-11-30 Thread Nathan Williams
And this time with the patch. - Nathan On Wed, Nov 30, 2011 at 2:07 PM, Nathan Williams n...@google.com wrote: This was the only code in ModemManager using g_error(), and not appropriately, I think. The codebase is still mixed on how to handle errors compiling regular expressions; other

[ModemManager] [PATCH] serial: report port-not-open in queueing commands via callback instead of just returning.

2011-11-28 Thread Nathan Williams
This is a followup to my previous change here; the port-not-open situation is better treated as a manageable error condition rather than a programming error. - Nathan From cec1bb628cd736fd0ac251e77e87f970cd78a4fb Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Wed, 23

Re: ModemManager: Huawei PDU encoded USSD response truncated to 112 characters

2011-11-09 Thread Nathan Williams
Right, that's my change. Does the USSD path in the plugin know the length of the text, or does it have to derive the text length from the length of the hex string? If it doesn't know the length, it's going to have the same problem I was seeing with SMS messages prior to this change, where

Re: SMS receiving question

2011-11-04 Thread Nathan Williams
Do you have logs from ModemManager? If you run with --log-level=DEBUG, you should see the +CMTI notification when the SMS arrives, and we can see what MM does from that point forward. - Nathan On Fri, Nov 4, 2011 at 6:12 AM, Jean Parpaillon jparpail...@mandriva.com wrote: Hi all, I am

[PATCH 1/2] MM: disable(): Finish all disable commands before returning

2011-11-03 Thread Nathan Williams
This addresses some dubious behavior that was one source of a crash on our systems. - Nathan From 7e9aebaeb179be5a9093c74815af45b62cc849b7 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Thu, 3 Nov 2011 16:13:07 -0400 Subject: [PATCH 1/2] disable(): Finish all disable

[PATCH 2/2] MM: internal_queue_command(): Reject new commands when the port is closed.

2011-11-03 Thread Nathan Williams
This is the actual crasher. - Nathan From 3cd611e30fce4b572ab7f89cca876dff3362cd36 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Thu, 3 Nov 2011 16:21:45 -0400 Subject: [PATCH 2/2] internal_queue_command(): Reject new commands when the port is closed. Otherwise, we

[PATCH] ModemManager: Multipart SMS support

2011-10-26 Thread Nathan Williams
Kind of a complicated patch, but it does the job without mangling the state on the modem, so we're not dependent on ModemManager to generate or store any new state of its own. - Nathan 0001-Multipart-SMS-support.patch Description: Binary data ___

[PATCH] ModemManager: Clean up GRegex/GMatchInfo leaks

2011-09-27 Thread Nathan Williams
the match_info. - Nathan From a090d2f3d99a1bd52fdd652b043e66e7dc48bb2c Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Mon, 26 Sep 2011 13:20:17 -0400 Subject: [PATCH] Ensure that GMatchInfo and GRegex objects are freed properly. In particular, g_regex_match

Re: PATCH] sms_decode_text(): Sanitize 8-bit data so that it is UTF8-clean.

2011-09-27 Thread Nathan Williams
On Tue, Sep 27, 2011 at 2:18 PM, Dan Williams d...@redhat.com wrote: On Mon, 2011-09-26 at 18:29 -0400, Nathan Williams wrote: This keeps ModemManager from crashing deep in the DBus libraries when a SMS Get() or List() DBus operation finds a message that isn't valid UTF-8 and/or has

PATCH] sms_decode_text(): Sanitize 8-bit data so that it is UTF8-clean.

2011-09-26 Thread Nathan Williams
b4be9e8cfa79cfb1d63e69a151078c75f38131d9 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Fri, 23 Sep 2011 17:21:15 -0400 Subject: [PATCH] sms_decode_text(): Sanitize 8-bit data so that it is UTF8-clean. When receiving a SMS message with raw 8-bit data, sanitize

[MM] [PATCH] sms_get_done(): Check for the correct return value from sscanf()

2011-08-08 Thread Nathan Williams
The %n format in sscanf() is tricky; it's best avoided if we don't actually need it. (dropped through the cracks of my upstreaming process a little while ago, sorry) - Nathan From fc3f0e40f1c7196f38789f585dca98f22fb13601 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date

[ModemManager] [PATCH 1/4] Split SMS parsing out into a separate file

2011-06-30 Thread Nathan Williams
First of four patches that improve SMS handling. This one follows Dan's suggestion some time ago and splits SMS PDU parsing into a separate file, making it accessible to unit tests and to other code that might need it. - Nathan ___

Re: [ModemManager] [PATCH 1/4] Split SMS parsing out into a separate file

2011-06-30 Thread Nathan Williams
This time with the actual patch. On Thu, Jun 30, 2011 at 5:31 PM, Nathan Williams n...@google.com wrote: First of four patches that improve SMS handling. This one follows Dan's suggestion some time ago and splits SMS PDU parsing into a separate file, making it accessible to unit tests

[ModemManager] [PATCH 2/4] Add SMS unit tests.

2011-06-30 Thread Nathan Williams
Second in a series. Builds on the previous by actually unit-testing the sms_parse_pdu() function. Note that the dcf1 test does not pass as the code is currently written. - Nathan From ee7476b84a833cecf5999232b1fbd14d0dee Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org

[ModemManager] [PATCH 3/4] Recognize more text encodings from GSM-03.38.

2011-06-30 Thread Nathan Williams
Third in a series. This fixes the bug detected by the dcsf1 test in the just-added unit tests, by more thoroughly parsing the TP-DCS field. - Nathan From a64fe628ac4f620878611f93f89deebe90fbb638 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Wed, 29 Jun 2011 21:29:47

[ModemManager] [PATCH 4/4] Calculate user-data bit padding correctly.

2011-06-30 Thread Nathan Williams
2001 From: Nathan Williams n...@chromium.org Date: Wed, 29 Jun 2011 21:33:37 -0400 Subject: [PATCH 4/4] Calculate user-data bit padding correctly. Deal correctly with the bit padding for the user data header for the case where the correct amount of padding is 0. Prevents skipping the first character

[ModemManager] PATCH: Fix a corner case of SPN handling

2011-06-23 Thread Nathan Williams
This fixes a glitch where we return NULL (and log an assertion failure) rather than returning for a fully-empty SPN string, as seen on some European SIM cards (most recently tested with a Vodafone UK SIM). - Nathan 0002-get_spn_done-Handle-the-case-of-an-entirely-empty-SP.patch

[ModemManager] PATCH: Add a DBus interface for setting the log level

2011-06-23 Thread Nathan Williams
Pretty straightforward, and as the patch comment says, lifted almost directly from the NetworkManager interface and code to do the same job. - Nathan 0001-Add-a-DBus-interface-for-setting-the-log-level.patch Description: Binary data ___

[PATCH] ModemManager: handle change uevents as well as add

2011-06-08 Thread Nathan Williams
possible for distros or startup scripts to work around this, but I suggest we should just go ahead and accept these events as-is. - Nathan From 4d51ee9ff7762d089fc85cb078c6a46bed0b6160 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@google.com Date: Wed, 8 Jun 2011 15:52:08 -0400 Subject

[PATCH] ModemManager: Format SMS sender addresses with a + for international telephone numbers

2011-05-31 Thread Nathan Williams
:00 2001 From: Nathan Williams n...@google.com Date: Tue, 31 May 2011 13:50:17 -0400 Subject: [PATCH] sms_decode_address(): Add a leading + on international numbers. BUG=chromium-os-partner:4278 TEST=Send SMS from phone (to get +... format) and from AIM-SMS gateway (to get raw-digit format). Change

[PATCH] ModemManager: Add and implement an interface to get a GSM SPN

2011-05-26 Thread Nathan Williams
to be factored out of the various routines that parse the response of AT+CRSM commands, but that cleanup will come in a separate patch. - Nathan From 94bb1798e85a9a5c91eeaa6b82c7300591953aa6 Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@google.com Date: Fri, 20 May 2011 17:31:34 -0400

[PATCH] ModemManager: Free an allocated string

2011-05-20 Thread Nathan Williams
Just like it says. - Nathan From 97a4b734229a6a9a86f4f819d6c79567c743baaa Mon Sep 17 00:00:00 2001 From: Nathan Williams n...@google.com Date: Fri, 20 May 2011 14:42:16 -0400 Subject: [PATCH] gsm: free the string allocated by utils_hexstr2bin(). Change-Id

[PATCH] ModemManager: gsm: Correctly set registration status when disabling

2011-05-18 Thread Nathan Williams
From: Nathan Williams n...@chromium.org Date: Wed, 18 May 2011 20:37:49 -0400 Subject: [PATCH] gsm: Correctly set registration status when disabling. Change-Id: I0629706985f273832ac3662acb260388d0e6ed83 --- src/mm-generic-gsm.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff

[PATCH] ModemManager: Split the Samsung initialization sequence so that echoing is properly disabled

2011-05-12 Thread Nathan Williams
17 00:00:00 2001 From: Nathan Williams n...@chromium.org Date: Thu, 12 May 2011 15:23:33 -0400 Subject: [PATCH] Split the Samsung initialization sequence from ATZ E0 V1 to ATZ and ATE0 V1 - the modem is allowed to ignore the rest of the line after Z, so echoing was not being turned off, leading

[PATCH] Suppress duplicate SMS notifications

2011-05-09 Thread Nathan Williams
On some modems, such as the Samsung Y3300, unsolicited notifications for SMS messages (+CMTI) are sent over both the primary and secondary ports. Currently, this leads to multiple SmsReceived signals being sent. This patch de-dups the signals by tracking the index numbers that have been seen so

[PATCH] GSM SMS reception code

2011-04-12 Thread Nathan Williams
Here's the implementation I've done of SMS reception code for GSM modems, exclusive of the bug fixes discussed here earlier. It implements the SmsReceived signal and the Get, Delete, and List commands; it does not group multi-part messages together into one, but does skip over the user-data header

Re: SV: Ericsson Support for SMS receive

2011-04-08 Thread Nathan Williams
On Fri, Apr 8, 2011 at 2:57 AM, Torgny Johansson torgny.johans...@ericsson.com wrote: From: Dan Williams [mailto:d...@redhat.com] Sure, that sounds fine, unless we decide to just ignore SIM storage completely and use local storage like Marcel suggests. For me, just using ME would be

Re: SV: Ericsson Support for SMS receive

2011-04-08 Thread Nathan Williams
you do not have index numbers if these are forwarded to the ME right away. The index numbers are storage numbers on the SIM card. Or in the other memory spaces. So far we've been discussing (in the language of 3GPP TS 27.005) +CPMS=ME versus +CPMS=SM; both involve storage somewhere below

Re: [PATCH] ModemManager: Change length input to gsm7 to take the number of characters rather than octets

2011-04-08 Thread Nathan Williams
Sure, updated patch attached. - Nathan On Thu, Apr 7, 2011 at 6:45 PM, Dan Williams d...@redhat.com wrote: On Thu, 2011-04-07 at 18:09 -0400, Nathan Williams wrote: As it says in the patch, this is necessary to distinguish between 7- and 8-character messages, since both are encoded

Re: ModemManager: SMS List API doesn't have an index, buffer isn't big enough

2011-04-08 Thread Nathan Williams
-0400, Nathan Williams wrote: Hi, all. In the process of implementing some SMS support, I've run into a couple of issues with the org.freedesktop.ModemManager.Modem.Gsm.SMS.List DBus call, one in the API and one in the implementation. Excellent :) We can change the API because for all

[PATCH] ModemManager: Change length input to gsm7 to take the number of characters rather than octets

2011-04-07 Thread Nathan Williams
As it says in the patch, this is necessary to distinguish between 7- and 8-character messages, since both are encoded in 7 octets. - Nathan mm-patch-gsm7 Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org

[PATCH] ModemManager: Don't destroy NULL hashes

2011-04-07 Thread Nathan Williams
This avoids annoying diagnostic messages from GLib, since some uses of SmsAuthInfo have NULL hash values and some do not. - Nathan mm-patch-no-hash-destroy Description: Binary data ___ networkmanager-list mailing list networkmanager-list@gnome.org

ModemManager: SMS List API doesn't have an index, buffer isn't big enough

2011-04-06 Thread Nathan Williams
Hi, all. In the process of implementing some SMS support, I've run into a couple of issues with the org.freedesktop.ModemManager.Modem.Gsm.SMS.List DBus call, one in the API and one in the implementation. The API issue is that as specified, the caller gets the contents of all of the messages, but