From 4bc5ee90ef53d1f573e9fc8101bfd423f5a0012d Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 5 Feb 2019 14:07:43 +0100 Subject: [PATCH] Fix the BLE device detection for the i770R and Pro Plus X 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. Linus Torvalds reports the BLE pattern for the i770R is normally just "0001", allthough he once also observed "0090" with the same dive computer. A communication trace from a Pro Plus X also showed "0001". We don't have enough information to guess the meaning of the number. Regardless, for those two dive computers supporting BLE, make the pattern simply ignore the last four digits, since they clearly vary. Based-on-code-by: Linus Torvalds --- src/oceanic_atom2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index e897259..c892486 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -207,11 +207,11 @@ static const oceanic_common_version_t oceanic_reactpro_version[] = { }; 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 aqualung_i770r_version[] = { - {"AQUA770R \0\0 2048"}, + {"AQUA770R \0\0 \0\0\0\0"}, }; static const oceanic_common_version_t aeris_a300cs_version[] = {