Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi





Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Rabbit-Semi | DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - "sla...@ymail.com" - Sep 7 8:59:30 2009

Platform: RCM5700 + Siemens MC35 modem + DC10.5

I have an app (does lots of things) with GSM SMS text messaging in and out. All working well.

I ran up a parallel test applet that establishes a PPP/GPRS connection using ifconfig() - send email messages, and shutdown, and it works well... standalone. But it leaves the modem in GPRS data mode (double-blink to Siemens users!) after closing the PPP connection.

I want to marry the two parts together.
SMS in and out, PLUS the ability to connect to PPP over GPRS when required (to send email).

SMS text messages are the mainstay of the platform, but occasionally, the system needs to send an email out. I have no problem sending email over PPP/GPRS, but want to know how to return to the 'normal' mode of the modem after closing the PPP connection.

Example -
Boot up
idle
SMS in
(idle / actions)
SMS out
-- Connect to GPRS --
Send Email
***Detach from GPRS***
(idle / actions)
SMS in etc
(idle / actions)
-- Connect to GPRS --
Send Email
***Detach from GPRS***
SMS in etc
(idle / actions)
SMS out
etc... forever

Connection --- can do with ifconfig() maybe not properly - but it works! suggestions welcome

But I can't figure how to *** Detach *** from the GPRS session and revert to modem command mode.

I've tried a few things, but I'm not getting through. ifconfig() has control of serial port D... from when it establishes the PPP/GPRS connection.

Cheers
MC

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - Dave McLaughlin - Sep 7 9:23:24 2009

Good day,

I hope you have more success than me at this. I can't get DynC 10.56 do dial
up more than once. The second attempt fails with a buffer error.

If you use ifconfig with the following it will disconnect the GPRS
connection and return the modem to normal mode.

ifconfig(IF_DEFAULT, IFS_DOWN, IFS_END);

Make sure you previously set the following in ifconfig when opening the
connection otherwise the connection remains active.

IFS_PPP_HANGUP, "ATH #ok",

IFS_PPP_MODEMESCAPE, 1,

If might be a good idea to enable debug so you can see what is happening. It
can aid in seeing if the library has working or is stuck in a loop. I found
that it was stuck in a sending loop with a buffer failure and without debug
I could not see this.

#define PPP_VERBOSE

#define PPP_DEBUG

#define PPPLINK_VERBOSE

#define PPPLINK_DEBUG

#define CHAT_VERBOSE

#define CHAT_DEBUG

Regards

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of s...@ymail.com
Sent: 07 September 2009 18:24
To: r...@yahoogroups.com
Subject: {Disarmed} [rabbit-semi] DC 10.5 / RCM5700 - Attach & Detach from
PPP over GPRS session

Platform: RCM5700 + Siemens MC35 modem + DC10.5

I have an app (does lots of things) with GSM SMS text messaging in and out.
All working well.

I ran up a parallel test applet that establishes a PPP/GPRS connection using
ifconfig() - send email messages, and shutdown, and it works well...
standalone. But it leaves the modem in GPRS data mode (double-blink to
Siemens users!) after closing the PPP connection.

I want to marry the two parts together.
SMS in and out, PLUS the ability to connect to PPP over GPRS when required
(to send email).

SMS text messages are the mainstay of the platform, but occasionally, the
system needs to send an email out. I have no problem sending email over
PPP/GPRS, but want to know how to return to the 'normal' mode of the modem
after closing the PPP connection.

Example -
Boot up
idle
SMS in
(idle / actions)
SMS out
-- Connect to GPRS --
Send Email
***Detach from GPRS***
(idle / actions)
SMS in etc
(idle / actions)
-- Connect to GPRS --
Send Email
***Detach from GPRS***
SMS in etc
(idle / actions)
SMS out
etc... forever

Connection --- can do with ifconfig() maybe not properly - but it works!
suggestions welcome

But I can't figure how to *** Detach *** from the GPRS session and revert to
modem command mode.

I've tried a few things, but I'm not getting through. ifconfig() has control
of serial port D... from when it establishes the PPP/GPRS connection.

Cheers
MC

_
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - "Michael Coop (SL4P)" - Sep 7 20:29:39 2009

Dave - thanks

For what it's worth, while I was testing, I used this code, and could call
it repeatedly to establish a connection, send mail, and drop the connection
- the only catch is that it leaves the modem in 'data' mode.

(BTW - I think you may be talking to a colleague of mine - CRAIG)

#define SENDEXPECTSTRING "@ATZ #ok
@AT+CGDCONT=1,\"IP\",\"telstra.internet\",\"0.0.0.0\",0,0 #ok
@AT+CGDATA=\"PPP\",1 #CONNECT"

For (;;) {

if (ifstatus(IF_PPP3)==0) {

printf("Bring connection UP\n");

ifconfig(IF_PPP3,

IFS_PPP_INIT,

IFS_PPP_SPEED, 19200L,

IFS_PPP_FLOWCONTROL, 0,

IFS_PPP_SENDEXPECT, SENDEXPECTSTRING,

IFS_PPP_HANGUP, "ATH",

IFS_PPP_MODEMESCAPE, 1,

IFS_PPP_ACCEPTIP, 1,

IFS_PPP_ACCEPTDNS, 1,

IFS_PPP_REMOTEAUTH, "","",

IFS_UP,

IFS_END);

while(ifpending(IF_PPP3) % 2) {

tcp_tick(NULL);

}

// GET the new IP address

ifconfig(IF_PPP3, IFG_IPADDR, &t, IFS_END);

printf("IP address is %s\n", inet_ntoa( buffer, t));

}

// I don't think this helped at all

printf("ACTIVATE CONTEXT\n");

serDputs("AT+CGACT=1\n");

done_time = MS_TIMER + 500;

while(MS_TIMER < done_time );

sprintf(buffer, "Rabbit test message #%d\rSent via PPP over GPRS!",
count);

smtp_sendmail(mail_to, mail_from, mail_subject, buffer);

while(smtp_mailtick()==SMTP_PENDING) {

tcp_tick(NULL); // process non-udp stuff

continue;

}

switch (smtp_status()) {

case SMTP_SUCCESS:

printf("---- Email sent\n");

break;

case SMTP_TIME:

printf("---- TIMEOUT\n");

break;

case SMTP_UNEXPECTED:

printf("---- UNEXPECTED ERROR\n");

break;

{

// I don't think this helped at all

serDputs("AT+CGACT=0\n");

done_time = MS_TIMER + 1000;

while(MS_TIMER < done_time );

} loop

// and finally.

// I hoped this would have sent the +++ ATH sequence as part of the shutdown

ifconfig(IF_PPP3, IFS_DOWN, IFS_END);

//wait while PPP terminates

while(ifpending(IF_PPP3) & 1)

tcp_tick(NULL);

Many thanks,

MC

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Dave McLaughlin
Sent: Monday, 7 September 2009 23:17
To: r...@yahoogroups.com
Subject: RE: [rabbit-semi] DC 10.5 / RCM5700 - Attach & Detach from PPP over
GPRS session

Good day,

I hope you have more success than me at this. I can't get DynC 10.56 do dial
up more than once. The second attempt fails with a buffer error.

If you use ifconfig with the following it will disconnect the GPRS
connection and return the modem to normal mode.

ifconfig(IF_DEFAULT, IFS_DOWN, IFS_END);

Make sure you previously set the following in ifconfig when opening the
connection otherwise the connection remains active.

IFS_PPP_HANGUP, "ATH #ok",

IFS_PPP_MODEMESCAPE, 1,

If might be a good idea to enable debug so you can see what is happening. It
can aid in seeing if the library has working or is stuck in a loop. I found
that it was stuck in a sending loop with a buffer failure and without debug
I could not see this.

#define PPP_VERBOSE

#define PPP_DEBUG

#define PPPLINK_VERBOSE

#define PPPLINK_DEBUG

#define CHAT_VERBOSE

#define CHAT_DEBUG

Regards

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of s...@ymail.com
Sent: 07 September 2009 18:24
To: r...@yahoogroups.com
Subject: {Disarmed} [rabbit-semi] DC 10.5 / RCM5700 - Attach & Detach from
PPP over GPRS session

Platform: RCM5700 + Siemens MC35 modem + DC10.5

I have an app (does lots of things) with GSM SMS text messaging in and out.
All working well.

I ran up a parallel test applet that establishes a PPP/GPRS connection using
ifconfig() - send email messages, and shutdown, and it works well...
standalone. But it leaves the modem in GPRS data mode (double-blink to
Siemens users!) after closing the PPP connection.

I want to marry the two parts together.
SMS in and out, PLUS the ability to connect to PPP over GPRS when required
(to send email).

SMS text messages are the mainstay of the platform, but occasionally, the
system needs to send an email out. I have no problem sending email over
PPP/GPRS, but want to know how to return to the 'normal' mode of the modem
after closing the PPP connection.

Example -
Boot up
idle
SMS in
(idle / actions)
SMS out
-- Connect to GPRS --
Send Email
***Detach from GPRS***
(idle / actions)
SMS in etc
(idle / actions)
-- Connect to GPRS --
Send Email
***Detach from GPRS***
SMS in etc
(idle / actions)
SMS out
etc... forever

Connection --- can do with ifconfig() maybe not properly - but it works!
suggestions welcome

But I can't figure how to *** Detach *** from the GPRS session and revert to
modem command mode.

I've tried a few things, but I'm not getting through. ifconfig() has control
of serial port D... from when it establishes the PPP/GPRS connection.

Cheers
MC

_


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - Dave McLaughlin - Sep 8 2:04:07 2009

Hi Michael,

I have been doing some testing this morning and I downloaded and installed
DynC 10.07 along with the PPP 2.03 library.

I installed an RCM4000 in the dev board and compiled and ran the code. It
dials up, connects and disconnects as expected. It then repeats this 2 more
times without the error I am receiving with the RCM5450W.

I then compared the code base and found that PPP.LIB is pretty much the same
except for a change to FAR for the xmem variables.

The SERLINK.LIB and PKRDRV.LIB are a different matter. There is quite a lot
of changes to these 2 files and I suspect this is where the fault lies.

Looking at your code, have you tried enabling the debug output and seeing if
the +++ and ATH are being sent to the modem at the point where it
disconnects.

Can you loop around your code and call the it without restarting the
software? Does it still keep working?

If I restart the software each time it works. It just fails when I call the
code to dial again by looping around. Can you run the MODEM_TEST.C programme
in the PPP samples directory? Does this work for your board?

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Michael Coop (SL4P)
Sent: 08 September 2009 06:21
To: r...@yahoogroups.com
Subject: {Disarmed} RE: [rabbit-semi] DC 10.5 / RCM5700 - Attach & Detach
from PPP over GPRS session

Dave - thanks

For what it's worth, while I was testing, I used this code, and could call
it repeatedly to establish a connection, send mail, and drop the connection
- the only catch is that it leaves the modem in 'data' mode.

(BTW - I think you may be talking to a colleague of mine - CRAIG)

#define SENDEXPECTSTRING "@ATZ #ok
@AT+CGDCONT=1,\"IP\",\"telstra.internet\",\"0.0.0.0\",0,0 #ok
@AT+CGDATA=\"PPP\",1 #CONNECT"

For (;;) {

if (ifstatus(IF_PPP3)==0) {

printf("Bring connection UP\n");

ifconfig(IF_PPP3,

IFS_PPP_INIT,

IFS_PPP_SPEED, 19200L,

IFS_PPP_FLOWCONTROL, 0,

IFS_PPP_SENDEXPECT, SENDEXPECTSTRING,

IFS_PPP_HANGUP, "ATH",

IFS_PPP_MODEMESCAPE, 1,

IFS_PPP_ACCEPTIP, 1,

IFS_PPP_ACCEPTDNS, 1,

IFS_PPP_REMOTEAUTH, "","",

IFS_UP,

IFS_END);

while(ifpending(IF_PPP3) % 2) {

tcp_tick(NULL);

}

// GET the new IP address

ifconfig(IF_PPP3, IFG_IPADDR, &t, IFS_END);

printf("IP address is %s\n", inet_ntoa( buffer, t));

}

// I don't think this helped at all

printf("ACTIVATE CONTEXT\n");

serDputs("AT+CGACT=1\n");

done_time = MS_TIMER + 500;

while(MS_TIMER < done_time );

sprintf(buffer, "Rabbit test message #%d\rSent via PPP over GPRS!",
count);

smtp_sendmail(mail_to, mail_from, mail_subject, buffer);

while(smtp_mailtick()==SMTP_PENDING) {

tcp_tick(NULL); // process non-udp stuff

continue;

}

switch (smtp_status()) {

case SMTP_SUCCESS:

printf("---- Email sent\n");

break;

case SMTP_TIME:

printf("---- TIMEOUT\n");

break;

case SMTP_UNEXPECTED:

printf("---- UNEXPECTED ERROR\n");

break;

{

// I don't think this helped at all

serDputs("AT+CGACT=0\n");

done_time = MS_TIMER + 1000;

while(MS_TIMER < done_time );

} loop

// and finally.

// I hoped this would have sent the +++ ATH sequence as part of the shutdown

ifconfig(IF_PPP3, IFS_DOWN, IFS_END);

//wait while PPP terminates

while(ifpending(IF_PPP3) & 1)

tcp_tick(NULL);

Many thanks,

MC


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - "Michael Coop (SL4P)" - Sep 9 12:11:32 2009

Dave -

Here's the code from PPP\MODEM_TEST.C (tuned to use PORT D and my GPRS
carrier details)

Followed by the debug output (all turned on !)

#define DIALUP_FLOWCONTROL 0 // 0 to disable, 1 to enable CTS/RTS flow
control

#define EMAIL_FROM "r...@SL4P.net"

#define EMAIL_TO "x...@bigpond.com"

#define SMTP_SERVER "61.9.189.249" // PPP is not providing DNS - so use
dotted IP

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

#define TCPCONFIG 0 // No predefined config for this
sample

#define PPP_VERBOSE

#define PPP_DEBUG

#define PPPLINK_VERBOSE

#define PPPLINK_DEBUG

#define SMTP_VERBOSE

#define SMTP_DEBUG 1

#define CHAT_VERBOSE // See what's going on.

#define CHAT_DEBUG

#define DIALUP_SENDEXPECT "@ATZ #ok
@AT+CGDCONT=1,\"IP\",\"telstra.internet\",\"0.0.0.0\",0,0 #ok
@AT+CGDATA=\"PPP\",1 #CONNECT"

#define USE_PPP_SERIAL 0x08 // PORT D

#memmap xmem

#use "dcrtcp.lib"

#use "smtp.lib"

#define TIMEZONE 10

#define LCP_TIMEOUT 5000

const char mail_to[] = EMAIL_TO;

const char mail_from[] = EMAIL_FROM;

const char mail_subject[] = "Mail from Rabbit";

const char mail_body[] = "This is a test message sent by a Rabbit through an
ISP.";

//--------------------------------------------------------------------------
----

int main()

{

auto unsigned long t;

auto char buffer[100];

auto int mail_status;

auto int count;

sock_init(); //initialize TCP/IP

//test repeated open/close of modem link

for(count = 0; count < 3; count++)

{

//configure PPP for dialing in to ISP and bring it up

ifconfig(IF_DEFAULT,

IFS_PPP_SPEED, 19200L,

IFS_PPP_FLOWCONTROL, 0,

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, "", "",

IFS_UP,

IFS_END);

while(ifpending(IF_DEFAULT) & 1)

tcp_tick(NULL);

if(ifstatus(IF_DEFAULT))

printf("PPP established\n");

else

printf("PPP failed\n");

ifconfig(IF_DEFAULT, IFG_IPADDR, &t, IFS_END);

printf("IP address is %s\n", inet_ntoa( buffer, t));

smtp_sendmail(mail_to, mail_from, mail_subject, mail_body);

while (SMTP_PENDING == (mail_status = smtp_mailtick()));

if(mail_status == SMTP_SUCCESS)

printf("Message sent\n");

else

printf("Failed to send message\n");

ifconfig(IF_DEFAULT, IFS_DOWN, IFS_END);

//wait while PPP terminates

while(ifpending(IF_DEFAULT) & 1)

tcp_tick(NULL);

} //end of for loop

return 0;

}

Debug Output

// my comments and highlights

SERLINK: tx buf = 00118E00 (010A:EE00), rx buf = 00118F00 (010A:EF00)
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+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 'AT+CGDATA="PPP",1'
CHAT: expecting 'CONNECT'
SERLINK: sendpacket totlen=19 i/f 0
CHAT: found it!
CHAT: end of script
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: LCP NAK on i/f 0
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: received LCP ACK i/f 0. local_acked = 1
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: NAKing option 3
PPP: sending LCP nak i/f 0
SERLINK: sendpacket totlen=13 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: accepting option 3
PPP: sending LCP ack i/f 0
SERLINK: sendpacket totlen=28 i/f 0
PPP: sending our credentials /
PPP: sending PAP auth i/f 0
SERLINK: sendpacket totlen=10 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc023
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0x8021
PPP: IPCP config request i/f 0
IPCP: peer wants IP addr C0A8FEFE
PPP: accepting option 3
PPP: sending IPCP ack i/f 0
SERLINK: sendpacket totlen=14 i/f 0
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0x8021
PPP: IPCP NAK on i/f 0
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0x8021
PPP: i/f 0 UP
PPP established
IP address is 10.194.11.208
// -----------------------------

to:13f0
from:1402
subject:1412
message:1423
SMTP: Resolving 61.9.189.249
SMTP: Opening to 3D09BDF9:19
SERLINK: sendpacket totlen=45 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0x21
SERLINK: sendpacket totlen=41 i/f 0
SMTP: Connected
PPP: got packet B6FA on i/f:0 protocol:0x21
SMTP: Read: 220
****************************************************************

*************
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=61 i/f 0
SMTP: Wrote HELO 10.194.11.208
PPP: got packet B6FA on i/f:0 protocol:0x21
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 250 nschwotgx03p.mx.bigpond.com
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=71 i/f 0
SMTP: Wrote MAIL FROM:
PPP: got packet B6BF on i/f:0 protocol:0x21
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 250 Sender Ok
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=71 i/f 0
SMTP: Wrote RCPT TO:
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 250 Recipient Ok
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=47 i/f 0
SMTP: Wrote DATA
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 354 Ok Send data ending with .
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=100 i/f 0
SMTP: Wrote From:
To:
Subject: SMTP: Wrote subject line
SERLINK: sendpacket totlen=57 i/f 0
SMTP: Wrote

SMTP: Message finished (37 bytes)
SERLINK: sendpacket totlen=100 i/f 0
SMTP: Wrote
.
SERLINK: sendpacket totlen=46 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0x21
PPP: got packet B6BF on i/f:0 protocol:0x21
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 250 Message received:
20090908104810.CNGO1120.nschwotgx03p.mx.bigpon

d.com@[10.194.11.208]
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=47 i/f 0
SMTP: Wrote QUIT
SERLINK: sendpacket totlen=47 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0x21
SMTP: Read: 221 nschwotgx03p.mx.bigpond.com ESMTP server closing connection
SMTP: Connection Closing
SERLINK: sendpacket totlen=41 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0x21
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=41 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0x21
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=41 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0x21
SERLINK: sendpacket totlen=41 i/f 0
SERLINK: sendpacket totlen=41 i/f 0
SMTP: Connection Closed
Message sent
// -----------------------------

SERLINK: bringing down serial PPP interface 0
PPP: LCP terminating on i/f 0
PPP: sending LCP term i/f 0
SERLINK: sendpacket totlen=8 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0xc021
PPP: Got LCP term ACK, disconnecting
PPP: LCP terminated on i/f 0 (result=1)
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: expecting 'ok'
SERLINK: sendpacket totlen=5 i/f 0
CHAT: timed out
SERLINK: Closed PPP serial on iface 0
// -----------------------------

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+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 'AT+CGDATA="PPP",1'
CHAT: expecting 'CONNECT'
SERLINK: sendpacket totlen=19 i/f 0
CHAT: found it!
CHAT: end of script
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: received LCP ACK i/f 0. local_acked = 1
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: NAKing option 3
PPP: sending LCP nak i/f 0
SERLINK: sendpacket totlen=13 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: accepting option 3
PPP: sending LCP ack i/f 0
SERLINK: sendpacket totlen=28 i/f 0
PPP: sending our credentials /
PPP: sending PAP auth i/f 0
SERLINK: sendpacket totlen=10 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc023
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
PPP: got packet B6FA on i/f:0 protocol:0xc021
PPP: sending LCP term ack i/f 0
SERLINK: sendpacket totlen=8 i/f 0
PPP: link i/f 0 is down
PPP failed
IP address is 10.194.11.208
//-----------------------------

to:13f0
from:1402
subject:1412
message:1423
SMTP: Opening to 3D09BDF9:19
Error opening socket.
Failed to send message
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+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 'AT+CGDATA="PPP",1'
CHAT: expecting 'CONNECT'
SERLINK: sendpacket totlen=19 i/f 0
CHAT: found it!
CHAT: end of script
PPP: sending LCP config req i/f 0
SERLINK: sendpacket totlen=24 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0xc021
PPP: received LCP ACK i/f 0. local_acked = 1
PPP: got packet B6BF on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: NAKing option 3
PPP: sending LCP nak i/f 0
SERLINK: sendpacket totlen=13 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0xc021
PPP: LCP config request i/f 0
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 5
PPP: accepting option 3
PPP: sending LCP ack i/f 0
SERLINK: sendpacket totlen=28 i/f 0
PPP: sending our credentials /
PPP: sending PAP auth i/f 0
SERLINK: sendpacket totlen=10 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0xc023
PPP: sending IPCP config i/f 0
SERLINK: sendpacket totlen=26 i/f 0
PPP: got packet B6BF on i/f:0 protocol:0xc021
PPP: sending LCP term ack i/f 0
SERLINK: sendpacket totlen=8 i/f 0
PPP: link i/f 0 is down
PPP failed
IP address is 10.194.11.208
-----------------------------

to:13f0
from:1402
subject:1412
message:1423
SMTP: Opening to 3D09BDF9:19
Error opening socket.
Failed to send message
// program terminated 0



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} RE: {Disarmed} RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - Dave McLaughlin - Sep 9 13:29:08 2009

Hi Michael,

This is strange. I think I need to hook up this RCM5700 board to the modem
and see if it works. Will take a day or so as I have no RS232 driver board
so need to add this circuit and wire it up on the proto board that comes
with the dev kit.

I can't get it to work on either an RCM5450W, RCM4400W or the RCM4000 using
DynC 10.56 but it does work using DynC 10.07 on the RCM4000 using the same
dev board and modem.

Looking at the libraries, PPP.LIB is little changes except for the addition
of far type on some variables. The SERLINK.LIB and PKTDRV.LIB have quite a
lot of changes but I have no idea where to start looking for the issue.

I even dropped the baud rate to 19200 which is what you are using and same
no handshaking and still it fails on the second dialup.

All very frustrating and holding up development and I am losing what little
hair I have left.

It would be great if I can find someone with either of the boards I have
above and have them try out the same setup. I am sure Rabbit should be able
to replicate my setup as it is nothing more than the dev board.

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Michael Coop (SL4P)
Sent: 08 September 2009 18:02
To: r...@yahoogroups.com
Subject: {Disarmed} RE: {Disarmed} RE: [rabbit-semi] DC 10.5 / RCM5700 -
Attach & Detach from PPP over GPRS session

Dave -

Here's the code from PPP\MODEM_TEST.C (tuned to use PORT D and my GPRS
carrier details)

Followed by the debug output (all turned on !)
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - "Michael Coop (SL4P)" - Sep 9 20:05:20 2009

Dave -

I was looking through the debug listing toward the end - and noticed that
the ifconfig() code sent the ATH -before- the escape +++ sequence - or is
this just the way the debug strings were generated from the routines as they
were stacked. ?

PPP: Got LCP term ACK, disconnecting

PPP: LCP terminated on i/f 0 (result=1)

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: expecting 'ok'

SERLINK: sendpacket totlen=5 i/f 0

CHAT: timed out
Many thanks,

Michael COOP

SL4P


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - Dave McLaughlin - Sep 10 6:30:32 2009

Hi Michael

If you add the following to the ifconfig call you can enable additional
debug and see the actual +++ go out.

IFS_DEBUG, 6,

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Michael Coop (SL4P)
Sent: 10 September 2009 06:44
To: r...@yahoogroups.com
Subject: {Disarmed} RE: [rabbit-semi] DC 10.5 / RCM5700 - Attach & Detach
from PPP over GPRS session

Dave -

I was looking through the debug listing toward the end - and noticed that
the ifconfig() code sent the ATH -before- the escape +++ sequence - or is
this just the way the debug strings were generated from the routines as they
were stacked. ?

PPP: Got LCP term ACK, disconnecting

PPP: LCP terminated on i/f 0 (result=1)

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: expecting 'ok'

SERLINK: sendpacket totlen=5 i/f 0

CHAT: timed out
Many thanks,

Michael COOP

SL4P

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/08/09
20:45:00


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} RE: DC 10.5 / RCM5700 - Attach & Detach from PPP over GPRS session - Dave McLaughlin - Sep 10 6:59:14 2009

OK. I have setup an RCM5700 dev board and no modem for now. I compiled the
test programme MODEM_TEST.C as is, with no changes other than to include all
the debug output. I wanted to run it, timeout and restart the process. As
you can see I am still getting this error on the second dial attempt. By the
way, this is on a different computer and I just downloaded and installed
DynC 10.56 as a fresh install.

\\ Is my comments

SERLINK: tx buf = 00118900 (010A:E900), rx buf = 00118A00 (010A:EA00)
SERLINK: baud rate 57600: setting divisor to 26
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 57600: setting divisor to 26
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 totlen=1 i/f 0
SERLINK: sendpacket totlen=1 i/f 0
CHAT: expecting 'ok'
SERLINK: sendpacket totlen=5 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: expecting 'ok'
SERLINK: sendpacket totlen=5 i/f 0
CHAT: timed out
SERLINK: Closed PPP serial on iface 0
PPP failed
IP address is 0.0.0.0
Failed to send message

\\ Start second attempt

SERLINK: baud rate 57600: setting divisor to 26
SERLINK: bringing up serial PPP interface 0
SERLINK: baud rate 57600: setting divisor to 26
SERLINK: Opened PPP serial on iface 0 at 57600 baud
CHAT: sending 'ATZ'
\\ This is the second attempt and where I always get this buffer failure.

SERLINK: starting modem escape sequence
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket no buffer avail
SERLINK: sendpacket totlen=1 i/f 0
SERLINK: sendpacket no buffer avail
SERLINK: sendpacket totlen=1 i/f 0


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

PPP and wired LAN in the same application - "Michael Coop (SL4P)" - Sep 14 10:16:33 2009

Does anyone have references that I could look at - to use wired ethernet
-OR- PPP/GPRS in the same application ?

In my case - it should be a case of detecting if the wired LAN is present at
runtime, and if not - changing all the relevant globals to point to the PPP
interface.

For example sendmail() uses (IF_ANY), and I would like to know the best way
to direct that to the 'currently available' (IF_xxx)

There are so many possible global vars to change, that I'm reluctant to
start hunting them all down - if someone else has an easier way of doing
this!

Many thanks,

Michael COOP

SL4P


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

- Hi again Attach & Detach from PPP over GPRS session - "Michael Coop (SL4P)" - Oct 30 12:04:07 2009

Dave -

I have finally got my TELIT 864 up & running (much nicer than the Siemens.!)

Would it be possible to share your TELIT GPRS code.?

Now that I'm off the Siemens modem - I can see the advantage in the Telit
864 !!!

You may recall - I couldn't get the Siemens to suspend/resume, and closing
then redialling was very fragile.

I've tweaked my other code for initialisation and SMS - seems to be working
fine.

I have started looking at GPRS, but figure it's worth asking. !

The objective is that I can initiate a GPRS PPP/IP socket session, then when
I want to go back to command / SMS modes - I can suspend the GPRS session,
and next time I want to use GPRS, I can resume the earlier session. I'm
guessing this will be using the EasyGPRS command set in Telit modems. AT#SO
etc

Of course all this has to happen in DC 10.56's TCP/IP & PPP libraries

The functions I'm hoping to implement are -

GPRS_OPEN()

. Initialise and commence GPRS session

GPRS_SUSPEND()

. Suspend GPRS session - keep channel open, while in command mode

GPRS_RESUME()

. Resume GPRS session from command mode

. If no existing session available - then GPRS_open()

GPRS_CLOSE()

. Close GPRS Session

Many thanks if you can help or have suggestions

Michael COOP

SL4P



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: {Disarmed} - Hi again Attach & Detach from PPP over GPRS session - Dave McLaughlin - Oct 30 12:27:16 2009

Hi Michael,

I don't use any of the Telit Easy GPRS modes as Rabbit has all the TCP/IP I
need.

I am not sure how you are going to drop out of PPP with the Rabbit code as
it will be expecting to be receiving data. You may need to rewrite the
libraries to do this. If you do this, you simply have to send the +++ to
drop to command mode, send the commands you need and then use ATH1 to exit
command mode. As far as I can tell, this should work but as I said, the DC
libraries will be looking for serial data and without any modifications they
are going to get confused.

For me, I just call the PPP hangup from within DC and do what I need, then
start PPP again. With the changes I made, this now works faultlessly and I
use flags in the UCOS code to indicate if the PPP is up or down.

I have been working on a design though that uses an Atmel AVR processor and
this has no TCP/IP or PPP handlers so I am going to have to use the Easy
GPRS for that application but that won't be in DC. So far no coding has been
done.

Dave...

---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Michael Coop (SL4P)
Sent: 30 October 2009 17:01
To: r...@yahoogroups.com
Subject: {Disarmed} [rabbit-semi] - Hi again Attach & Detach from PPP over
GPRS session

Dave -

I have finally got my TELIT 864 up & running (much nicer than the Siemens.!)

Would it be possible to share your TELIT GPRS code.?

Now that I'm off the Siemens modem - I can see the advantage in the Telit
864 !!!

You may recall - I couldn't get the Siemens to suspend/resume, and closing
then redialling was very fragile.

I've tweaked my other code for initialisation and SMS - seems to be working
fine.

I have started looking at GPRS, but figure it's worth asking. !

The objective is that I can initiate a GPRS PPP/IP socket session, then when
I want to go back to command / SMS modes - I can suspend the GPRS session,
and next time I want to use GPRS, I can resume the earlier session. I'm
guessing this will be using the EasyGPRS command set in Telit modems. AT#SO
etc

Of course all this has to happen in DC 10.56's TCP/IP & PPP libraries

The functions I'm hoping to implement are -

GPRS_OPEN()

. Initialise and commence GPRS session

GPRS_SUSPEND()

. Suspend GPRS session - keep channel open, while in command mode

GPRS_RESUME()

. Resume GPRS session from command mode

. If no existing session available - then GPRS_open()

GPRS_CLOSE()

. Close GPRS Session

Many thanks if you can help or have suggestions

Michael COOP

SL4P

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: {Disarmed} - Hi again Attach & Detach from PPP over GPRS session - "Michael Coop (SL4P)" - Oct 30 18:51:33 2009

Hmmm
Your comments are exactly what I was thinking & expecting!
bugger!

Thanks mc
On 31/10/2009, at 3:26, "Dave McLaughlin"
wrote:

> Hi Michael,
>
> I don’t use any of the Telit Easy GPRS modes as Rabbit has all the T
> CP/IP I need.
>
> I am not sure how you are going to drop out of PPP with the Rabbit
> code as it will be expecting to be receiving data. You may need to
> rewrite the libraries to do this. If you do this, you simply have to
> send the +++ to drop to command mode, send the commands you need and
> then use ATH1 to exit command mode. As far as I can tell, this
> should work but as I said, the DC libraries will be looking for
> serial data and without any modifications they are going to get
> confused.
>
> For me, I just call the PPP hangup from within DC and do what I
> need, then start PPP again. With the changes I made, this now works
> faultlessly and I use flags in the UCOS code to indicate if the PPP
> is up or down.
>
> I have been working on a design though that uses an Atmel AVR
> processor and this has no TCP/IP or PPP handlers so I am going to
> have to use the Easy GPRS for that application but that won’t be in
> DC. So far no coding has been done.
>
> Dave...
>
> ---
> Very funny Scotty, now beam down my clothes!!!
> ---
> http://www.embeddedcomputer.co.uk
> ---
>
> From: r...@yahoogroups.com [mailto:rabbit-
> s...@yahoogroups.com] On Behalf Of Michael Coop (SL4P)
> Sent: 30 October 2009 17:01
> To: r...@yahoogroups.com
> Subject: {Disarmed} [rabbit-semi] - Hi again Attach & Detach from
> PPP over GPRS session
>
> Dave -
>
> I have finally got my TELIT 864 up & running (much nicer than the
> Siemens…!)
>
> Would it be possible to share your TELIT GPRS code…?
>
> Now that I’m off the Siemens modem – I can see the advantage in
> the Telit 864 !!!
>
> You may recall – I couldn’t get the Siemens to suspend/resume,
> and closing then redialling was very fragile.
>
> I’ve tweaked my other code for initialisation and SMS – seems to
> be working fine.
>
> I have started looking at GPRS, but figure it’s worth asking… !
>
> The objective is that I can initiate a GPRS PPP/IP socket session,
> then when I want to go back to command / SMS modes – I can suspend t
> he GPRS session, and next time I want to use GPRS, I can resume the
> earlier session. I’m guessing this will be using the EasyGPRS comma
> nd set in Telit modems… AT#SO etc
>
> Of course all this has to happen in DC 10.56’s TCP/IP & PPP librari
> es
>
> The functions I’m hoping to implement are –
>
> GPRS_OPEN()
>
> · Initialise and commence GPRS session
>
> GPRS_SUSPEND()
>
> · Suspend GPRS session – keep channel open, while in
> command mode
>
> GPRS_RESUME()
>
> · Resume GPRS session from command mode
>
> · If no existing session available – then GPRS_open()
>
> GPRS_CLOSE()
>
> · Close GPRS Session
>
> Many thanks if you can help or have suggestions
>
> Michael COOP
>
> SL4P

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )