<html><head></head><body>Try \r instead. In most languages that is a return. Don't speak Perl.<br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br><br><div class="gmail_quote">Lee Bengston <lee.bengston@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif">On Sun, Oct 2, 2011 at 11:34 AM, Heikki Hannikainen <hessu@hes.iki.fi> wrote:<br /><br />> Open the tnc serial device (there's a perl module for that,<br />> Device::SerialPort, apt-get install libdevice-serialport-perl), read packets<br />> in, and use <a href="http://search.cpan.org/dist/Ham-APRS-FAP">http://search.cpan.org/dist/Ham-APRS-FAP</a>/ to decode the APRS<br />> packets. It contains the kiss_to_tnc2 sub too to decode KISS (although<br />> you'll have to implement the KISS frame boundary detection yourself).<br /><br />This came up back in October in a different context. In my case I'm<br />just trying to communicate with a TNC using the above perl module, and<br />if the script sees the cmd prompt, send the commands to put it in KISS<br />mode. The problem is that whenever I send "\n" or "\r\n" I am unable<br />to get the prompt from the TNC, but I can do it manually
via minicom<br />or gtkterm.<br /><br />The TNC is a Kantronics KPC-9612+. If I send, for example,<br />"qwerty\n", all I can capture or receive is the echo of what I sent,<br />but no expected "EH?" or "cmd:" If I put the TNC in KISS mode<br />manually, I am able to send the chr(192) chr(255) chr(192) sequence<br />using the above perl module and take it out of KISS mode. It's<br />notable that no carriage return or newline is required in order to get<br />out of KISS mode.<br /><br />Finally, if the TNC happens to be sending packets (while not in KISS<br />mode) when the script is looking for text, the script can see that.<br />So it appears that the TNC is not accepting whatever the script sends<br />as a line terminator. I thought I would see if anyone on the list has<br />any experience with Device::SerialPort - maybe this sounds familiar.<br /><br />Lee - K5DAT<br /><br /><hr /><br />aprssig mailing list<br />aprssig@tapr.org<br /><a
href="https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig">https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig</a><br /><br /></pre></blockquote></div></body></html>