Re: How to Enable/Disable KISS mode in a TNC-2 with Linux?

From: Manos Chalaris (SV1DAY) (ynzgsija@speckvc.com)
Date: Fri Apr 07 2000 - 18:35:35 EEST

  • Next message: Shawn T. Rutledge: "Re: AXIP and NetRom"

    Hello everybody again,

    First of all I really thank you all for the help and the immediate responce.
    Obviously, I am new in Linux and AX.25, though not new in computers, UNIX
    and Amateur radio.....
    Well, I did not know the existence of kissparms command.... I test it, to
    stop kiss mode. It works OK but no flashing LEDs like in JNOS...

    I continued the search and I reached to a final solution which makes me very
    happy.
    I want to share it with you all.

    So, I made two stupid simple scripts.
    ATTENTION: The first script works with kernels 2.2.x, because in previous
    versions of kernel the syntax of command stty is diferent.....
    But I think it works also in pre- 2.2.x kernels as well.

    First script: kisson
    stty -F /dev/ttyS1 speed 9600
    echo -en "KISS ON\015" > /dev/ttyS1
    echo -en "RESTART\015" > /dev/ttyS1
    echo "KISS is ON ..."

    Comments:
    1.This scripts flaghes quickly the LEDs CON and STA three times exaclty as
    JNOS does.... Yoopeeeeeee.....
    2.Use stty not setserial. This was my mistake in my first approach. (Read
    Serial-HOWTO to see why)
    Of course /dev/ttyS1 (=COM2 in DOS/WINDOWS) must match your serial port and
    9600 must match the speed of the serial port of your TNC.
    3. That trick with echo -en and the octal character 015 (0D in hex = Line
    feed) makes the LEDs flash. Note -n also. This is for NOT sending
    newline...!!! ???? Without all this trick, I had no luck with the LEDs...

    Second script
    echo -e "\300\377\300\300" > /dev/ttyS1
    echo "KISS is OFF..."

    Comments:
    1. The script flashes the LEDs CON and STA exaclty as when you turn the TNC
    on. Yoopeeeeeee again.
    Those strange numbers, is a sequence of four bytes, C0 FF C0 C0 in hex or
    300 377 300 300 in octal, and is the sequence that the kissparms -p
    <interface_name> -x sends to TNC as well as the JNOS command param
    <interface_name> 255 does.
    The problem with the kissparms -x command is, that it does not flashes the
    LEDs. I have no idea why....?????
    (Actually kissparms -x sends only C0 FF C0. One more C0 is missing... Maybe
    that is the difference, but I did not want to search more....)

    I hope that this is a usefull information for at least some of us...

    Thanks everybody once more,

    73 de SV1DAY
    Manos



    This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 18:47:10 EEST