Reliability with Quectel modem

Aleksander Morgado aleksander at aleksander.es
Fri Sep 4 08:51:13 UTC 2020


Hey!

> >> <<<<<< TLV:
> >> <<<<<<   type       = "Model" (0x01)
> >> <<<<<<   length     = 8
> >> <<<<<<   value      = 45:4D:31:32:2D:41:57:09
> >> <<<<<<   translated = EΞE_S%P+Ç
> >
> > That's weird.  Maybe it's confused by the tab at the end of the string?
> > Why is that there, anyway?
> >
> >
>
> I don't know anything about the spec, but I've seen plenty of things like
> this before where the manufacturer didn't do things properly and returned
> unterminated or improperly terminated strings.   For my purposes, I think
> I'm just going to patch it locally to terminate on the tab.  If you guys
> have a better fix in future, then by all means.
>

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

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list