PPP won't connect

Hi all, I have submitted a support for this but also wanted to post it here in case someone has seen something similar. The issue I have is with making a PPP connection. It fails to connect and eventually times out.

Below is the debug output. I have only included the bit where it sends the username and password as part of the PAP authentication.

FF 03 C0 23 01 00 00 11 06 78 6C 67 70 72 73 05 # xlgprs
70 72 6F 78 6C proxl
SERLINK: transmitter was idle
SERLINK: receive processed 1 chars
SERLINK: receive processed 38 chars
PPP: got packet 8408 on i/f:16 protocol:0x0
PPP: got PAP packet code=0x02 id=0 len=13 i/f 0
PPP: got packet 7DB4 on i/f:16 protocol:0x0
PPP: got IPCP packet code=0x01 id=1 len=10 i/f 0
PPP: IPCP config request i/f 0
IPCP: peer wants IP addr C0A8CA00
PPP: accepting option 3
PPP: sending IPCP ack i/f 0
SERLINK: sendpacket totlen=14 i/f 0
SERLINK: sendpacket using 00008408
— pkt flags=x40 i/f=0 tstamp=50272 len=14 —
sect 1, len=14 addr=x0010842F rlen=1559
FF 03 80 21 02 01 00 0A 03 06 C0 A8 CA 00 !
SERLINK: transmitter was idle
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
SERLINK: sendpacket using 00007DB4
— pkt flags=x40 i/f=0 tstamp=50274 len=26 —
sect 1, len=26 addr=x00107DDB rlen=1547
FF 03 80 21 01 01 00 16 03 06 00 00 00 00 81 06 !
00 00 00 00 83 06 00 00 00 00


IPCP: peer wants IP addr C0A8CA00

The line above is the interesting one. This indicates that the peer is giving me this IP address but somehow I am not convinced this is coming from the peer as I got my client in the UK to try the same and he reports the same IP address. This I know is got to be wrong.

Anyone else having issues with PPP connecting?

I am using DynC 10.56 with an RCM5450W and a Telit GM862 GPRS module.

Thanks
Dave…

OK. it turns out the issue was that the modem was not actually GPRS attached to the network. Seems strange that the network still allows the GPRS connection and PAP authentication but then fails to get an IP address.

Only after writing some debug code to I find out this with the AT+CGATT command!!

Allo i am really trying to connect to my internet service provider ISP

using PPP but with no success up to now. Can someone help me solve this

did anybody do this i nned some examples. I tried the examples from

samples folder with no success. Thanks in advance Alain

v8dave,
I have been working on interfacing the 5600 with the telit 862 and have had no luck with gprs.
I was wondering if it would be possible to get a copy of your init strings to set up the modem and also for the gprs connection.

regards
Craig

Hi Craig,

What sort of problems are you having?

I use the following SEND_EXPECT to init the modem with the GPRS context and then perform a dial. You can test with the PPP sample called MODEM_TEST.C but for now I am having a problem with the Rabbit PPP libraries in that I am getting buffer errors on subsequent dial outs.

It would be interesting to see if you get the same issue with your 5600 board. I am using the RCM5450W but currently with the WiFi disabled.

#define DIALUP_SENDEXPECT “ATZ #ok @AT+CGDCONT=1,"IP","www.xlgprs.net","0.0.0.0"\r #OK @ATD99**1# CONNECT”
#define DIALUP_NAME “xlgprs”
#define DIALUP_PASSWORD “proxl”

One thing I have discovered with GPRS on the Telit is that you need to confirm that the modem is attached to the GPRS otherwise the dialup will fail. It should be defaulted to auto attach but I have seen it remain unattached even when the AT#SERVINFO command shows that there is a GPRS available. You can use AT+CGATT=1 to force it to attach. AT+CGREG? will show if it is registered on the cell for GPRS. You will need to write your own handler to do the AT commands of use the serial library. Make sure you close the COM port after you do this or PPP will fail.

Let me know how you get on?

Dave…

Dave,
Thanks for the heads up.
I am using DC10.56, RCM5700 on the proto board with serial cable to a telit 862.

If I run the attached file it gets to “expecting ‘CONNECT’”, then times out.
If i attach the 862 to my laptop, i can see the ‘CONNECT’ string.

I think it may be an issue with the LIB file?

Regards
Craig

Hi Craig,

Looking at your code, I think you are not sending out to PORT D. You have it configured for PORT C.

#define MY_PPP_SERIAL_PORT 4 // our default is serial port D

This needs to be 8 for serial port D.

// select the CTS and RTS bits and ports
// our defaults are PC1 (standard RXD) and PC0 (standard TXD), respectively
#define MY_CTS_BIT 1
#define MY_CTS_PORT PCDR
#define MY_RTS_BIT 0
#define MY_RTS_PORT PCDR

I am not sure what the above means. It does not look correct. Which IO pins have you used to configure your serial port D to. I assume you used the IOCONFIG.EXE application to configure your IO. Can you post the .LIB file that was generated from IOCONFIG.EXE

I also assume you have an addtional RS232 convertor to drive the modem? Is this a modem with RS232 or is it the OEM unit that takes 2.8V logic input?

Can you also post your debug output but I have a feeling it is the above that is wrong?

Dave…

OK, I spotted the correct one for Serial Port D.

#define USE_PPP_SERIAL 0x08 // set up the selected PPP serial port D

Which pins are you using for TXD and RXD on the demo board?

Does the first option dial? I can’t see any dial command in your SEND_EXPECT

ATD99**1#

Another thing. You can not use the call to AT+CGDATA=“PPP” because I think this is only used when you want to use the internal TCP/IP stack.

Use ATD99**1# to do the dial and look for a CONNECT.

Can you send me the debug output you are seeing?

Dave,
The ports are set correct. Later down the code D was selected.
I wasn’t using handshaking.
I have been using an m35i modem and have swapped it for the telit one.

The telit is on a pre made pcb with rs232 and power supply. I am using the 5600 with serial proto board and a rabbit serial cable to the telit.

I have attached the telit to my laptop and using the same strings have connected to the internet.

It seems as if the PPP.lib is not finding the CONNECT string from the modem.

I have attached the current file.

Is there a way to monitor the serial port?

— stdio –
sock init
ifconfig
CHAT: sending ‘ATZ’
sock init
ifconfig
CHAT: sending ‘ATZ’
CHAT: expecting ‘ok’
CHAT: found it!
CHAT: sending ‘AT+CGATT=1’
CHAT: expecting ‘ok’
CHAT: found it!
CHAT: sending ‘AT+CGDCONT=1,“IP”,“telstra.internet”,“0.0.0.0”,0,0’
CHAT: expecting ‘OK’
CHAT: found it!
CHAT: sending ‘ATD99**1#’
CHAT: expecting ‘CONNECT’
CHAT: timed out
CHAT: sending ‘ATH’
CHAT: end of script
CHAT: end of script
IP address is 0.0.0.0
to:85
from:99
subject:ad
message:C2
SMTP: Resolving mail.atkin.id.au
SMTP: Error resolving server (fffc).
Failed to send message
— end —

Thanks for the help.

Kind regards
Craig

I see you have debug output on but there does not seem to be very much. I was expecting something like my output at the top!!

Best to enable all the debug options.

Dave,
the debug would have more if it managed to see a connect response.
Tomorrow I’ll wire up a debug port and monitor the comms.

Thanks heaps.

You should see something like this regardless of the fail to see CONNECT.

SERLINK: tx buf = 00012B00 (0004:EB00), rx buf = 00012C00 (0004:EC00)
SERLINK: baud rate 57600: setting divisor to 39
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 57600: setting divisor to 39
SERLINK: Opened PPP serial on iface 0 at 57600 baud
CHAT: sending ‘ATZ’
SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 00007DB4
— pkt flags=x40 i/f=0 tstamp=16563 len=1 —
sect 1, len=1 addr=x00107DDB rlen=1572
2B +
SERLINK: transmitter was idle
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 00007DB4
— pkt flags=x40 i/f=0 tstamp=16563 len=1 —
sect 1, len=1 addr=x00107DDB rlen=1572
2B +
SERLINK: transmitter was idle
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket using 00007DB4
— pkt flags=x40 i/f=0 tstamp=16563 len=1 —
sect 1, len=1 addr=x00107DDB rlen=1572
2B +
SERLINK: transmitter was idle
CHAT: expecting ‘ok’
SERLINK: sendpacket totlen=5 i/f 0
SERLINK: sendpacket using 00007DB4
— pkt flags=x40 i/f=0 tstamp=16563 len=5 —
sect 1, len=5 addr=x00107DDB rlen=1568
41 54 5A 0D 0A ATZ
SERLINK: transmitter was idle
SERLINK: receive processed 1 chars
SERLINK: got raw packet len=1, chatting=login
SERLINK: receive processed 10 chars
SERLINK: got raw packet len=4, chatting=login
SERLINK: got raw packet len=2, chatting=login
SERLINK: got raw packet len=4, chatting=login
CHAT: found it!
CHAT: sending ‘AT+CGDCONT=1,“IP”,“internet”,“0.0.0.0”,0,0’
CHAT: expecting ‘OK’
SERLINK: sendpacket totlen=44 i/f 0
SERLINK: sendpacket using 00008A5C
— pkt flags=x40 i/f=0 tstamp=30694 len=44 —
sect 1, len=44 addr=x00108A83 rlen=1529
41 54 2B 43 47 44 43 4F 4E 54 3D 31 2C 22 49 50 AT+CGDCONT=1,"IP
22 2C 22 69 6E 74 65 72 6E 65 74 22 2C 22 30 2E ",“internet”,“0.
30 2E 30 2E 30 22 2C 30 2C 30 0D 0A 0.0.0”,0,0
SERLINK: transmitter was idle
SERLINK: receive processed 1 chars
SERLINK: got raw packet len=1, chatting=login
SERLINK: receive processed 42 chars
SERLINK: got raw packet len=42, chatting=login
SERLINK: receive processed 6 chars
SERLINK: got raw packet len=2, chatting=login
SERLINK: got raw packet len=4, chatting=login
CHAT: found it!
CHAT: sending 'ATD99#’
CHAT: expecting ‘CONNECT’
SERLINK: sendpacket totlen=9 i/f 0
SERLINK: sendpacket using 00008408
— pkt flags=x40 i/f=0 tstamp=24741 len=9 —
sect 1, len=9 addr=x0010842F rlen=1564
41 54 44 2A 39 39 23 0D 0A ATD
99#
SERLINK: transmitter was idle
SERLINK: receive processed 1 chars
SERLINK: got raw packet len=1, chatting=login
SERLINK: receive processed 19 chars
SERLINK: got raw packet len=8, chatting=login
SERLINK: got raw packet len=2, chatting=login
SERLINK: got raw packet len=9, chatting=login
CHAT: found it!

Dave,
I added the following two lines to the code.
#define PPPLINK_VERBOSE
#define PPPLINK_DEBUG

When I compile i now get the following two errors.
The SERLINK.LIB is under RABBIT4000\TCPIP\

I’ll try an other version of DC soon.

Regards
Craig

— COMPILER WARNING —
line 2482 : WARNING SERLINK.LIB : Wrong type for parameter 2.
line 2482 : WARNING SERLINK.LIB : Conversion to incompatible pointer type
— END —

— STDIO –
sock init
SERLINK: tx buf = 00118900 (010A:E900), rx buf = 00118A00 (010A:EA00)
ifconfig
SERLINK: baud rate 19200: setting divisor to 80
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 19200: setting divisor to 80
SERLINK: Opened PPP serial on iface 0 at 19200 baud
CHAT: sending ‘ATZ’
SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket totlen=1 i/f 0
CHAT: expecting ‘ok’
SERLINK: sendpacket totlen=5 i/f 0
CHAT: found it!
CHAT: sending ‘AT+CGATT=1’
CHAT: expecting ‘ok’
SERLINK: sendpacket totlen=12 i/f 0
CHAT: found it!
CHAT: sending ‘AT+CGDCONT=1,“IP”,“telstra.internet”,“0.0.0.0”,0,0’
CHAT: expecting ‘OK’
SERLINK: sendpacket totlen=52 i/f 0
CHAT: found it!
CHAT: sending ‘ATD99**1#’
CHAT: expecting ‘CONNECT’
SERLINK: sendpacket totlen=13 i/f 0
CHAT: timed out
CHAT: sending ‘ATH’
SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket totlen=1 i/f 0
CHAT: end of script
SERLINK: sendpacket totlen=5 i/f 0
CHAT: end of script
SERLINK: Closed PPP serial on iface 0
IP address is 0.0.0.0
to:1426
from:143a
subject:144e
message:1463
SMTP: Resolving mail.atkin.id.au
SMTP: Error resolving server (fffc).
Failed to send message
— END —

Dave and all…

I have fixed the issue with the Telit modem not connecting.
I needed to turn off handshaking (AT&K=0).

With regards to the compiler error, ive gone back a few versions for the time being.

Thanks for all of your help dave.

Dave, if you read this, would you know if you can receive GPS strings whilst you have a gprs connection on the 862-g modems?

Kind regards
Craig

Hi Craig,

Glad to hear you go it working.

You can’t use the AT commands to receive GPRS unless you are using th MUX protocol and if using the standard Rabbit drivers then this will certainly not be.

You can however receive the GPS from the GPS port on the GM862. You need 2 ports, one for the GPRS and one for GPS. This is how I have it working here.

Regards
Dave…

Hi again Craig,

I would be interested to know if your code can do a dial up, disconnect and reconnect without any buffer errors?

I can’t get 10.56 to connect more than once, even with just running a simple test. Maybe the issue is with the RCM5450W that I am using.

If it does fail, I would appreciate if you could post the issue on the Rabbit support website.

Cheers,
Dave…
PS… I have attached the test programme I used. It is setup for Port C but you should be able to convert to Port D.
Would be interested to know if this works for you. I just tried on an older RCM4400W and it also fails with the same issue.

SERLINK: baud rate 57600: setting divisor to 31
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 57600: setting divisor to 31
SERLINK: Opened PPP serial on iface 0 at 57600 baud
CHAT: sending ‘ATZ’
SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket no buffer avail
txpkt=000000 txxpkt=000000 rxxpkt=000000
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket no buffer avail
txpkt=000000 txxpkt=000000 rxxpkt=000000

I see you have debug output on but there does not seem to be very much. I was expecting something like my output at the top!!


WoW gold|Diablo 3 Gold|kaufen Guild Wars 2 gold