PPP: RST 38 Run Time Error

Hi there,

I’m trying to run the Modem_Test.c that shipped with DC10.21 on an RCM4000, in order to create a GPRS connection. When it gets the following bold portion of code, it runs one or two loops and then crashes with this error:

Run Time Error: An RST 38 occurred, but the RST 38 vector is uninitialized.
file: SERLINK.LIB
line: 2777

Code:
ifconfig(IF_PPP3,
IFS_PPP_SPEED, DIALUP_SPEED,
IFS_PPP_FLOWCONTROL, DIALUP_FLOWCONTROL,
IFS_PPP_SENDEXPECT, DIALUP_SENDEXPECT,
IFS_PPP_HANGUP, “ATH #ok”,
IFS_PPP_MODEMESCAPE, 1,
IFS_PPP_ACCEPTIP, 1,
IFS_PPP_ACCEPTDNS, 1,
IFS_PPP_REMOTEAUTH, DIALUP_NAME, DIALUP_PASSWORD,
IFS_UP,
IFS_END);

while(ifpending(IF_PPP3) & 1)
tcp_tick(NULL);

Other details:
-Using Port D
-No flow control
-19200 Baud

Any idea what’s causing the problem?

Thanks a stack,
Checco

Hi there,

I found the problem, just in case anyone has a similar issue, here’s what it was.

Release notes of later versions of DC (mine was 10.21) mention this:
“Defect #25307 fixed. A PPP crash due to a possible stack
imbalance in SERLINK.LIB’s common ISR has been eliminated.”

Downloading the latest version of DC (10.46), the problem disappeared and I’m now connected via GPRS.

One more hint, if connecting via a modem, don’t forget to set the APN using the command AT+CGDCONT. My DIALUP_SENDEXPECT line, connecting in Italy, looks as follows.

#define DIALUP_SENDEXPECT “ATZ #ok AT+CGDCONT=1,"IP","ibox.tim.it"\r #ok @ATDT” DIALUP_NUMBER " #CONNECT"

Just replace the ibox.tim.it with your provider’s APN.

Ciao!

I have been fighting trying to get this to work on one of our GPRS modems. I have the APN’s set. What are you using for the dial number? We can use *99# or *98#. I can’t seem to get past the PPP PAP authentication. Our carrier says they do not require it and just ignore it.

Here is log:

MIB tree: used 1632 out of 8192 bytes
SERLINK: tx buf = 00116800 (0108:E800), rx buf = 00116900 (0108:E900)
SERLINK: baud rate 115200: setting divisor to 13
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 115200: setting divisor to 13
SERLINK: Opened PPP serial on iface 0 at 115200 baud
CHAT: sending ‘AT’
SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
CHAT: expecting ‘ok’
SERLINK: sendpacket totlen=4 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
SERLINK: got raw packet len=1, chatting=login
SERLINK: got raw packet len=4, chatting=login
SERLINK: got raw packet len=4, chatting=login
CHAT: found it!
CHAT: sending ‘AT+CGDCONT=1,“IP”,“gprs02.motient.net”’
CHAT: expecting ‘ok’
SERLINK: sendpacket totlen=40 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
SERLINK: got raw packet len=1, chatting=login
SERLINK: got raw packet len=40, chatting=login
SERLINK: got raw packet len=4, chatting=login
CHAT: found it!
CHAT: sending ‘AT+CGDATA=1’
CHAT: expecting ‘CONNECT’
SERLINK: sendpacket totlen=13 i/f 0
SERLINK: sendpacket using 0000B10C
SERLINK: transmitter was idle
SERLINK: got raw packet len=1, chatting=login
SERLINK: got raw packet len=13, chatting=login
SERLINK: got raw packet len=16, chatting=login
CHAT: found it!
CHAT: not sending anything
CHAT: expecting ‘~’
SERLINK: got raw packet len=48, chatting=login
CHAT: found it!
CHAT: end of script
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: got packet B1BD on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x04 id=2 len=10 i/f 0
PPP: LCP reject on i/f 0
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=18 i/f 0
SERLINK: sendpacket using 0000B182
SERLINK: transmitter was idle
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=18 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=18 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=18 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=18 i/f 0
SERLINK: sendpacket using 0000B1BD
SERLINK: transmitter was idle
PPP: LCP too many retries i/f 0
PPP failed
IP address is 0.0.0.0
sock_init_or_exit: interface failed to start