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.
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.
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!!
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.
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.
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.
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,
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 —
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 —
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.
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