-
Notifications
You must be signed in to change notification settings - Fork 321
Description
I'm seeing some odd behavior trying to connect to remote systems via Direwolf's AGW support.
Originally I was writing my own code using the wl2k-go
package, and I thought maybe the problem was either with that package or with my code...but I'm able to reproduce the same behavior using agwterm
.
The issue is that while connections are established successfully, Direwolf shuts down the connection as soon as the remote host sends an RR frame. That is:
- Local system sends SABME/SABM frame
- Remote system sends UA frame
- Remote system sends several I frames with content (these are received correctly)
- Remote system sends RR frame
- Local systems replies with XID REJECT frame
- Local system replies to all subsequent frames with DM-
I've been testing things against a local packet BBS and a local digipeater. For example, here's the log from attempting to contact a local packet BBS using agwterm
:
Attempting connect to KZ2X-1 ...
[0L] N1LKS>KZ2X-1:(SABME cmd, p=1)
N1LKS audio level = 35(21/19) 334______
[0.1] N1LKS>KZ2X-1:(SABME cmd, p=1)
KZ2X-1 audio level = 103(45/41) 0000001__
[0.3] KZ2X-1>N1LKS:(UA res, f=1)
Stream 14: Connected to KZ2X-1. (v2.2)
KZ2X-1 audio level = 104(43/41) 0000000__
[0.3] KZ2X-1>N1LKS:(I cmd, n(s)=0, n(r)=0, p=0, pid=0xf0)CONNECTED TO KZ2X TIP #1 ON AX.25 FROM N1LKS<0x0d><0x0d>TYPE 'HOSTS' FOR HOSTS, 'EXIT' TO LOGOUT, 'HELP' FOR HELP<0x0d>TYPE 'CONNECT HOSTNAME' TO CONNECT TO A HOST<0x0d><0x0d>Pad><0x20>
[0L] N1LKS>KZ2X-1:(XID cmd, p=1) Half-Duplex REJ SREJ Multi-SREJ modulo-128 I-Field-Length-Rx=256 Window-Size-Rx=32 Ack-Timer=3000 Retries=10
[0L] N1LKS>KZ2X-1:(DM res, f=1)
[0L] N1LKS>KZ2X-1:(DM res, f=1)
A connection using the kernel AX.25 support (axcall radio KZ2X-1
) works just fine:
[0L] N1LKS>KZ2X-1:(SABM cmd, p=1)
[0L] N1LKS>KZ2X-1:(SABM cmd, p=1)
N1LKS audio level = 34(29/20) 0246_____
[0.0] N1LKS>KZ2X-1:(SABM cmd, p=1)
[0L] N1LKS>KZ2X-1:(SABM cmd, p=1)
N1LKS audio level = 35(19/18) 011______
[0.0] N1LKS>KZ2X-1:(SABM cmd, p=1)
KZ2X-1 audio level = 103(44/40) 0000000__
[0.3] KZ2X-1>N1LKS:(UA res, f=1)
KZ2X-1 audio level = 102(43/41) 0000002__
[0.3] KZ2X-1>N1LKS:(I cmd, n(s)=0, n(r)=0, p=0, pid=0xf0)CONNECTED TO KZ2X TIP #1 ON AX.25 FROM N1LKS<0x0d><0x0d>TYPE 'HOSTS' FOR HOSTS, 'EXIT' TO LOGOUT, 'HELP' FOR HELP<0x0d>TYPE 'CONNECT HOSTNAME' TO CONNECT TO A HOST<0x0d><0x0d>Pad><0x20>
[0L] N1LKS>KZ2X-1:(RR res, n(r)=1, f=0)
N1LKS audio level = 35(18/21) 73_______
[0.1] N1LKS>KZ2X-1:(RR res, n(r)=1, f=0)
[0L] N1LKS>KZ2X-1:(I cmd, n(s)=0, n(r)=1, p=0, pid=0xf0)help<0x0d>
N1LKS audio level = 36(17/21) 2________
[0.0] N1LKS>KZ2X-1:(I cmd, n(s)=0, n(r)=1, p=0, pid=0xf0)help<0x0d>
KZ2X-1 audio level = 103(44/40) |000000__
[0.3] KZ2X-1>N1LKS:(I cmd, n(s)=1, n(r)=1, p=0, pid=0xf0)<0x0d>
KZ2X-1 audio level = 102(44/39) 1000000__
[0.3] KZ2X-1>N1LKS:(I cmd, n(s)=2, n(r)=1, p=1, pid=0xf0)<0x0d>TIP COMMANDS:<0x0d><0x0d>HELP - SHOW TIP HELP<0x0d>HOSTS - DISPLAY KNOWN HOSTS<0x0d>EXIT - END TIP SESSION AND DISCONNECT<0x0d>CONNECT - CONNECT TO A TIP HOST<0x0d><0x0d>Pad><0x20>
.
.
.
If I configure the remote system as AX.25 V2.0 only by setting:
V20 KZ2X-1
V20 BROCK
Then I see a similar problem. There's no XID response, but we immediately start replying with DM frames after receiving data from the remote host:
Attempting connect to BROCK ...
[0L] N1LKS>BROCK:(SABM cmd, p=1)
N1LKS audio level = 35(18/17) _2_______
[0.1] N1LKS>BROCK:(SABM cmd, p=1)
BROCK audio level = 98(44/39) [NONE] |||||||__
[0.3] BROCK>N1LKS:(UA res, f=1)
Stream 1: Connected to BROCK. (v2.0)
BROCK audio level = 99(45/40) [NONE] _||||||__
[0.3] BROCK>N1LKS:(I cmd, n(s)=0, n(r)=0, p=0, pid=0xf0)###CONNECTED TO NODE BROCK(W1MV-7) CHANNEL A<0x0d>Welcome to BROCK (W1MV-7) in Brockton, Mass<0x0d>ENTER COMMAND: B,C,J,N, or Help ?<0x0d>
[0L] N1LKS>BROCK:(DM res, f=1)
[0L] N1LKS>BROCK:(DM res, f=1)
[0L] N1LKS>BROCK:(RR res, n(r)=1, f=0)
N1LKS audio level = 2(9/8) 8________
[0.0] N1LKS>BROCK:(DM res, f=1)
N1LKS audio level = 1(7/6) __5______
[0.2] N1LKS>BROCK:(RR res, n(r)=1, f=0)
Warning: Client application provided invalid PID value, 0x00, for I frame.
[0L] N1LKS>BROCK:(I cmd, n(s)=0, n(r)=1, p=0, pid=0xf0)nodes<0x0d>
N1LKS audio level = 35(19/19) 0002_____
[0.1] N1LKS>BROCK:(I cmd, n(s)=0, n(r)=1, p=0, pid=0xf0)nodes<0x0d>
[0L] N1LKS>BROCK:(RR cmd, n(r)=1, p=1)
BROCK audio level = 97(44/41) [NONE] |||||||__
[0.3] BROCK>N1LKS:(DM res, f=1)
Stream 1: AX.25 Protocol Error E: DM received in state 4.
Stream 1: Disconnected from BROCK.