├── extras ├── images │ ├── cad.png │ └── modem.png └── cad │ ├── tnc_connector.FCStd │ ├── tnc_connector_lower.stl │ └── tnc_connector_upper.stl ├── .gitignore ├── platformio.ini ├── README.md └── src └── main.cpp /extras/images/cad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sh123/libaprs_bluetooth_tnc/HEAD/extras/images/cad.png -------------------------------------------------------------------------------- /extras/images/modem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sh123/libaprs_bluetooth_tnc/HEAD/extras/images/modem.png -------------------------------------------------------------------------------- /extras/cad/tnc_connector.FCStd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sh123/libaprs_bluetooth_tnc/HEAD/extras/cad/tnc_connector.FCStd -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | -------------------------------------------------------------------------------- /extras/cad/tnc_connector_lower.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sh123/libaprs_bluetooth_tnc/HEAD/extras/cad/tnc_connector_lower.stl -------------------------------------------------------------------------------- /extras/cad/tnc_connector_upper.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sh123/libaprs_bluetooth_tnc/HEAD/extras/cad/tnc_connector_upper.stl -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | [platformio] 2 | description = Bluetooth KISS TNC modem 3 | default_envs = arduino_nano_p 4 | 5 | [env] 6 | platform = atmelavr 7 | framework = arduino 8 | lib_deps = 9 | https://github.com/sh123/LibAPRS.git#custom_tracker 10 | check_tool = cppcheck 11 | check_flags = 12 | cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK 13 | check_skip_packages = yes 14 | monitor_speed = 9600 15 | 16 | [env:arduino_nano_p] 17 | board = nanoatmega328 18 | board_build.mcu = atmega328p 19 | board_build.f_cpu = 16000000L 20 | 21 | [env:arduino_uno_m] 22 | board = uno 23 | board_build.mcu = atmega328p 24 | board_build.f_cpu = 16000000L 25 | build_flags = 26 | -D TNC_CAR -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Arduino Bluetooth AFSK1200 TNC Modem 2 | ==================================== 3 | Arduino Nano/Uno Bluetooth KISS AFSK1200 TNC based on customized version of LibAPRS. 4 | 5 | Introduction 6 | ------------ 7 | Arduino bluetooth TNC modem is based on customized version of LibAPRS, allows 8 | simultaneously work using both bluetooth and USB-serial port. Uses next 9 | peripherals: 10 | 11 | * 👍 Micromodem shield for Arduino Nano - https://oshpark.com/shared_projects/NjA5xkC7 12 | * or Micromodem from marqvist - http://unsigned.io/micromodem/ 13 | * Bluetooth serial adapter HC-05/HC-06 14 | 15 | ⚠ For packet decoding requires additional RC filter on speaker line to overcome handheld transceiver pre-emphasis. Also, requires additional single power wire to trasnsciver battery for power. 16 | 17 | Building 18 | ------------ 19 | Use platformio to build and upload. 20 | 21 | Images 22 | ------- 23 | ![alt text](extras/images/cad.png) 24 | 25 | ![alt text](extras/images/modem.png) 26 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define OPEN_SQUELCH false 4 | #define ADC_REFERENCE REF_5V 5 | 6 | #include "LibAPRS.h" 7 | #include "KISS.h" 8 | 9 | extern Afsk modem; 10 | extern AX25Ctx AX25; 11 | 12 | char incomingByte; 13 | 14 | #ifdef TNC_CAR 15 | SoftwareSerial bluetooth(10, 11); // RX, TX (car) 16 | #pragma message("Building for /M TNC") 17 | #else 18 | SoftwareSerial bluetooth(12, 11); // RX, TX (tnc05, tnc06) 19 | #pragma message("Building for /P TNC") 20 | #endif 21 | 22 | void aprs_msg_callback(struct AX25Ctx *ctx) { 23 | kiss_messageCallback(ctx); 24 | } 25 | 26 | void setup() { 27 | Serial.begin(9600); 28 | bluetooth.begin(9600); 29 | 30 | APRS_init(ADC_REFERENCE, OPEN_SQUELCH); 31 | //APRS_setTail(1000U); 32 | kiss_init(&AX25, &modem, &Serial, &bluetooth); 33 | //Serial.println("started"); 34 | } 35 | 36 | void loop() { 37 | APRS_poll(); 38 | while (bluetooth.available() > 0) { 39 | incomingByte = bluetooth.read(); 40 | //Serial.write(incomingByte); 41 | kiss_serialCallback(incomingByte); 42 | } 43 | while (Serial.available() > 0) { 44 | incomingByte = Serial.read(); 45 | kiss_serialCallback(incomingByte); 46 | } 47 | } 48 | --------------------------------------------------------------------------------