<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’m glad you can make sense out of this. ;)<br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="Apple-interchange-newline"><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Kind regards,</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Martin De Weger</div>
</div>
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);" class=""><br class=""><br class=""><br class=""></span></div></span></div></div>
</div>
<div style=""><br class=""><blockquote type="cite" class=""><div class="">Op 17 feb. 2020, om 21:47 heeft Linus Torvalds <<a href="mailto:torvalds@linux-foundation.org" class="">torvalds@linux-foundation.org</a>> het volgende geschreven:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Mon, Feb 17, 2020 at 12:08 PM Martin de Weger <<a href="mailto:martin@deweger.org" class="">martin@deweger.org</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">It looks like it is not recognized as dive computer.<br class=""></blockquote><br class="">No, that part is ok. But the logs look a bit garbled, but that is just<br class="">an artifact of the asynchronous device discovery.<br class=""><br class="">So there's a few random<br class=""><br class="">  Found new device: "" "LE:{8fac5ff0-c2cb-4478-a931-92e8d02dc56a}"<br class="">  Not recognized as dive computer<br class=""><br class="">sprinkled around, but they are just other devices.<br class=""><br class="">For the Cartesio, we're doing this:<br class=""><br class="">  qt_ble_open( {b3c70fef-954e-457d-bc92-ba8c819c3bf9} )<br class="">  trying to connect<br class=""> ...<br class="">  F ound new device: "Cartesio" "LE:{b3c70fef-954e-457d-bc92-ba8c819c3bf9}"<br class="">  "this could be a Cressi Cartesio"<br class="">  connected to the controller for device {b3c70fef-954e-457d-bc92-ba8c819c3bf9}<br class="">    .. discovering services<br class="">  Found service "{0000180a-0000-1000-8000-00805f9b34fb}"<br class="">   .. ignoring standard service "{0000180a-0000-1000-8000-00805f9b34fb}"<br class="">  Found service "{0000180f-0000-1000-8000-00805f9b34fb}"<br class="">   .. ignoring standard service "{0000180f-0000-1000-8000-00805f9b34fb}"<br class="">  Found service "{0000fe59-0000-1000-8000-00805f9b34fb}"<br class="">   .. ignoring standard service "{0000fe59-0000-1000-8000-00805f9b34fb}"<br class="">  Found service "{6e400001-b5a3-f393-e0a9-e50e24dc10b8}"<br class="">   .. created service object QLowEnergyService(0x7fc2557cd310)<br class="">  Found service "{6e400001-b5a3-f393-e0a9-e50e24dcca9e}"<br class="">   .. created service object QLowEnergyService(0x7fc25665e640)<br class="">   .. done discovering services<br class="">  Found service "{6e400001-b5a3-f393-e0a9-e50e24dc10b8}" "Unknown Service"<br class="">     c: "{6e400001-b5a3-f393-e0a9-e50e24dc10b8}"<br class="">     c: "{6e400002-b5a3-f393-e0a9-e50e24dc10b8}"<br class="">          d: "{00002902-0000-1000-8000-00805f9b34fb}"<br class="">     c: "{6e400003-b5a3-f393-e0a9-e50e24dc10b8}<br class="">     c: "{6e400004-b5a3-f393-e0a9-e50e24dc10b8}"<br class="">     c: "{6e400005-b5a3f393-e0a9-e50e24dc10b8}"<br class="">  Found service "{6e400001-b5a3-f393-e0a9-e50e24dcca9e}" "Unknown Service"<br class="">     c: "{6e400002-b5a3-f393-e0a9-e50e24dcca9e}"<br class="">     c: "{6e400003-b5a3-f393-e0a9-e50e24dcca9e}"<br class="">          d: "{00002902-0000-1000-8000-00805f9b34fb}"<br class="">  Using service "{6e400001-b5a3-f393-e0a9-e50e24dc10b8}" as preferred service<br class="">   .. enabling notifications<br class="">  Using read characteristic "{6e400002-b5a3-f393-e0a9-e50e24dc10b8}"<br class="">  now writing "0x0100" to the descriptor<br class="">"{00002902-0000-1000-8000-00805f9b34fb}"<br class="">  BLE write completed<br class="">  ..<br class="">  QTime("21:07:03.358") packet SEND "aaaaaa0000000055"<br class="">  QTime("21:07:03.358") packet WAIT<br class=""><br class="">which all looks reasonable. That final "packet SEND" is us actually<br class="">starting the communication, but then we don't get anything back.<br class=""><br class="">But that is because we decide to use the wrong service. As mentioned<br class="">earlier, BLE serial transmission isn't standardized, and the Cressi<br class="">BLE dongle has a fairly complex set of services and characteristics.<br class="">It has a number of standard services (for battery level etc), but it<br class="">has _two_ nonstandard unknown services, and we pick the first one.<br class=""><br class="">But it's the second one - the 6e400001-b5a3-f393-e0a9-e50e24dcca9e<br class="">service - that is the "Nordic UART service".<br class=""><br class="">But while that is somethign that the Nordic Semi nRF app knows about<br class="">(it's from your screenshots earlier), this is very much not something<br class="">that subsurface knew about, so subsurface picked the first one of the<br class="">two services.<br class=""><br class="">So subsurface was trying to communicate with the wrong BLE service,<br class="">and isn't getting any replies.<br class=""><br class="">I just need to figure out a heuristic that goes "use this service for<br class="">the Crssi case" without breaking the _other_ heuristics we have for<br class="">other cases..<br class=""><br class="">This is the kind of annoying thing that happens with random new BLE<br class="">devices. We used to have it every time we saw a new BLE device, we've<br class="">just been lucky that our heuristics got good enough that we haven't<br class="">seen this in a while.<br class=""><br class="">                Linus<br class=""></div></div></blockquote></div><br class=""></body></html>