<div dir="ltr"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">Hello guys</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">I am facing certain errors while trying to use simulator with universal </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">script. I have taken the following steps.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">1. I git cloned the libdivecomputer repository. Then I used these</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">commands to compile</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">and build.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ autoreconf --install</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ ./configure --enable-pty --disable-shared</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ make</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ sudo make install</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">2. Then I used socat to make virtual serial connections. I confirmed that </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">files ttyS0 and ttyS1 are present in /tmp folder</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">3. I attached binary of Suunto Gekko to /tmp/ttyS0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ ./simulator-linux -b vyper -p /tmp/ttyS0 -l simulator.logs gekko.linus.bin</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> CONFIGURATION:</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> backend=3</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> devname=/tmp/ttyS0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> devtime=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> systime=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> model=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> filename=gekko.linus.bin</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> size=8192</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> header=gekko.linus.bin.header, size=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> systime=gekko.linus.bin.</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">systime, ticks=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> lines=0 0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> is_spyder=0</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">4. I tried to download the dive data present in this binary by using both</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">subsurface and the universal script.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">$ ./universal -n "Suunto Gekko" -b vyper -l divedownload.log -d </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">divelogs.xml /tmp/ttyS1</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> DATETIME 2014-03-30T18:00:39Z (1396202439)</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> VERSION 0.5.0-devel (</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">fa90009c293a9ca1a4eaf49a478b38</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">1477695c0a)</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> Opening the device (Suunto Gekko, /tmp/ttyS1).</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> ERROR: Invalid argument (22) [in ../../source/src/serial_posix.</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">c:415 </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">(serial_configure)]</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> ERROR: Failed to set the terminal attributes. [in </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">../../source/src/suunto_vyper.</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">c:121 (suunto_vyper_device_open)]</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> ../../source/examples/</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">universal.c:681: Error opening device.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">> Result: Input/output error</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">It used to work earlier. I don't understand what went wrong. I also tried</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">switching to the release-0.4 branch. But the error persists.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">Can anyone please help?</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<br clear="all"><div><div dir="ltr"><b style="background-color:rgb(255,255,255)">Venkatesh Shukla <br><br>B. Tech ( Electrical Engineering )<br>III Year<br>Indian Institute of Technology<br>Banaras Hindu University<br><br>
Ph No. +91 8960 579 122</b><div><b style="background-color:rgb(255,255,255)">Email: <u><a href="mailto:venkatesh.shukla.eee11@iitbhu.ac.in" target="_blank">venkatesh.shukla.eee11@iitbhu.ac.in</a></u></b></div></div></div>
</div>