Skip to content

Instantly share code, notes, and snippets.

@acassis
Created January 30, 2018 19:11
Show Gist options
  • Save acassis/4fc3a67b3ba00b30121e654d0f9bbaf7 to your computer and use it in GitHub Desktop.
Save acassis/4fc3a67b3ba00b30121e654d0f9bbaf7 to your computer and use it in GitHub Desktop.
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: "" 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: 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_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)
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: ECHO ON TIMEOUT 30 "" ATE1 OK AT+CGDCONT=1,\"IP\",\"internet\" OK 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: OK (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) OK
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: result 0
chat_flush: starting
chat_readb: read '
' (0x0A)
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_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: OK ATD*99***1#
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_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 13 out of 13 bytes of 'ATD*99***1#
'
chat_line_run: type 1, rhs
chat: 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 24
0x01 0x01 0x00 0x14 0x02 0x06 0x00 0x00 0x00 0x00 0x05 0x06 0xed 0xb6 0x5b 0x05
0x07 0x02 0x08 0x02
LCP Packet - ipcp init
received [LCP Config Request id 1
<asyncmap sum=0x0000><magic > <pcomp> <accomp>
Send ACK!
Writing ACK frame
AHDLC_TX - transmit frame, protocol 0xc021, length 20 offline 1
0x02 0x01 0x00 0x14 0x02 0x06 0x00 0x00 0x00 0x00 0x05 0x06 0xed 0xb6 0x5b 0x05 0x07 0x02 0x08 0x02
- end ACK 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
**Sending IPCP Request packet
AHDLC_TX - transmit frame, protocol 0x8021, length 10 offline 0
0x01 0x00 0x00 0x0a 0x03 0x06 0x00 0x00 0x00 0x00
Receiving packet with good crc value, len 14
0x01 0x01 0x00 0x0a 0x03 0x06 0x64 0x4d 0xf7 0xe8
IPCP Packet - IPCP len 10
check lcplist
IPCP options are good
Peer IP
Send IPCP ACK!
SET- stuff -- are we up? c=10 dif=2
Writing ACK frame
AHDLC_TX - transmit frame, protocol 0x8021, length 10 offline 1
0x02 0x01 0x00 0x0a 0x03 0x06 0x64 0x4d 0xf7 0xe8
- End ACK Write frame
Receiving packet with good crc value, len 14
0x03 0x00 0x00 0x0a 0x03 0x06 0x64 0x4d 0xf7 0xe8
IPCP Packet - IPCP len 10
CONF NAK
**Sending IPCP Request packet
AHDLC_TX - transmit frame, protocol 0x8021, length 10 offline 0
0x01 0x01 0x00 0x0a 0x03 0x06 0x64 0x4d 0xf7 0xe8
Receiving packet with good crc value, len 14
0x02 0x01 0x00 0x0a 0x03 0x06 0x64 0x4d 0xf7 0xe8
IPCP Packet - IPCP len 10
CONF ACK
were up!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment