Month: February 2019

Accessing Internet from NuttX PPP Connection

As you know I was facing some issues to get PPPD connection working:

https://acassis.wordpress.com/2019/02/10/debugging-pppd-using-quectel-m95-on-samd21-board/

Then I received a comment from Vladimir Novikov (thank you!) at that post commenting the issues was introduced some time ago at this commit:

https://bitbucket.org/nuttx/apps/commits/cddfda99f0a519681b894b7a12560406c4372cfb

And he suggested me adding this line to lcp.c:

          tptr = bptr;
+          bptr += 4;
          error = 0;

Before testing this suggestion I received an email from Quectel Brasil support (thanks Micael Lisboa) suggesting run this AT cmd:

AT+QACCM=0,0

Micael’s suggestion worked fine.

But I decided to contact the author of the modification (Xiao Xiang) and he explained that the bptr was already increased by 4 compared to original code. And in fact he was correct.

Anyway I decided to test Vladimir’s suggestion that also worked. So we need to investigate it in more details to understand what is happening.

BTW since the AT command was working for me I decided to follow with my tests.

After PPPD connection was established it was getting IP:

nsh> ifconfig
ppp0    Link encap:TUN at UP
        inet addr:100.75.210.38 DRaddr:192.168.254.254 Mask:0.0.0.0

But ping command was crashing:

nsh> ping 8.8.8.8

PINGup_assert: Assertion failed at file:armv6-m/up_hardfault.c line: 139
up_registerdump: R0: 20000a78 00000000 00000000 00004a64 20000819
20006f8c 20000a78 00000000
up_registerdump: R8: 00000000 00000000 00000000 00000000 20000414
20003fa0 0000b54f 00009dd6
up_registerdump: xPSR: 21000000 PRIMASK: 00000000
up_dumpstate: sp:         20003ee8
up_dumpstate: stack base: 20004040
up_dumpstate: stack size: 000007e4
up_stackdump: 20003ee0: 2000385c 000009c5 00000000 00000000 00000000
20000414 20003fa0 0000b54f
up_stackdump: 20003f00: 00009dd6 00000000 00013437 00000000 00000000
00000000 20000000 00000018
up_stackdump: 20003f20: 00000003 20003f58 00000000 00000c03 00000018
000010e3 20001e5c 00000ab9
up_stackdump: 20003f40: 00000000 00000000 00000000 20000a78 00000000
000002ab 20003fa0 00000000
up_stackdump: 20003f60: 20000819 20006f8c 20000a78 00000000 00000000
00000000 00000000 00000000
up_stackdump: 20003f80: 20000a78 00000000 00000000 00004a64 20000414
0000b54f 00009dd6 21000000
up_stackdump: 20003fa0: 20000a78 00004000 20006f8c 00004000 2000077c
00009d5d 00000000 0000b54f
up_stackdump: 20003fc0: 00000000 20000a78 00004000 00000000 20000a78
0000fd1d 20001f2c 0000b7f1
up_stackdump: 20003fe0: 00000000 0000b34b 200007f0 20000a74 00000000
0000ff3f 200007f8 00001ee9
up_stackdump: 20004000: 00000000 00001bcf ffffffff 00000000 20001de8
00020000 00000000 00000101
up_stackdump: 20004020: 00000000 00000000 00000000 0000144b 00000101
0000140f 00000000 00000000

After much debugging and with Greg’s help I noticed the “srcipaddr” was not aligned:

(gdb)
194       net_ipv4addr_hdrcopy(ipv4->srcipaddr, &dev->d_ipaddr);
(gdb) p &ipv4->srcipaddr
$1 = (uint16_t (*)[2]) 0x20000c41 
(gdb) p &dev->d_ipaddr
$2 = (in_addr_t *) 0x20000eac 

See, it was at 0x20000c41 that is an odd address position.

Almost instantly Greg found the source of this issue: it was the TUN/TAP driver that was defining the read_buf at odd position:

 142   bool              read_wait;
 143
 144   uint8_t           read_buf[CONFIG_NET_TUN_PKTSIZE];
 145   size_t            read_d_len;
 146   uint8_t           write_buf[CONFIG_NET_TUN_PKTSIZE];

Moving the “size_t read_d_len;” to the line above read_buf[] fixed the issue!

Now ping is not crashing and I was able to ping the Google’s DNS 8.8.8.8:

nsh> ping 8.8.8.8
PING 8.8.8.8 56 bytes of data
56 bytes from 8.8.8.8: icmp_seq=0 time=1010 ms
56 bytes from 8.8.8.8: icmp_seq=2 time=1260 ms
56 bytes from 8.8.8.8: icmp_seq=2 time=370 ms
56 bytes from 8.8.8.8: icmp_seq=4 time=1080 ms
56 bytes from 8.8.8.8: icmp_seq=4 time=490 ms
56 bytes from 8.8.8.8: icmp_seq=5 time=870 ms
56 bytes from 8.8.8.8: icmp_seq=6 time=560 ms
56 bytes from 8.8.8.8: icmp_seq=7 time=930 ms
56 bytes from 8.8.8.8: icmp_seq=8 time=640 ms
56 bytes from 8.8.8.8: icmp_seq=9 time=1010 ms
10 packets transmitted, 10 received, 0% packet loss, time 10100 ms

How to use git behind proxy

I was willing to use git behind company proxy.

Then I found these tips:

https://stackoverflow.com/questions/2088156/git-through-digest-proxy-authentication

Unfortunately just adding it didn’t work:

git config --global http.proxy "http://USERNAME:PASSWORD@IP:PORT"
git config --global https.proxy "https://USERNAME:PASSWORD@IP:PORT"

Searching a little bit more I found the final piece:

https://askubuntu.com/questions/1061945/not-able-to-connect-to-github-via-proxy

git config --global http.proxyAuthMethod 'basic'

Debugging PPPD using Quectel M95 on SAMD21 board

I’m trying to get NuttX PPPD working with Quectel M95, but it is returning error in the “LCP Config Request” phase:

NuttShell (NSH)
nsh> pppd
tun fd:3
tty fd:4
ipcp init


AHDLC_TX - transmit frame, protocol 0xc021, length 4  offline 0

0x05 0x01 0x00 0x04

AHDLC_TX - transmit frame, protocol 0xc021, length 4  offline 1

0x05 0x02 0x00 0x04

chat_tokenise: SCRIPT: "" ATZ OK \c
tok_on_delimiter:  (0)
tok_on_delimiter: ATZ (0)
tok_on_delimiter: OK (0)
tok_on_delimiter:  (1)
chat_tokenise: RESULT: 0
chat_internalise: (L)
chat_internalise: (R) ATZ
chat_internalise: (L) OK
chat_internalise: (R)
chat_internalise: result 0, rhs 0
chat_tokens_free: tokens freed
chat_line_run: type 1, rhs ATZ

chat:  ATZ

chat_expect:
EXPECTED:
chat_expect: result 0
chat_flush: starting
chat_readb: read '~' (0x7E)
chat_readb: read '�' (0xFF)
chat_readb: read '}' (0x7D)
chat_readb: read '#' (0x23)
chat_readb: read '�' (0xC0)
chat_readb: read '!' (0x21)
chat_readb: read '}' (0x7D)
chat_readb: read '%' (0x25)
chat_readb: read '}' (0x7D)
chat_readb: read '!' (0x21)
chat_readb: read '}' (0x7D)
chat_readb: read ' ' (0x20)
chat_readb: read '}' (0x7D)
chat_readb: read '
 (0x24)
chat_readb: read '=' (0x3D)
chat_readb: read '�' (0xC7)
chat_readb: read '~' (0x7E)
chat_readb: read '~' (0x7E)
chat_readb: read '�' (0xFF)
chat_readb: read '}' (0x7D)
chat_readb: read '#' (0x23)
chat_readb: read '�' (0xC0)
chat_readb: read '!' (0x21)
chat_readb: read '}' (0x7D)
chat_readb: read '%' (0x25)
chat_readb: read '}' (0x7D)
chat_readb: read '"' (0x22)
chat_readb: read '}' (0x7D)
chat_readb: read ' ' (0x20)
chat_readb: read '}' (0x7D)
chat_readb: read '
 (0x24)
chat_readb: read 'Y' (0x59)
chat_readb: read '(' (0x28)
chat_readb: read '~' (0x7E)
chat_readb: read '+' (0x2B)
chat_readb: read '+' (0x2B)
chat_readb: read '+' (0x2B)
chat_readb: read 'A' (0x41)
chat_readb: read 'T' (0x54)
chat_readb: read 'E' (0x45)
chat_readb: read '1' (0x31)
chat_readb: read '' (0x0D)
chat_readb: read '' (0x0D)
~�}#�!}%}!} }$=�~~�}#�!}%}"} }$Y(~+++ATE1
chat_readb: read '
' (0x0A)
chat_readb: read 'O' (0x4F)
chat_readb: read 'K' (0x4B)
chat_readb: read '' (0x0D)
OK
chat_readb: read '
' (0x0A)
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 5 out of 5 bytes of 'ATZ
'
chat_line_run: type 1, rhs
chat: OK
chat_expect:
EXPECTED: OK
chat_readb: read 'A' (0x41)
chat_readb: read 'T' (0x54)
chat_readb: read 'Z' (0x5A)
chat_readb: read '' (0x0D)
chat_readb: read '' (0x0D)
ATZ
chat_readb: read '
' (0x0A)
chat_readb: read 'O' (0x4F)
chat_readb: read 'K' (0x4B)
chat_expect: result 0
chat_flush: starting
chat_readb: read '' (0x0D)
OK
chat_readb: read '
' (0x0A)
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 0 out of 0 bytes of ''
chat_script_run: Script result 0, exited on line 2
chat_tokenise: SCRIPT: ECHO ON TIMEOUT 30 "" ATE1 OK AT+CGDCONT=1,\"IP\",\"internet\" "" ATD*99***1# CONNECT \c
tok_on_delimiter: ECHO (0)
tok_on_delimiter: ON (0)
tok_on_delimiter: TIMEOUT (0)
tok_on_delimiter: 30 (0)
tok_on_delimiter:  (0)
tok_on_delimiter: ATE1 (0)
tok_on_delimiter: OK (0)
tok_on_delimiter: AT+CGDCONT=1,"IP","internet" (0)
tok_on_delimiter:  (0)
tok_on_delimiter: ATD*99***1# (0)
tok_on_delimiter: CONNECT (0)
tok_on_delimiter:  (1)
chat_tokenise: RESULT: 0
chat_internalise: (L) ECHO
chat_internalise: (R) ON
chat_internalise: (L) TIMEOUT
chat_internalise: (R) 30
chat_internalise: (L)
chat_internalise: (R) ATE1
chat_internalise: (L) OK
chat_internalise: (R) AT+CGDCONT=1,"IP","internet"
chat_internalise: (L)
chat_internalise: (R) ATD*99***1#
chat_internalise: (L) CONNECT
chat_internalise: (R)
chat_internalise: result 0, rhs 0
chat_tokens_free: tokens freed
chat_line_run: type 0, rhs ON

chat: cmd 1, arg ON

chat_line_run: type 0, rhs 30

chat: cmd 4, arg 30

chat_line_run: timeout is 30 s
chat_line_run: type 1, rhs ATE1

chat:  ATE1

chat_expect:
EXPECTED:
chat_expect: result 0
chat_flush: starting
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 6 out of 6 bytes of 'ATE1
'
chat_line_run: type 1, rhs AT+CGDCONT=1,"IP","internet"

chat: OK AT+CGDCONT=1,"IP","internet"

chat_expect:
EXPECTED: OK
chat_readb: read 'A' (0x41)
chat_readb: read 'T' (0x54)
chat_readb: read 'E' (0x45)
chat_readb: read '1' (0x31)
chat_readb: read '' (0x0D)
chat_readb: read '' (0x0D)
ATE1
chat_readb: read '
' (0x0A)
chat_readb: read 'O' (0x4F)
chat_readb: read 'K' (0x4B)
chat_expect: result 0
chat_flush: starting
chat_readb: read '' (0x0D)
OK
chat_readb: read '
' (0x0A)
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 30 out of 30 bytes of 'AT+CGDCONT=1,"IP","internet"
'
chat_line_run: type 1, rhs ATD*99***1#

chat:  ATD*99***1#

chat_expect:
EXPECTED:
chat_expect: result 0
chat_flush: starting
chat_readb: read 'A' (0x41)
chat_readb: read 'T' (0x54)
chat_readb: read '+' (0x2B)
chat_readb: read 'C' (0x43)
chat_readb: read 'G' (0x47)
chat_readb: read 'D' (0x44)
chat_readb: read 'C' (0x43)
chat_readb: read 'O' (0x4F)
chat_readb: read 'N' (0x4E)
chat_readb: read 'T' (0x54)
chat_readb: read '=' (0x3D)
chat_readb: read '1' (0x31)
chat_readb: read ',' (0x2C)
chat_readb: read '"' (0x22)
chat_readb: read 'I' (0x49)
chat_readb: read 'P' (0x50)
chat_readb: read '"' (0x22)
chat_readb: read ',' (0x2C)
chat_readb: read '"' (0x22)
chat_readb: read 'i' (0x69)
chat_readb: read 'n' (0x6E)
chat_readb: read 't' (0x74)
chat_readb: read 'e' (0x65)
chat_readb: read 'r' (0x72)
chat_readb: read 'n' (0x6E)
chat_readb: read 'e' (0x65)
chat_readb: read 't' (0x74)
chat_readb: read '"' (0x22)
chat_readb: read '' (0x0D)
chat_readb: read '' (0x0D)
AT+CGDCONT=1,"IP","internet"
chat_readb: read '
' (0x0A)
chat_readb: read 'O' (0x4F)
chat_readb: read 'K' (0x4B)
chat_readb: read '' (0x0D)
OK
chat_readb: read '
' (0x0A)
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 13 out of 13 bytes of 'ATD*99***1#
'
chat_line_run: type 1, rhs
chat: CONNECT
chat_expect:
EXPECTED: CONNECT
chat_readb: read 'A' (0x41)
chat_readb: read 'T' (0x54)
chat_readb: read 'D' (0x44)
chat_readb: read '*' (0x2A)
chat_readb: read '9' (0x39)
chat_readb: read '9' (0x39)
chat_readb: read '*' (0x2A)
chat_readb: read '*' (0x2A)
chat_readb: read '*' (0x2A)
chat_readb: read '1' (0x31)
chat_readb: read '#' (0x23)
chat_readb: read '' (0x0D)
chat_readb: read '' (0x0D)
ATD*99***1#
chat_readb: read '
' (0x0A)
chat_readb: read 'C' (0x43)
chat_readb: read 'O' (0x4F)
chat_readb: read 'N' (0x4E)
chat_readb: read 'N' (0x4E)
chat_readb: read 'E' (0x45)
chat_readb: read 'C' (0x43)
chat_readb: read 'T' (0x54)
chat_expect: result 0
chat_flush: starting
chat_readb: read '' (0x0D)
CONNECT
chat_readb: read '
' (0x0A)
chat_readb: poll timed out
chat_flush: done
chat_send: wrote 0 out of 0 bytes of ''
chat_script_run: Script result 0, exited on line 6
ipcp init
ipcp init

Sending LCP request packet -  len 10

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x01 0x00 0x00 0x0a 0x02 0x06 0xff 0xff 0xff 0xff

Receiving packet with good crc value, len 22

0x01 0x01 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 1
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 1

0x03 0x01 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 14

0x02 0x00 0x00 0x0a 0x02 0x06 0xff 0xff 0xff 0xff

LCP Packet - LCP-ACK - >>>>>>>> good ACK id up! 0

Receiving packet with good crc value, len 22

0x01 0x02 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 2
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x02 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x03 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 3
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x03 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x04 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 4
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x04 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x05 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 5
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x05 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x06 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 6
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x06 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x07 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 7
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x07 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x08 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 8
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x08 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x09 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 9
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x09 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0a 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 10
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0a 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0b 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 11
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0b 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0c 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 12
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0c 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0d 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 13
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0d 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0e 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 14
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0e 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x0f 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 15
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x0f 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x10 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 16
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x10 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x11 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 17
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x11 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x12 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 18
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x12 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x13 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 19
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x13 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x14 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 20
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x14 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x15 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 21
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x15 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x16 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 22
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x16 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x17 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 23
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x17 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x18 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 24
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x18 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x19 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 25
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x19 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1a 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 26
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1a 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1b 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 27
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1b 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1c 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 28
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1c 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1d 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 29
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1d 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1e 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 30
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1e 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x1f 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 31
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x1f 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x20 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 32
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x20 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x21 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 33
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x21 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x22 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 34
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x22 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x23 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 35
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x23 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x24 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 36
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x24 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x25 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 37
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x25 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x26 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 38
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x26 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x27 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 39
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x27 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x28 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 40
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x28 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x29 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 41
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x29 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2a 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 42
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2a 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2b 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 43
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2b 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2c 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 44
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2c 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2d 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 45
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2d 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2e 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 46
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2e 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x2f 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 47
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x2f 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x30 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 48
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x30 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x31 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 49
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x31 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x32 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 50
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x32 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x33 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 51
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x33 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x34 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 52
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x34 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x35 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 53
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x35 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x36 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 54
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x36 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x37 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 55
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x37 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x38 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 56
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x38 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x39 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 57
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x39 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3a 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 58
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3a 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3b 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 59
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3b 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3c 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 60
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3c 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3d 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 61
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3d 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3e 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 62
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3e 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x3f 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 63
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x3f 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x40 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 64
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x40 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x41 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 65
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x41 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x42 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 66
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x42 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x43 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 67
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x43 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x44 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 68
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x44 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x45 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 69
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x45 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x46 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 70
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x46 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x47 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 71
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x47 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x48 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 72
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x48 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x49 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 73
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x49 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4a 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 74
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4a 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4b 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 75
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4b 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4c 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 76
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4c 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4d 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 77
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4d 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4e 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 78
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4e 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x4f 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 79
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x4f 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x50 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 80
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x50 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x51 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 81
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x51 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x52 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 82
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x52 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x53 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 83
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x53 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x54 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 84
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x54 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x55 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 85
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x55 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x56 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 86
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x56 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x57 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 87
We only support default or all zeros for ACCM   
Writing NAK frame                                                                    

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

0x03 0x57 0x00 0x0a 0x02 0x06 0x00 0x00 0x00 0x00

- end NAK Write frame

Receiving packet with good crc value, len 22

0x01 0x58 0x00 0x12 0x02 0x06 0x00 0x0a 0x00 0x00 0x03 0x04 0xc0 0x23 0x07 0x02
0x08 0x02

LCP Packet - ipcp init
received [LCP Config Request id 88
We only support default or all zeros for ACCM   
Writing NAK frame 

AHDLC_TX - transmit frame, protocol 0xc021, length 10  offline 0

Learning the new NuttX PPPD/CHAT script

Probably you already know it, but I will reinforce the idea: “Changing is the only constant thing!”

So we need to change and to adapt all the time.

Why am I saying these “non-sense” words? Let me explain…

This is a sample of the old NuttX PPPD/Chat script:

static struct chat_script_s connect_script =
{
  .timeout = 30,
  .lines =
  {
    {"AT",                                 "OK"},
    {"AT+CGDCONT = 1,\"IP\",\"internet\"", "OK"},
    {"ATD*99***1#",                        "CONNECT"},
    {0, 0}
  },
};

static struct chat_script_s disconnect_script =
{
  .timeout = 30,
  .lines =
  {
    {"ATZ",                                "OK"},
    {0, 0}
  },
};

Very easy to understand, don’t you think? Basically you have the AT command and the expected result.

But it had a drawback, you had a structure with internal parameters fields (i.e. timeout) and AT commands strings.

Now the new script is basically a sequence of string lines, or basically a single string:

static FAR const char connect_script[] =
  "ECHO ON "
  "TIMEOUT 30 "
  "\"\" ATE1 "
  "OK AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" "
  "OK ATD*99***1# "
  "CONNECT \\c";

static FAR const char disconnect_script[] =
  "\"\" ATZ "
  "OK \\c";

Unfortunately this is not that simple: we have internal commands: “ECHO”, “TIMEOUT”, etc and AT string commands. And internal commands don’t expect a return string as AT commands do.

So, what should be the expected result string of ATE1 command? If you think it is an empty string “”, using the original script logic, you are wrong. The expect result is in the below line “OK AT+CGDCONT=1…”, yes “ATE1” expects an “OK” that is in the below line.

Same way “ATD*99***1#” doesn’t expect an “OK”, but a “CONNECT” that is in the next line.

It is a little bit complex, it should exist a documentation explaining how it works. At least this post make a brief introduction to this subject.