[PATCH] huawei: always parse operator name in +COPS responses as ASCII

Dan Williams dcbw at redhat.com
Mon Aug 26 09:10:15 PDT 2013


On Mon, 2013-08-26 at 17:07 +0200, Aleksander Morgado wrote:
> On 26/08/13 16:59, Dan Williams wrote:
> >>> Despite +CSCS? may claim supporting UCS2, Huawei modems always report
> >>> > > the oerator name in ASCII in a +COPS response. This patch addresses that
> >>> > > by always assuming the charset is IRA when parsing the operator name in a
> >>> > > +COPS response.
> > Are we sure *all* Huawei modems do this?
> 
> Ah good point... Franko?

Basically, anything pre-E220 (ie, earlier than 2006) we don't care much
about.

But about the patch...  mm_charset_take_and_convert_to_utf8 does a few
things for UCS2:

1) checks if the string is in hex by looking for (len % 4) and xdigit
2) if hex, attempts to convert the hex
3) if not, attempts to convert to UTF8

What operator was triggering the problem?  If there are operators like
"3abc" then yeah, it would get misconverted.  Just curious here.

Dan



More information about the ModemManager-devel mailing list