[PATCH] huawei: always parse operator name in +COPS responses as ASCII
benchan at chromium.org
Mon Aug 26 09:44:54 PDT 2013
The patch was suggested by Huawei as their modems always return operator
names in ASCII in +COPS response. I'd let Franko to provide more details.
I haven't seen a real operator using a name that reassembles a hex string,
so it's probably not an issue in real practice. It could be an issue in
test lab where a call box may configure the operator name as 1234.
On Mon, Aug 26, 2013 at 9:10 AM, Dan Williams <dcbw at redhat.com> wrote:
> 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
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ModemManager-devel