From 4d78a4baee3170affbb4e001bee4720f425f2e6b Mon Sep 17 00:00:00 2001 From: batt Date: Mon, 6 Dec 2010 12:07:59 +0000 Subject: [PATCH] Signed-off-by: Robert Marshall KI4MCW According to the protocol document... http://www.tapr.org/pdf/AX25.2.2.pdf ...bits 6 and 5 in the SSID should be set to 1 if unused. In a simplified use case such as APRS, bit 7 can be set to 0 for the source and destination SSIDs. This yields an offset of 0x60 for all SSIDs in the path, which can be ORed in prior to transmission. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4618 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/net/ax25.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bertos/net/ax25.c b/bertos/net/ax25.c index 3d5ac343..2ea17efb 100644 --- a/bertos/net/ax25.c +++ b/bertos/net/ax25.c @@ -210,8 +210,9 @@ static void ax25_sendCall(AX25Ctx *ctx, const AX25Call *addr, bool last) for (unsigned i = 0; i < sizeof(addr->call) - len; i++) ax25_putchar(ctx, ' ' << 1); + /* Bits6:5 should be set to 1 for all SSIDs (0x60) */ /* The bit0 of last call SSID should be set to 1 */ - uint8_t ssid = addr->ssid << 1 | (last ? 0x01 : 0); + uint8_t ssid = 0x60 | (addr->ssid << 1) | (last ? 0x01 : 0); ax25_putchar(ctx, ssid); } -- 2.25.1