<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Aug 23, 2015, at 6:26 PM, Mario Lobo <<a href="mailto:mlobo@digiart.art.br" class="">mlobo@digiart.art.br</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">I hope it helps!<br class=""></blockquote><div class=""><br class=""></div><div class="">It is a bit easier to read than the ktrace output. Here are the bytes received, without the other messages:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">Network UPS Tools - Microsol Solis UPS driver 0.63 (2.7.3.1)</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 00 17 91 49 5e 5e bc <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ac 1b 0a a0 ed 01 07 07 bb 46 82 ae 1b 09</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 04 02 06 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e dc <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 83 ad 1a 09</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 0a 02 07 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e e3 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ac 1a 0a</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 f4 01 08 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e d1 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 02 0b</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 0b 02 09 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e d4 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 1e 0a</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 1b 02 0a 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e 00 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 1d 0a</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 f6 01 0b 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e da <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 83 ac 1a 09</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => a0 f4 01 0c 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e d0 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 1e 0a</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 0d 02 0d 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e f5 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 83 ad 02 09 a0</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 0e 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e d9 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ac 1e 0b a0 1d</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 0f 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e 07 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 88 ac 1c 0a a0 04</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 10 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e ed <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ac 19 0a a0 07</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 11 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e ed <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 88 ad 23 0c a0 4c</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 12 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e 41 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 83 ae 02 0a a0 1b</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 02 13 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e e9 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 1d 0a a0 f8</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 01 14 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e e5 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ae 1a 0a a0 ef</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 15 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e db <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 88 ad 1b 0a a0 f2 01</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e df <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 88 ad 1a 0a a0 f8 01 17</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e e6 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 46 83 ad 02 0a a0 e3 01 18</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">CommReceive: RecPack: (25 bytes) => 1d 0d 03 00 00 00 01 00 17 91 49 5e 5e b4 <span style="font-variant-ligatures: no-common-ligatures; color: #ffffff; background-color: #000000" class="">fe</span> bb 47 88 ad 1d 0a a0 0f 02 19</div><div style="margin: 0px; font-family: Monaco; font-size: 12px;" class="">Solis not detected! aborting ...</div></div><div class=""><br class=""></div><div class="">I highlighted the final character (0xfe/254). It seems as though the code expects the serial stream to always put the 0xfe character at the end of the buffer, but as you can see, that is not the case in the debug output. (The code loops twenty times, so it is not impossible for it to sync: this may be what happened when you ran the driver in gdb.)</div><div class=""><br class=""></div><div class="">We could modify the code to re-sync with the start character, but what concerns me is that a byte gets dropped occasionally. If you run "stty -f /dev/cuaU0 raw", then run the driver with the same debug flags, do you get the same sort of output, where the "fe" character moves left? You might also try unplugging the USB cable, then running the driver immediately after plugging it in again (maybe there is a buffer filling up - that happened a number of years ago on another USB interface on FreeBSD).</div><br class=""><div class="">-- <br class="">Charles Lepple<br class="">clepple@gmail<br class=""><br class=""><br class=""></div><br class=""></body></html>