Unexpected COPS format

Aleksander Morgado aleksander at aleksander.es
Fri Mar 17 19:56:23 UTC 2017


On Fri, Mar 17, 2017 at 6:40 PM, Dan Williams <dcbw at redhat.com> wrote:
> I ended up with something like:
>
> void
> mm_3gpp_normalize_operator_id (gchar          **id,
>                                MMModemCharset   cur_charset)
> {
>     g_assert (id);
>
>     /* Some modems return the operator name as a hexadecimal string of the
>      * bytes of the operator name as encoded by the current character set.
>      */
>
>     if (*id && !mm_3gpp_parse_operator_id (id, NULL, NULL, NULL)) {
>         *id = mm_charset_take_and_convert_to_utf8 (*id, cur_charset);
>         if (!mm_3gpp_parse_operator_id (id, NULL, NULL, NULL))
>             g_clear_pointer (id, g_free);
>     }
> }
>
> but didn't get as far as writing testcases for it in src/tests/test-
> modem-helpers.c.  Testcases would be great, obviously.

This would be very similar to mm_3gpp_normalize_operator_name()
already; maybe we could just have a single method for both?

Colin, what's the AT+CSCS? return value that you're getting before any
of this happens? Are you getting it reported as UCS2?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list