You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
1.1 KiB

#include <Arduino.h>
#include "KISS.h"
#define APRS_CONTROL_FIELD 0xf0
#define APRS_INFORMATION_FIELD 0xf0
#define HAS_BEEN_DIGIPITED_MASK 0b10000000
#define IS_LAST_ADDRESS_POSITION_MASK 0b1
//Data control frames, ported from Direwolf
//U-Frames
#define U_SABME 0x6f
#define U_SABM 0x3f //ok
#define U_DISC 0x53 //ok
#define U_DM 0x1f //need test
#define U_UA 0x73 //ok
#define U_FRMR 0x97 //need test
#define U_UI 0x13 //need test
#define U_XID 0xbf //need test
#define U_TEST 0xf3 //need test
//S-Frames
#define S_RR 0x11 //need test
#define S_RNR 0x15 //need test
#define S_REJ 0x19 //need test
#define S_SREJ 0x1d //need test
//I-Frame
#define I_I 0xcf //need test
//END
//PACKET MODE
String encode_kiss_pkt(const String& tnc2FormattedFrame);
String decode_kiss_pkt(const String &inputKISSTNCFrame, bool &dataFrame, bool &pktFrame);
String encapsulateKISS_pkt(const String &ax25Frame, uint8_t TNCCmd);