Fix OCEANIC_COMMON_MATCH pattern matching for BLE versions

It seems that the BLE communication protocol is somewhat different from
the serial one in the version string: while the serial version tends to
show the memory size, the BLE version string has some other numeric
pattern.

We don't have enough information to guess what it is, although normally
the BLE pattern is just "0001" instead of some memory size string.  But
I've seen the i770R once report 0090 instead.  Some status code?

Regardless, make the Pro Plus X and the I300C pattern simply ignore the
last four digits, since they clearly vary, and those two computers
support BLE.

The i770R pattern already did that, since I saw it myself.  The Pro Plus
X I have a communication trace from Brett Woods, and the i300C I just
assume follows the same pattern.

Reported-by: Brett Woods <brett@jeepswag.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2018-12-17 09:24:24 -08:00
parent b082a96ebb
commit 33253b2f8c

View File

@ -122,7 +122,7 @@ static const oceanic_common_version_t oceanic_atom2b_version[] = {
{"AQUAI300 \0\0 512K"},
{"HOLLDG03 \0\0 512K"},
{"AQUAI100 \0\0 512K"},
{"AQUA300C \0\0 512K"},
{"AQUA300C \0\0 \0\0\0\0"},
};
static const oceanic_common_version_t oceanic_atom2c_version[] = {
@ -191,8 +191,13 @@ static const oceanic_common_version_t oceanic_reactpro_version[] = {
{"REACPRO2 \0\0 512K"},
};
// Like the i770R, there's some extended pattern for the last
// four digits. The serial communication apparently says "2048"
// for this, but the BLE version says "0001".
//
// The middle two digits are the FW version or something,
static const oceanic_common_version_t oceanic_proplusx_version[] = {
{"OCEANOCX \0\0 2048"},
{"OCEANOCX \0\0 \0\0\0\0"},
};
static const oceanic_common_version_t aeris_a300cs_version[] = {