diff --git a/CHANGELOG.md b/CHANGELOG.md index b01bc09..7ef9c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * none ## Bug fixes * RX buffer pointers bug fix +* AX.25 to TNC2 converter bug with non-UI frames ## Other * New KISS handling method to support long and multiple frames ## Known bugs diff --git a/Src/common.c b/Src/common.c index f350127..0849224 100644 --- a/Src/common.c +++ b/Src/common.c @@ -146,11 +146,16 @@ static void sendTNC2ToUart(Uart *uart, uint8_t *from, uint16_t len) } - UartSendByte(uart, ':'); //separator + UartSendByte(uart, ':'); //separator - nextPathEl += 2; //skip Control and PID + if((from[nextPathEl] & 0b11101111) == 0b00000011) //check if UI packet + { + nextPathEl += 2; //skip Control and PID - UartSendString(uart, &(from[nextPathEl]), len - nextPathEl); //send information field + UartSendString(uart, &(from[nextPathEl]), len - nextPathEl); //send information field + } + else + UartSendString(uart, "", 0); UartSendByte(uart, 0); //terminate with NULL } diff --git a/Src/kiss.c b/Src/kiss.c index 95d5967..18955c6 100644 --- a/Src/kiss.c +++ b/Src/kiss.c @@ -51,7 +51,7 @@ void KissParse(Uart *port, uint8_t data) { if(data == 0xC0) //frame end marker { - if(port->kissBufferHead < 17) //command+source+destination+PID+Control=17 + if(port->kissBufferHead < 16) //command+source+destination+Control=16 { port->kissBufferHead = 0; return;