KPCGPS pilot project documentation (rough draft 31 JAN 1997) Operation of the KPCGPS unit depends on the DTR pin (pin 20) of the RS232 port. If DTR is open or pulled low, the KPC will be in the 'REMOTE' mode of operation, where it assumes it is connected to a GPS unit. If DTR is pulled high, the KPC will be in its 'BASE' mode of operation, where it assumes it is connected to a terminal or computer. A unit to be used in remote mode must first have its parameters setup while in base mode. These parameters are automatically saved in the EEPROM of the KPC. To enter base mode, connect the KPCGPS to a terminal or computer. Be sure pin 20 (DTR) of the RS232 connector is pulled high. Typically if you are using a standard RS232 cable, the pin will be pulled high by the computer. It may be necessary in some cases to enter the terminal program first. Once the KPC is connected to the computer, turn the unit on. If the KPC is still in its factory defaults, it will start to autobaud: sending a string of characters at different available baud rates until it detects an '*' from the computer. Even if DTR is low, if the ABAUD and MYID parameters have not been properly set, the unit will still enter the base mode on power up. If you do not know if the unit still has factory defaults, you can use the 'hard-reset' procedure to get the unit in a known state. Turn the KPC off and move the reset jumper J11 (near the 9v battery cutout) so that the two pins are shorted together. Turn the unit on. If you have a computer connected, you will see a brief diagnostic message output at 1200 baud on the RS232 port. Turn the unit off and remove the jumper from J11. To set up a KPC for remote mode, you must be sure to set the ABAUD rate to match the GPS unit to which it will be attached. It is best to use the same ABAUD rate in your terminal program as used by the GPS unit. You must also set the MYID; this can be any string of characters with a maximum length of 8. If there are other KPCGPS systems being used on your frequency, you should set the NETID to be different than the other systems; the base unit will monitor only those packets with the same NETID as set in the base unit. When the KPC in remote mode is turned on, it will send an optional initialization string (GPSINIT) to the GPS unit; a CTRL-N in the string is converted to the CR/LF sequence. The KPCGPS uses only the RMC string from the GPS unit. If the KPC does not receive a valid RMC string after it is turned on, no packets will be sent. There are three ways that the remote KPC can send location data packets over the radio: 1) The location packet can be appended to the end of all transmissions from the remote radio. For this to happen, the PTT from the microphone must be connected to pin 2 (XCD) of the radio connector of the KPCGPS and pin 3 (PTT) and pin 8 (CTLA) of the radio connector of the KPCGPS must both be tied to the PTT of the radio. The audio from the mike and the transmit audio from the KPC (pin 1 of the radio connector) must both go to the radio. When the PTT from the mike grounds the XCD pin of the KPC, the KPC grounds the PTT of the radio by grounding CTLA; the yellow led on the front of the KPC is used to show this state. When the PTT from the mike is released, the KPC then grounds its PTT line which enables the modem in the KPC to send the location packet out on the transmit audio line; the red led on the front of the KPC is turned on while this is happening. After the packet has been sent, the KPC releases the PTT to the radio and the leds are turned off. The packet sent is in compressed format. 2) The full text of the RMC string in uncompressed format can be sent out at regular intervals if BEACON is set non-zero. Receive audio from the radio must be connected to pin 5 of the KPC radio connector so that beacons are not transmitted while the radio is busy (as determined by energy detection). Beacons do not use the CTLA pin. However, to avoid transmitting a beacon while the remote unit is using the mike, the mike PTT should be connected to the XCD pin of the KPC radio connector. CTLA and the yellow led will follow the input to the XCD pin. 3) An alarm beacon can be enabled by setting ALARM non-zero. If ALARM is non-zero and the RTS pin (pin 4) of the RS232 port on the KPC is pulled briefly to ground, the KPC will immediately send out an alarm packet in compressed format. The alarm packet will be sent out periodically until the unit is reset or powered off. Compressed packets are sent for the alarm packets and the appended packets. If SHORT is on, only the latitude and longitude are sent in the packet. If SHORT is off, the latitude, longitude, speed over ground, track made good, and magnetic variation degrees fields are sent. This data is further compressed so that numbers, decimal points, and necessary commas occupy only 4 bits in the transmitted packet. The base station (in base mode) can be used to monitor the location packets. If MONITOR is on, the base station will display all packets from remotes which have the same NETID as the base station. The base station displays the monitored packet with the MYID of the remote unit, followed by the packet status byte in hex in {} brackets, followed by the location data. The status byte has the format CAE00011, where C indicates compressed data, A indicates an alarm packet and E indicates the KPC has not received a valid RMC string since the KPC last transmitted location data. The CTLB output of the base station is grounded while receiving a location packet (or any time the RCV led on the KPC is turned on). This could possibly be used to squelch data audio going to a external speaker. The following commands are still in the KPCGPS after stripping many commands from the KPC3 code. Several of these commands may not be used in the final product as this project develops. ABAUD 'RS232 terminal baud rate' ALARM 'n Enables alarm beacons sent out every n minutes' ANALOG 'Displays analog inputs' APPEND 'If on, location packet will be appended to transmissions' AUTOLF 'LF sent to terminal after CR' AXDELAY 'Time added to TXDELAY for repeaters (10 msec)' BEACON 'n Full RMC string sent out every n minutes' BKONDEL 'If on, DELETE will backspace; else \\' CANLINE 'Char used to cancel a partial line' CANOUT 'Toggle char used to send output from TNC to bit bucket' CALIBRAT 'immediate command to enter calibration mode' CR 'SENDPAC char appended to packets formed by SENDPAC' DELETE 'Char used to delete last char in line' DISPLAY 'Shows all parameters' ECHO 'Characters from terminal are echoed back' FLOW 'TNC will not send data to terminal until input line complete' FILTER 'If on, removes most control codes from received packets' GPSINIT 'Initial text sent to terminal in GPS mode' HELP 'Displays brief help messages for commands' LEDS 'Enables front panel LEDS' MONITOR 'Master switch for monitoring packets' MYID 'Remote ID up to 8 characters long' NETID 'Network ID (0-255)' PASS 'Char used to pass special characters as data' PERSIST 'Probability of transmitting during slot time (0-255)' RESET 'Soft reset' RESTORE 'DEFAULTS Parameters changed to factory defaults' SHORT 'If on, only latitude and longitude sent in commpressed packets' SLOTTIME 'Time between successive tries of persistance algorithm (10 msec)' START 'Char to restart output from TNC to terminal' STOP 'Char to stop output from TNC to terminal' SWP 'Allows fine tuning of SOFTWARE CD' TXDELAY 'Time delay between PTT and radio data out (10 msec)' VERSION 'Displays software version number' XFLOW 'Master switch for software flow control' XMITLVL 'Transmit level (0-502)' XMITOK 'If on, allows TNC to key transmitter' XOFF 'Char to stop input from terminal to TNC' XON 'Char to restart input from terminal to TNC'