From ab7d9892584197063a999d499a1062a0ba6431e7 Mon Sep 17 00:00:00 2001 From: Xavier Date: Wed, 24 Aug 2022 07:32:07 +0200 Subject: [PATCH] first commit --- Arduino/Readme.md | 50 ++++ Arduino/Schematic.pdf | Bin 0 -> 20144 bytes Arduino/afskSampler.cpp | 43 ++++ Arduino/afskSampler.h | 13 + Arduino/hdlcAfskRx.cpp | 135 ++++++++++ Arduino/hdlcAfskRx.h | 46 ++++ Arduino/hdlcAfskTx.cpp | 159 ++++++++++++ Arduino/hdlcAfskTx.h | 60 +++++ Arduino/hdlcCrc.cpp | 46 ++++ Arduino/hdlcCrc.h | 24 ++ Arduino/hdlcCrcTable.cpp | 44 ++++ Arduino/hdlcCrcTable.h | 15 ++ Arduino/hdlcFramesBuffer.cpp | 134 ++++++++++ Arduino/hdlcFramesBuffer.h | 36 +++ Arduino/hdlcTnc.cpp | 143 +++++++++++ Arduino/hdlcTnc.h | 53 ++++ Arduino/kiss.cpp | 146 +++++++++++ Arduino/kiss.h | 58 +++++ Arduino/kissTnc.ino | 24 ++ Arduino/nano_ch340_schematics.pdf | Bin 0 -> 903502 bytes CM108/DiiRIy9XkAAfJpp.jpeg | Bin 0 -> 95430 bytes KissTncAx25_old | 1 + README.md | 27 ++ install.sh | 24 ++ kisstnc.jpg | Bin 0 -> 115110 bytes script/ax_arduino.sh | 12 + script/ax_cm108.sh | 19 ++ script/dwcm108.conf | 403 ++++++++++++++++++++++++++++++ 28 files changed, 1715 insertions(+) create mode 100644 Arduino/Readme.md create mode 100644 Arduino/Schematic.pdf create mode 100644 Arduino/afskSampler.cpp create mode 100644 Arduino/afskSampler.h create mode 100644 Arduino/hdlcAfskRx.cpp create mode 100644 Arduino/hdlcAfskRx.h create mode 100644 Arduino/hdlcAfskTx.cpp create mode 100644 Arduino/hdlcAfskTx.h create mode 100644 Arduino/hdlcCrc.cpp create mode 100644 Arduino/hdlcCrc.h create mode 100644 Arduino/hdlcCrcTable.cpp create mode 100644 Arduino/hdlcCrcTable.h create mode 100644 Arduino/hdlcFramesBuffer.cpp create mode 100644 Arduino/hdlcFramesBuffer.h create mode 100644 Arduino/hdlcTnc.cpp create mode 100644 Arduino/hdlcTnc.h create mode 100644 Arduino/kiss.cpp create mode 100644 Arduino/kiss.h create mode 100644 Arduino/kissTnc.ino create mode 100644 Arduino/nano_ch340_schematics.pdf create mode 100755 CM108/DiiRIy9XkAAfJpp.jpeg create mode 160000 KissTncAx25_old create mode 100755 README.md create mode 100755 install.sh create mode 100644 kisstnc.jpg create mode 100755 script/ax_arduino.sh create mode 100755 script/ax_cm108.sh create mode 100644 script/dwcm108.conf diff --git a/Arduino/Readme.md b/Arduino/Readme.md new file mode 100644 index 0000000..5518d34 --- /dev/null +++ b/Arduino/Readme.md @@ -0,0 +1,50 @@ +# KissTnc ARDUINO # + +## Description ## + +KissTnc is a C++ implementation of the TNC software for Arduino. It can be used for AX.25 / packet radio as well as for APRS applications. It is tested on the Arduino Nano and is compatible with MicroAPRS and PA4RAZ APRS projects. The sketch and all used cpp and header files can be opened in the Arduino IDE. + +## Hardware ## + +Hardware can be made around the Nano or other Arduino board, using the schematic added to this repository. +By default the following pins are used: + +- RX LED pin D10 +- TX LED pin D9 +- RX only input D8 +- PTT control pin D3 +- Low level Input select pin D2 +- The used analog input is A0 +- The four pins for generating the AFSK modulation signal are pin D4, D5, D6 and D7. + +The PTT, LED, RX only and level selection pins can be changed in the sketch by editing the defines in KissTnc.ino. + +The squelch on the radio can stay open, detection of incomming data (and collision prevention) is done by software. +If the audio level from the transceiver is low (below 1V peak-to-peak), the TNC can be set in the low level mode. To run in low level mode, connect D2 to 5V, and connect R10 to Ref instead of 5V. + +Rx only mode can be activated by connecting the RX only input (pin D9) to GND via a switch. + +## KISS Protocol ## + +KissTnc is compatible with the KISS protocol as described at: + + +The following KISS commands are implemented: + +- CMD_DATA_FRAME (0x00) +- CMD_TX_DELAY (0x01) +- CMD_P (0x02) +- CMD_SLOT_TIME (0x03) +- CMD_FULL_DUPLEX (0x05) + +For testing purpose an additional command is implemented: + +- CMD_LOOPBACK_TEST (0xfe) + +When enabling this function, packets transmitted from the host are routed back to the receiving part of the software. Instead of transmitting the packets, a constant 1200Hz tone is audible at the modulation output. After any change of the code, the software can be tested by doing a loop back test. The packet returned back to the host must be the same as the original ones. The signal set on the modulation output must be a stable 1200Hz (+/-1) tone. If this frequency is not 1200Hz or is not stable, the ISR is not returning on time. + +Following is not implemented: + +- CMD_TX_TAIL (0x04) (obsolete) +- CMD_SET_HARDWARE (0x06) +- CMD_RETURN (0xff) diff --git a/Arduino/Schematic.pdf b/Arduino/Schematic.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f803dd52a9ced6d2e2fa412ef856e1fb2dd6d9bf GIT binary patch literal 20144 zcmeIaWmsIx(l$(R2p$L$WPso@!{F}j?(PnQI|+~woZy~7aM$1x2=4BX;2zupyp!y` z&(1zi-gCYm@Adt9=9*cnr@N}U`tIuP)oZOPDkU)qCKhHkbgHjwBNOPToB$BO(ZmLw zj}Itk?O<*UvGz7M1F!()0ALUc8yip&zzq}!u&{HpasU;e`Dy?bZZ39qpcFtCz{bf9 zEdlEb2%wugnEj9f_{|3$70mK?C1U2Lj%Mac#t?fKXqBRlc5e0#E&w*562#oh+SJt% z0$>3P2mmFl?Oe?vKnXizSMxtufYM^ReBz>_+~ORp5-eaah?|{_MTCVN1O|(iH zg2cty1^zpQK2X}h%-mC#698uYk+yIIa6r{l0m_*>Sh`vPIJti4;{LOl96%LEM^^yX z&vI2LG5}T(P|eH99H^yYZUNNPWdVQzEYSA5xI)a0?a@)KmQ75|u#AjMjAW2-&^Ux% z9>avDJ$kNX0gJM^1~_!Z;zSaI;YKSV5_)-u5nBJ~d2slPuGoAuxd^lgp*#@iEA>6A z!5spY5sdQz8WuV#6xKgQ{|T^*t1-mY6Jlc?k z^^X(VAE%$90W3c|8Nl+x-k~HvyHp=23UPE2arD#$L37!;*`erw^?~wGOEmr;xlogZ z*7c{ND&{VZZV*$b;^3c^LG8p9YN>!ft>Z_V{??!6hx9)i|C>IMu!gv}0@&F9>KAq} z3v{G${$Xc|CN`?B_P_R#uZq3nyb#(w!~LvHwnsxuuoSIIpa>=Uyz^3c@Rd`rZ6ecp z_Ih%ETUG{^(Ord9;)wtEli5nFcHw$}5L$;b2^J|ADLq-R5MJOj3XYf99>&!q(Q}iy zd5H-!?1WV&tamhu=iV&j47_RKIvKN%c?y_cyWv*$cr?XmX!q+%iD&Q_Imm>!dI|aQ z%!F5I%xri@9FdJQ8S>PgMP