Reliability with Quectel modem

Aleksander Morgado aleksander at aleksander.es
Sat Sep 5 08:14:54 UTC 2020


Hey Peter,

> >> Yes, it's definitely confused by the TAB (ASCII 0x09) in
> >> __qmi_string_utf8_validate_printable(). We already allow \r and \n in
> >> that check (as NMEA traces contain them) so we can probably also add
> >> \t as an allowed character as well.
> >>
> >> See: https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/merge_requests/159
> >>
> >
> > You get a trailing space, but I suppose that's to be expected.
> >
> >      Model: 'EM12-AW    '
> >
>
> I know that messing with strings in these cases is asking for all kinds of
> trouble, but is it worth removing trailing spaces?   The luci Javascript does
> a trim on this anyway, so it doesn't matter for my purposes, but it's something
> you might consider.
>

I don't think we should modify the string contents in any way in
libqmi; if the manufacturer added a trailing tab, we'll include the
trailing tab when the string is read with libqmi. The processing we do
on the string contents is not to modify them, it's to attempt to
detect the string encoding.

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list