<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><div><br></div></span>No; I thought I explained this before we started...</div><div>libdivecomputer has two reasonably distinct parts.</div><div>The communication with the dive computer and the</div><div>parsing of the data that was downloaded from the</div><div>dive computer.</div><div>My goal is to do the communication with Bluetooth</div><div>based dive computers from within Subsurface and</div><div>then pass the data buffers to libdivecomputer for</div><div>parsing.</div><div><span class=""><br></span></div></div></blockquote><div>My concern is related to the fact that I have to </div><div>communicate  with the device using the Serial Port </div><div>Profile and there is not a standard protocol for </div><div>the communication. As you know, each member has </div><div>its own implementation.  Each vendor expects </div><div>its own specific commands through the virtual COM </div><div>port of the device. Because this is already implemented </div><div>in <i>libdivecomputer</i>, I thought that it will be easier if I </div><div>will find a way to integrate it.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I don't think that's the right way to go. Of course, we have</div><div>our own branch of <i>libdivecomputer</i> and we could always</div><div>make changes, but that would move us further and further</div><div>away from upstream which is the opposite of what I'd want</div><div><span class=""><br></span></div></div></blockquote><div>I don't intend to make changes in <i>libdivecomputer</i> branch.</div><div>I want to find a way to initialize the <i>vtable</i> from Subsurface by </div><div>faking the call of <b>dc_device_open</b> and return it with success. </div><div>Then I want to change the <i>fd</i> from the serial port with my </div><div>socket descriptor.</div><div><br></div><div>As I said, I am not sure if it is possible or if it will work, but </div><div>it will simplify my work.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I think you should consider just using the parser from </div><div>libdivecomputer and doing the downloading entirely</div><div>in Subsurface.</div><span class=""><font color="#888888"><div><br></div></font></span></div></blockquote><div> </div></div>Ok. Then I will implement the data transfer for HW OSTC family </div><div class="gmail_extra">and try to use the <b>hw_ostc_parser</b> parser to interpret the data.</div><div class="gmail_extra">If all works well, I will start to implement the communication for </div><div class="gmail_extra">other families or I will go further with the implementation for </div><div class="gmail_extra">Windows.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Claudiu</div></div>