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.
GPRS PPP Problem failure connecting and sending email - timematcher - Oct 12 0:32:08 2009
Hi all
I am trying to test modem.c smaple app found in DC 9.62 on Rabbit blc2100. A GPRS Modem is
connected to the board via serial port. Everything goes fine till when credentials are
negotiated. The username or password verification either gets stuck or something similar
happens
Below is the log...
PPPLINK: baud rate 57600: setting divisor to 11
PPPLINK: bringing up serial PPP interface 0
PPPLINK: baud rate 57600: setting divisor to 11
PPPLINK: Opened PPP serial on iface 0 at 57600 baud
CHAT: sending 'ATZ'
PPPLINK: starting modem escape sequence
PPPLINK: sendpacket totlen=1 i/f 0
PPPLINK: sendpacket using 0000B9BF
--- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
sect 1, len=1 addr=x80091064 rlen=1525
2B +
PPPLINK: transmitter was idle
PPPLINK: sendpacket totlen=1 i/f 0
PPPLINK: sendpacket using 0000B9BF
--- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
sect 1, len=1 addr=x80091064 rlen=1525
2B +
PPPLINK: transmitter was idle
PPPLINK: sendpacket totlen=1 i/f 0
PPPLINK: sendpacket using 0000B9BF
--- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
sect 1, len=1 addr=x80091064 rlen=1525
2B +
PPPLINK: transmitter was idle
CHAT: expecting 'ok'
PPPLINK: sendpacket totlen=5 i/f 0
PPPLINK: sendpacket using 0000B9BF
--- pkt flags=x40 i/f=0 tstamp=4270 len=5 ---
sect 1, len=5 addr=x80091064 rlen=1521
41 54 5A 0D 0A ATZ
PPPLINK: transmitter was idle
PPPLINK: receive processed 1 chars
SERLINK: got raw packet len=2, chatting=login
PPPLINK: receive processed 9 chars
SERLINK: got raw packet len=3, 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"'
CHAT: expecting 'OK'
PPPLINK: sendpacket totlen=30 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=26788 len=30 ---
sect 1, len=30 addr=x80091C50 rlen=1496
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 0D 0A ","internet"
PPPLINK: transmitter was idle
PPPLINK: receive processed 3 chars
SERLINK: got raw packet len=3, chatting=login
PPPLINK: receive processed 33 chars
SERLINK: got raw packet len=27, chatting=login
SERLINK: got raw packet len=2, chatting=login
SERLINK: got raw packet len=4, chatting=login
CHAT: found it!
CHAT: sending 'ATD*99***1#'
CHAT: expecting 'CONNECT'
PPPLINK: sendpacket totlen=13 i/f 0
PPPLINK: sendpacket using 0000B9F6
--- pkt flags=x40 i/f=0 tstamp=43423 len=13 ---
sect 1, len=13 addr=x8009165A rlen=1513
41 54 44 2A 39 39 2A 2A 2A 31 23 0D 0A ATD*99***1#
PPPLINK: transmitter was idle
PPPLINK: receive processed 2 chars
SERLINK: got raw packet len=2, chatting=login
PPPLINK: receive processed 78 chars
SERLINK: got raw packet len=11, chatting=login
SERLINK: got raw packet len=2, chatting=login
SERLINK: got raw packet len=15, chatting=login
CHAT: found it!
CHAT: end of script
SERLINK: got raw packet len=50, chatting=none
PPP: sending LCP config req i/f 0
PPPLINK: sendpacket totlen=24 i/f 0
PPPLINK: sendpacket using 0000BA64
--- pkt flags=x40 i/f=0 tstamp=3556 len=24 ---
sect 1, len=24 addr=x80092246 rlen=1502
FF 03 C0 21 01 01 00 14 02 06 00 00 00 00 05 06 !
00 00 92 69 07 02 08 02 i
PPPLINK: transmitter was idle
PPPLINK: receive processed 2 chars
PPPLINK: receive processed 25 chars
PPP: got packet BA64 on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x04 id=1 len=10 i/f 0
PPP: LCP reject on i/f 0
PPP: sending LCP config req i/f 0
PPPLINK: sendpacket totlen=18 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=3547 len=18 ---
sect 1, len=18 addr=x80091C50 rlen=1508
FF 03 C0 21 01 02 00 0E 02 06 00 00 00 00 07 02 !
08 02
PPPLINK: transmitter was idle
PPPLINK: receive processed 1 chars
PPPLINK: receive processed 30 chars
PPPLINK: receive processed 2 chars
PPPLINK: receive processed 48 chars
PPP: got packet BA64 on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x01 id=1 len=22 i/f 0
PPP: LCP config request i/f 0
PPP: accepting option 1
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 3
PPP: sending LCP ack i/f 0
PPPLINK: sendpacket totlen=26 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=3547 len=26 ---
sect 1, len=26 addr=x80091C50 rlen=1500
FF 03 C0 21 02 01 00 16 01 04 05 DC 02 06 00 00 !
00 00 07 02 08 02 03 04 C0 23 #
PPPLINK: transmitter was idle
PPP: sending LCP config req i/f 0
PPPLINK: sendpacket totlen=18 i/f 0
PPPLINK: sendpacket using 0000BA64
--- pkt flags=x40 i/f=0 tstamp=38235 len=18 ---
sect 1, len=18 addr=x80092246 rlen=1508
FF 03 C0 21 01 03 00 0E 02 06 00 00 00 00 07 02 !
08 02
PPPLINK: transmitter was idle
PPPLINK: receive processed 1 chars
PPPLINK: receive processed 62 chars
PPP: got packet BA64 on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x02 id=3 len=14 i/f 0
PPP: received LCP ACK i/f 0. local_acked = 1
PPP: sending our credentials Telenor/Telenor
PPP: sending PAP auth i/f 0
PPPLINK: sendpacket totlen=24 i/f 0
PPPLINK: sendpacket using 0000BA64
--- pkt flags=x40 i/f=0 tstamp=49882 len=24 ---
sect 1, len=24 addr=x80092246 rlen=1502
FF 03 C0 23 01 00 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
07 54 65 6C 65 6E 6F 72 Telenor
PPPLINK: transmitter was idle
PPPLINK: receive processed 2 chars
PPPLINK: receive processed 48 chars
PPP: sending our credentials Telenor/Telenor
PPP: sending PAP auth i/f 0
PPPLINK: sendpacket totlen=24 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=3547 len=24 ---
sect 1, len=24 addr=x80091C50 rlen=1502
FF 03 C0 23 01 01 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
07 54 65 6C 65 6E 6F 72 Telenor
PPPLINK: transmitter was idle
PPPLINK: receive processed 1 chars
PPPLINK: receive processed 34 chars
PPP: got packet BA2D on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x01 id=2 len=22 i/f 0
PPP: LCP config request i/f 0
PPP: accepting option 1
PPP: accepting option 2
PPP: accepting option 7
PPP: accepting option 8
PPP: accepting option 3
PPP: sending LCP ack i/f 0
PPPLINK: sendpacket totlen=26 i/f 0
PPPLINK: sendpacket using 0000BA64
--- pkt flags=x40 i/f=0 tstamp=49882 len=26 ---
sect 1, len=26 addr=x80092246 rlen=1500
FF 03 C0 21 02 02 00 16 01 04 05 DC 02 06 00 00 !
00 00 07 02 08 02 03 04 C0 23 #
PPPLINK: transmitter was idle
PPP: sending our credentials Telenor/Telenor
PPP: sending PAP auth i/f 0
PPPLINK: sendpacket totlen=24 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=48730 len=24 ---
sect 1, len=24 addr=x80091C50 rlen=1502
FF 03 C0 23 01 02 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
07 54 65 6C 65 6E 6F 72 Telenor
PPPLINK: transmitter was idle
PPPLINK: receive processed 1 chars
PPPLINK: receive processed 23 chars
PPP: got packet BA2D on i/f:0 protocol:0xc023
PPP: got PAP packet code=0x02 id=2 len=13 i/f 0
PPP: sending IPCP config i/f 0
PPPLINK: sendpacket totlen=26 i/f 0
PPPLINK: sendpacket using 0000BA2D
--- pkt flags=x40 i/f=0 tstamp=40526 len=26 ---
sect 1, len=26 addr=x80091C50 rlen=1500
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
PPPLINK: transmitter was idle
PPPLINK: receive processed 16 chars
PPPLINK: receive processed 1 chars
PPPLINK: receive processed 16 chars
PPP: got packet BA2D on i/f:0 protocol:0xc021
PPP: got LCP packet code=0x05 id=4 len=4 i/f 0
PPP: sending LCP term ack i/f 0
PPPLINK: sendpacket totlen=8 i/f 0
PPPLINK: sendpacket using 0000BA64
--- pkt flags=x40 i/f=0 tstamp=49882 len=8 ---
sect 1, len=8 addr=x80092246 rlen=1518
FF 03 C0 21 06 04 00 04 !
PPPLINK: transmitter was idle
PPP: link i/f 0 is down
***************************** PPP FAILED******************************************
IP address is 0.0.0.0
to:1b37
from:1b4c
subject:1b61
message:1B77
SMTP: Resolving 216.239.59.109
PPPLINK: receive processed 14 chars
SMTP: Opening to D8EF3B6D:19
Error opening socket.
Failed to send message
==========================================
The code's main content is as follows.
==========================================
#define TCPCONFIG 0 // No predefined config for this sample
//Use serial port C (IF_PPP2)
#define USE_PPP_SERIAL 0x04
//Uncomment to get PPP detail
#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 DIALUP_NAME "Telenor"
#define DIALUP_PASSWORD "Telenor"
//#define CHAT_DEBUG
#define DIALUP_SENDEXPECT "ATZ #ok @AT+CGDCONT=1,\"IP\",\"internet\" #OK ATD*99***1#
#CONNECT"
sock_init(); //initialize TCP/IP
#ifdef USE_SMTP_AUTH
smtp_setauth ("m...@gmail.com", "myemailpassword");
#endif
//test repeated open/close of modem link
for(count = 0; count < 1; count++)
{
//configure PPP for dialing in to ISP and bring it up
ifconfig(IF_DEFAULT,
IFS_PPP_SPEED, 57600L ,
IFS_PPP_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow
register. From DC9.0,
// this is computed automatically - the
value passed here
// for the shadow register is ignored.
IFS_PPP_CTSPIN, PBDR, 0,
IFS_PPP_FLOWCONTROL, 0, //0= donot use Flow control...
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_DEBUG, 6, // Add additional debug output //Added by TM
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;
====================================================================
====================================================================
I dont understand what i am doing wrong. Please help. Thanks
Regards
AM.
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
{DISARMED} GPRS PPP Problem failure connecting and sending email - timematcher - Oct 12 4:52:06 2009
Ok i was able to solve the problem by changing the IFCONFIG as FOllows:
ifconfig(IF_PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 57600L ,
IFS_PPP_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow
register. From DC9.0,
// this is computed automatically - the
value passed here
// for the shadow register is ignored.
IFS_PPP_CTSPIN, PBDR, 0,
IFS_PPP_FLOWCONTROL, 0, //0= donot use Flow control...
IFS_PPP_SENDEXPECT, DIALUP_SENDEXPECT,
IFS_PPP_REMOTEAUTH, DIALUP_NAME,DIALUP_PASSWORD,
IFS_PPP_HANGUP, "ATH #ok",
IFS_PPP_MODEMESCAPE, 1,
IFS_PPP_ACCEPTIP, 1,
IFS_PPP_ACCEPTDNS, 1,
IFS_DEBUG, 6, // Add additional debug output //Added by TM
IFS_UP,
IFS_END
);
Also Second change was to reduce the SENDEXPECT to
#define DIALUP_SENDEXPECT "AT" " OK " "ATD*99#" " CONNECT "
and Setting gateway
#define MY_GATEWAY "172.18.19.11"
So PPP established successfully.
So this issue is resolved.
--- In r...@yahoogroups.com, "timematcher"
wrote:
>
> Hi all
>
> I am trying to test modem.c smaple app found in DC 9.62 on Rabbit blc2100. A GPRS Modem
is connected to the board via serial port. Everything goes fine till when credentials are
negotiated. The username or password verification either gets stuck or something similar
happens
>
> Below is the log...
> PPPLINK: baud rate 57600: setting divisor to 11
> PPPLINK: bringing up serial PPP interface 0
> PPPLINK: baud rate 57600: setting divisor to 11
> PPPLINK: Opened PPP serial on iface 0 at 57600 baud
> CHAT: sending 'ATZ'
> PPPLINK: starting modem escape sequence
> PPPLINK: sendpacket totlen=1 i/f 0
> PPPLINK: sendpacket using 0000B9BF
> --- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
> sect 1, len=1 addr=x80091064 rlen=1525
> 2B +
> PPPLINK: transmitter was idle
> PPPLINK: sendpacket totlen=1 i/f 0
> PPPLINK: sendpacket using 0000B9BF
> --- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
> sect 1, len=1 addr=x80091064 rlen=1525
> 2B +
> PPPLINK: transmitter was idle
> PPPLINK: sendpacket totlen=1 i/f 0
> PPPLINK: sendpacket using 0000B9BF
> --- pkt flags=x40 i/f=0 tstamp=4270 len=1 ---
> sect 1, len=1 addr=x80091064 rlen=1525
> 2B +
> PPPLINK: transmitter was idle
> CHAT: expecting 'ok'
> PPPLINK: sendpacket totlen=5 i/f 0
> PPPLINK: sendpacket using 0000B9BF
> --- pkt flags=x40 i/f=0 tstamp=4270 len=5 ---
> sect 1, len=5 addr=x80091064 rlen=1521
> 41 54 5A 0D 0A ATZ
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 1 chars
> SERLINK: got raw packet len=2, chatting=login
> PPPLINK: receive processed 9 chars
> SERLINK: got raw packet len=3, 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"'
> CHAT: expecting 'OK'
> PPPLINK: sendpacket totlen=30 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=26788 len=30 ---
> sect 1, len=30 addr=x80091C50 rlen=1496
> 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 0D 0A ","internet"
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 3 chars
> SERLINK: got raw packet len=3, chatting=login
> PPPLINK: receive processed 33 chars
> SERLINK: got raw packet len=27, chatting=login
> SERLINK: got raw packet len=2, chatting=login
> SERLINK: got raw packet len=4, chatting=login
> CHAT: found it!
> CHAT: sending 'ATD*99***1#'
> CHAT: expecting 'CONNECT'
> PPPLINK: sendpacket totlen=13 i/f 0
> PPPLINK: sendpacket using 0000B9F6
> --- pkt flags=x40 i/f=0 tstamp=43423 len=13 ---
> sect 1, len=13 addr=x8009165A rlen=1513
> 41 54 44 2A 39 39 2A 2A 2A 31 23 0D 0A ATD*99***1#
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 2 chars
> SERLINK: got raw packet len=2, chatting=login
> PPPLINK: receive processed 78 chars
> SERLINK: got raw packet len=11, chatting=login
> SERLINK: got raw packet len=2, chatting=login
> SERLINK: got raw packet len=15, chatting=login
> CHAT: found it!
> CHAT: end of script
> SERLINK: got raw packet len=50, chatting=none
> PPP: sending LCP config req i/f 0
> PPPLINK: sendpacket totlen=24 i/f 0
> PPPLINK: sendpacket using 0000BA64
> --- pkt flags=x40 i/f=0 tstamp=3556 len=24 ---
> sect 1, len=24 addr=x80092246 rlen=1502
> FF 03 C0 21 01 01 00 14 02 06 00 00 00 00 05 06 !
> 00 00 92 69 07 02 08 02 i
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 2 chars
> PPPLINK: receive processed 25 chars
> PPP: got packet BA64 on i/f:0 protocol:0xc021
> PPP: got LCP packet code=0x04 id=1 len=10 i/f 0
> PPP: LCP reject on i/f 0
> PPP: sending LCP config req i/f 0
> PPPLINK: sendpacket totlen=18 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=3547 len=18 ---
> sect 1, len=18 addr=x80091C50 rlen=1508
> FF 03 C0 21 01 02 00 0E 02 06 00 00 00 00 07 02 !
> 08 02
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 1 chars
> PPPLINK: receive processed 30 chars
> PPPLINK: receive processed 2 chars
> PPPLINK: receive processed 48 chars
> PPP: got packet BA64 on i/f:0 protocol:0xc021
> PPP: got LCP packet code=0x01 id=1 len=22 i/f 0
> PPP: LCP config request i/f 0
> PPP: accepting option 1
> PPP: accepting option 2
> PPP: accepting option 7
> PPP: accepting option 8
> PPP: accepting option 3
> PPP: sending LCP ack i/f 0
> PPPLINK: sendpacket totlen=26 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=3547 len=26 ---
> sect 1, len=26 addr=x80091C50 rlen=1500
> FF 03 C0 21 02 01 00 16 01 04 05 DC 02 06 00 00 !
> 00 00 07 02 08 02 03 04 C0 23 #
> PPPLINK: transmitter was idle
> PPP: sending LCP config req i/f 0
> PPPLINK: sendpacket totlen=18 i/f 0
> PPPLINK: sendpacket using 0000BA64
> --- pkt flags=x40 i/f=0 tstamp=38235 len=18 ---
> sect 1, len=18 addr=x80092246 rlen=1508
> FF 03 C0 21 01 03 00 0E 02 06 00 00 00 00 07 02 !
> 08 02
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 1 chars
> PPPLINK: receive processed 62 chars
> PPP: got packet BA64 on i/f:0 protocol:0xc021
> PPP: got LCP packet code=0x02 id=3 len=14 i/f 0
> PPP: received LCP ACK i/f 0. local_acked = 1
> PPP: sending our credentials Telenor/Telenor
> PPP: sending PAP auth i/f 0
> PPPLINK: sendpacket totlen=24 i/f 0
> PPPLINK: sendpacket using 0000BA64
> --- pkt flags=x40 i/f=0 tstamp=49882 len=24 ---
> sect 1, len=24 addr=x80092246 rlen=1502
> FF 03 C0 23 01 00 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
> 07 54 65 6C 65 6E 6F 72 Telenor
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 2 chars
> PPPLINK: receive processed 48 chars
> PPP: sending our credentials Telenor/Telenor
> PPP: sending PAP auth i/f 0
> PPPLINK: sendpacket totlen=24 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=3547 len=24 ---
> sect 1, len=24 addr=x80091C50 rlen=1502
> FF 03 C0 23 01 01 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
> 07 54 65 6C 65 6E 6F 72 Telenor
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 1 chars
> PPPLINK: receive processed 34 chars
> PPP: got packet BA2D on i/f:0 protocol:0xc021
> PPP: got LCP packet code=0x01 id=2 len=22 i/f 0
> PPP: LCP config request i/f 0
> PPP: accepting option 1
> PPP: accepting option 2
> PPP: accepting option 7
> PPP: accepting option 8
> PPP: accepting option 3
> PPP: sending LCP ack i/f 0
> PPPLINK: sendpacket totlen=26 i/f 0
> PPPLINK: sendpacket using 0000BA64
> --- pkt flags=x40 i/f=0 tstamp=49882 len=26 ---
> sect 1, len=26 addr=x80092246 rlen=1500
> FF 03 C0 21 02 02 00 16 01 04 05 DC 02 06 00 00 !
> 00 00 07 02 08 02 03 04 C0 23 #
> PPPLINK: transmitter was idle
> PPP: sending our credentials Telenor/Telenor
> PPP: sending PAP auth i/f 0
> PPPLINK: sendpacket totlen=24 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=48730 len=24 ---
> sect 1, len=24 addr=x80091C50 rlen=1502
> FF 03 C0 23 01 02 00 14 07 54 65 6C 65 6E 6F 72 # Telenor
> 07 54 65 6C 65 6E 6F 72 Telenor
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 1 chars
> PPPLINK: receive processed 23 chars
> PPP: got packet BA2D on i/f:0 protocol:0xc023
> PPP: got PAP packet code=0x02 id=2 len=13 i/f 0
> PPP: sending IPCP config i/f 0
> PPPLINK: sendpacket totlen=26 i/f 0
> PPPLINK: sendpacket using 0000BA2D
> --- pkt flags=x40 i/f=0 tstamp=40526 len=26 ---
> sect 1, len=26 addr=x80091C50 rlen=1500
> 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
> PPPLINK: transmitter was idle
> PPPLINK: receive processed 16 chars
> PPPLINK: receive processed 1 chars
> PPPLINK: receive processed 16 chars
> PPP: got packet BA2D on i/f:0 protocol:0xc021
> PPP: got LCP packet code=0x05 id=4 len=4 i/f 0
> PPP: sending LCP term ack i/f 0
> PPPLINK: sendpacket totlen=8 i/f 0
> PPPLINK: sendpacket using 0000BA64
> --- pkt flags=x40 i/f=0 tstamp=49882 len=8 ---
> sect 1, len=8 addr=x80092246 rlen=1518
> FF 03 C0 21 06 04 00 04 !
> PPPLINK: transmitter was idle
> PPP: link i/f 0 is down
> ***************************** PPP FAILED******************************************
> IP address is 0.0.0.0
> to:1b37
> from:1b4c
> subject:1b61
> message:1B77
> SMTP: Resolving 216.239.59.109
> PPPLINK: receive processed 14 chars
> SMTP: Opening to D8EF3B6D:19
> Error opening socket.
> Failed to send message
>
> ==========================================
> The code's main content is as follows.
> ==========================================
> #define TCPCONFIG 0 // No predefined config for this sample
>
> //Use serial port C (IF_PPP2)
> #define USE_PPP_SERIAL 0x04
> //Uncomment to get PPP detail
> #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 DIALUP_NAME "Telenor"
> #define DIALUP_PASSWORD "Telenor"
>
> //#define CHAT_DEBUG
> #define DIALUP_SENDEXPECT "ATZ #ok @AT+CGDCONT=1,\"IP\",\"internet\" #OK ATD*99***1#
#CONNECT"
> sock_init(); //initialize TCP/IP
>
> #ifdef USE_SMTP_AUTH
> smtp_setauth ("mymail@...", "myemailpassword");
> #endif
>
> //test repeated open/close of modem link
> for(count = 0; count < 1; count++)
> {
>
> //configure PPP for dialing in to ISP and bring it up
> ifconfig(IF_DEFAULT,
> IFS_PPP_SPEED, 57600L ,
> IFS_PPP_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow
register. From DC9.0,
> // this is computed automatically - the
value passed here
> // for the shadow register is ignored.
> IFS_PPP_CTSPIN, PBDR, 0,
> IFS_PPP_FLOWCONTROL, 0, //0= donot use Flow control...
> 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_DEBUG, 6, // Add additional debug output //Added by TM
> 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;
>
> ====================================================================
> ====================================================================
> I dont understand what i am doing wrong. Please help. Thanks
> Regards
>
> AM.
>
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Dave McLaughlin - Oct 12 23:42:08 2009
That is OK and it will work as long as the GPRS context is still programmed
into the modem. If you then install your software on a system which does not
have the GPRS context, it will fail to dial. You need the AT+CGCONT command
to set this up.
It will also fail if the gateway changes on the network. It is far safer to
fix your issue than try to do a fix that might work now but fail sometime in
the future.
One thing I discovered is that if you put in a call to the following
function before PPP dialing, it connects each time without fail. For me it
does and considering all the failures I had before, this fix cures that
issue.
sethostid(0);
This somehow stops the software from trying to use the last IP address is
got from the network.
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 timematcher
Sent: 12 October 2009 15:52
To: r...@yahoogroups.com
Subject: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure
connecting and sending email
Ok i was able to solve the problem by changing the IFCONFIG as FOllows:
ifconfig(IF_PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 57600L ,
IFS_PPP_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow register.
>From DC9.0,
// this is computed automatically - the value passed here
// for the shadow register is ignored.
IFS_PPP_CTSPIN, PBDR, 0,
IFS_PPP_FLOWCONTROL, 0, //0= donot use Flow control...
IFS_PPP_SENDEXPECT, DIALUP_SENDEXPECT,
IFS_PPP_REMOTEAUTH, DIALUP_NAME,DIALUP_PASSWORD,
IFS_PPP_HANGUP, "ATH #ok",
IFS_PPP_MODEMESCAPE, 1,
IFS_PPP_ACCEPTIP, 1,
IFS_PPP_ACCEPTDNS, 1,
IFS_DEBUG, 6, // Add additional debug output //Added by TM
IFS_UP,
IFS_END
);
Also Second change was to reduce the SENDEXPECT to
#define DIALUP_SENDEXPECT "AT" " OK " "ATD*99#" " CONNECT "
and Setting gateway
#define MY_GATEWAY "172.18.19.11"
So PPP established successfully.
So this issue is resolved.

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - timematcher - Oct 13 0:01:41 2009
sethostid(0) ;
vow. that is a nice piece of information. I am experiencing this stuff that sometimes PPP
connects and sometimes it doesn't and then i reset the modem and then try and then it
connects so that sort of unreliable behavior.
I will try sethostid(0) ; out in my code and will post back the results. Thank you for
this useful piece of information.
I will also look upon the gateway issue. But as far as i am concerned and the problem i am
working on, the gateway needs to be fixed and it is not expected to change over time so i
can bear with it.
Thanks a lot.
Regards
AM.
~~I love walking in the rain so that nobody can see my tears~~
~~A man's dreams are an index to his Greatness~~
~~It's NOT that i am odd,,,it's that i am just difficult to understand~~
--- On Tue, 10/13/09, Dave McLaughlin
wrote:
From: Dave McLaughlin
Subject: RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure connecting and
sending email
To: r...@yahoogroups.com
Date: Tuesday, October 13, 2009, 8:41 AM
That is OK and it will work as long as the GPRS context is still
programmed into the modem. If you then install your software on a system which
does not have the GPRS context, it will fail to dial. You need the AT+CGCONT
command to set this up.
It will also fail if the gateway changes on the network. It is
far safer to fix your issue than try to do a fix that might work now but fail
sometime in the future.
One thing I discovered is that if you put in a call to the
following function before PPP dialing, it connects each time without fail. For
me it does and considering all the failures I had before, this fix cures that
issue.
sethostid(0) ;
This somehow stops the software from trying to use the last IP
address is got from the network.
Dave...
---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embedded computer. co.uk
---
From: rabbit-semi@ yahoogroups. com
[mailto:rabbit- semi@yahoogroups .com] On Behalf Of timematcher
Sent: 12 October 2009 15:52
To: rabbit-semi@ yahoogroups. com
Subject: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure
connecting and sending email
Ok i was able to solve the problem by changing
the IFCONFIG as FOllows:
ifconfig(IF_ PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 57600L ,
IFS_PPP_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow register.
>From DC9.0,
// this is computed automatically - the value passed here
// for the shadow register is ignored.
IFS_PPP_CTSPIN, PBDR, 0,
IFS_PPP_FLOWCONTROL , 0, //0= donot use Flow control...
IFS_PPP_SENDEXPECT, DIALUP_SENDEXPECT,
IFS_PPP_REMOTEAUTH, DIALUP_NAME, DIALUP_PASSWORD,
IFS_PPP_HANGUP, "ATH #ok",
IFS_PPP_MODEMESCAPE , 1,
IFS_PPP_ACCEPTIP, 1,
IFS_PPP_ACCEPTDNS, 1,
IFS_DEBUG, 6, // Add additional debug output //Added by TM
IFS_UP,
IFS_END
);
Also Second change was to reduce the SENDEXPECT to
#define DIALUP_SENDEXPECT "AT" " OK " "ATD*99#"
" CONNECT "
and Setting gateway
#define MY_GATEWAY "172.18.19.11"
So PPP established successfully.
So this issue is resolved.
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Dave McLaughlin - Oct 13 1:24:36 2009
Where is the gateway located that you are using? Is this on the GSM network
that you are PPP'ing into? This could easily change if the GSM network
operator makes any changes. Then your software will just stop working. I
would leave it as DYNAMIC and then you are safe.
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 timematcher
Sent: 13 October 2009 11:01
To: r...@yahoogroups.com
Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem
failure connecting and sending email
sethostid(0) ;
vow. that is a nice piece of information. I am experiencing this stuff that
sometimes PPP connects and sometimes it doesn't and then i reset the modem
and then try and then it connects so that sort of unreliable behavior.
I will try sethostid(0) ; out in my code and will post back the results.
Thank you for this useful piece of information.
I will also look upon the gateway issue. But as far as i am concerned and
the problem i am working on, the gateway needs to be fixed and it is not
expected to change over time so i can bear with it.
Thanks a lot.
Regards
AM.

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - timematcher - Oct 13 3:19:21 2009
The gateway ip address is provided by the GSM/GPRS service provider
that i am using. It has been static for quite a period of time,, i
think 3 years. It is saved as GPRS settings on each subscriber Set as
GPRS handset settings and i have been using it for a long time to
configure GPRS on PDAs etc. I think it is located somewhere at the Data
Center of GPRS Service provider. For other practical applications i
intend to follow your advice. For this particular application i have to
stick with the gateway.
Currently i am experiencing problems
with the modem's unreliable behaviour. It stops responding to AT
commands sometimes and i have to power cycle the modem.
Secondly
sometimes, PPP isnt established and sometimes it is using the AT
commands via the code in Rabbit board. On the other hand, GPRS
connectivity is *instant* if i use it as a reqular modem on PC.
sethostid(0) had no effect on this behavior. Can anybody comment on it?
btw we are having EDGE coverage in our area and connectivity has no problems for the
network (Telenor) here.
Regards
AM.
~~I love walking in the rain so that nobody can see my tears~~
~~A man's dreams are an index to his Greatness~~
~~It's NOT that i am odd,,,it's that i am just difficult to understand~~
--- On Tue, 10/13/09, Dave McLaughlin
wrote:
From: Dave McLaughlin
Subject: RE: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure
connecting and sending email
To: r...@yahoogroups.com
Date: Tuesday, October 13, 2009, 10:23 AM
Â
Where is the gateway located that you are using? Is this on the
GSM network that you are PPP’ing into? This could easily change if the
GSM network operator makes any changes. Then your software will just stop
working. I would leave it as DYNAMIC and then you are safe.
Â
Dave...
---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embedded computer. co.uk
---
Â
From: rabbit-semi@ yahoogroups. com
[mailto:rabbit- semi@yahoogroups .com] On Behalf Of timematcher
Sent: 13 October 2009 11:01
To: rabbit-semi@ yahoogroups. com
Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
Â
Â
sethostid(0) ;
vow. that is a nice piece of information. I am experiencing this stuff that
sometimes PPP connects and sometimes it doesn't and then i reset the modem
and then try and then it connects so that sort of unreliable behavior.
I will try sethostid(0) ; out in my code and will post back the results.
Thank you for this useful piece of information.
I will also look upon the gateway issue. But as far as i am concerned and the
problem i am working on, the gateway needs to be fixed and it is not expected
to change over time so i can bear with it.
Thanks a lot.
Regards
AM.
Â

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Dave McLaughlin - Oct 13 3:45:16 2009
Could it be that you are not using handshaking and the modem is still configured for this?
Just a thought.
Does it exhibit this behaviour when connected to the PC serial port or just on the Rabbit.
If on both I would check with the manufacturer that there is not a fix for this?
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 timematcher
Sent: 13 October 2009 14:19
To: r...@yahoogroups.com
Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure
connecting and sending email
Currently i am experiencing problems with the modem's unreliable behaviour. It stops
responding to AT commands sometimes and i have to power cycle the modem.
Regards
AM.

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
Re: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - timematcher - Oct 14 2:35:12 2009
Hi
It does not exhibit this behavior when connected to PC's Serial Port.
It only manifests such behavior when connected to rabbit BL2100 serial Port.
I am using Serial port C only, using the 3-pin combination(Rx,Tx, GND).
CTS and RTS are Shorted together.
DCD, DSR and DTR shorted together.
===========================
The mistake i was doing was:
===========================
I did a hard reset and forgot to execute and save the following:
=========================
AT+IFC=0,0; //Original AT+IFC? = 2,2
AT&W
=========================
So after doing that it got solved. A flow control problem indeed.
Thanks a lot for the advice due to which i was able to find it out.
Regards
--- In r...@yahoogroups.com, "Dave McLaughlin"
wrote:
>
> Could it be that you are not using handshaking and the modem is still configured for
this? Just a thought.
>
>
>
> Does it exhibit this behaviour when connected to the PC serial port or just on the
Rabbit. If on both I would check with the manufacturer that there is not a fix for
this?
>
>
>
>
>
> 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 timematcher
> Sent: 13 October 2009 14:19
> To: r...@yahoogroups.com
> Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP Problem failure
connecting and sending email
>
>
>
>
>
> Currently i am experiencing problems with the modem's unreliable behaviour. It stops
responding to AT commands sometimes and i have to power cycle the modem.
> Regards
> AM.
>
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} Re: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Dave McLaughlin - Oct 14 3:25:53 2009
Hi,
Leave the DTR, DSR and DCD lines unconnected. DCD is an output from the
modem and goes active when online. DTR is an input and you can set this to
be ignore with the AT&D command. DSR is not required either. Better to leave
these 3 lines unconnected. DTR can be used to bring the modem in and out of
command mode in the same way as +++ does. Better leave it disconnected and
avoid the DCD driving it.
RTS and CTS shorted is ok.
Regards
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 timematcher
Sent: 14 October 2009 13:35
To: r...@yahoogroups.com
Subject: {Disarmed} Re: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED}
GPRS PPP Problem failure connecting and sending email
Hi
It does not exhibit this behavior when connected to PC's Serial Port.
It only manifests such behavior when connected to rabbit BL2100 serial Port.
I am using Serial port C only, using the 3-pin combination(Rx,Tx, GND).
CTS and RTS are Shorted together.
DCD, DSR and DTR shorted together.
===========================
The mistake i was doing was:
===========================
I did a hard reset and forgot to execute and save the following:
=========================
AT+IFC=0,0; //Original AT+IFC? = 2,2
AT&W
=========================
So after doing that it got solved. A flow control problem indeed.
Thanks a lot for the advice due to which i was able to find it out.
Regards

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
RE: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Jim Ashby - Oct 14 11:30:38 2009
OK, I need some help writing some MODBUSS / TCPIP code to communicate to a
Festo pneumatic control block, and I am willing to pay for this assistance.
Anyone interested?
Respond directly by email to j...@idesolutions.us
Jim C Ashby III
IDE solutions, Inc.
Lead R&D Applications Engineering Technician
16456 Viho Rd.
Apple Valley, CA 92307-1366
832-512-8083 Cell
From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of timematcher
Sent: Tuesday, October 13, 2009 11:35 PM
To: r...@yahoogroups.com
Subject: Re: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
Hi
It does not exhibit this behavior when connected to PC's Serial Port.
It only manifests such behavior when connected to rabbit BL2100 serial Port.
I am using Serial port C only, using the 3-pin combination(Rx,Tx, GND).
CTS and RTS are Shorted together.
DCD, DSR and DTR shorted together.
===========================
The mistake i was doing was:
===========================
I did a hard reset and forgot to execute and save the following:
=========================
AT+IFC=0,0; //Original AT+IFC? = 2,2
AT&W
=========================
So after doing that it got solved. A flow control problem indeed.
Thanks a lot for the advice due to which i was able to find it out.
Regards
--- In r...@yahoogroups.com
,
"Dave McLaughlin" wrote:
>
> Could it be that you are not using handshaking and the modem is still
configured for this? Just a thought.
>
> Does it exhibit this behaviour when connected to the PC serial port or
just on the Rabbit. If on both I would check with the manufacturer that
there is not a fix for this?
>
> 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 timematcher
> Sent: 13 October 2009 14:19
> To: r...@yahoogroups.com
> Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
>
> Currently i am experiencing problems with the modem's unreliable
behaviour. It stops responding to AT commands sometimes and i have to power
cycle the modem.
> Regards
> AM.
>

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - =?iso-8859-1?Q?Jes=FAs_Manuel_Conejo_Sarabia?= - Oct 14 12:11:45 2009
You don’t need to pay anybody. Just see the Festo protocol and use the
rabbit tcp & Modbus libraries/examples
Jesus.
De: r...@yahoogroups.com [mailto:r...@yahoogroups.com] En
nombre de Jim Ashby
Enviado el: miércoles, 14 de octubre de 2009 17:30
Para: r...@yahoogroups.com
Asunto: RE: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
OK, I need some help writing some MODBUSS / TCPIP code to communicate to a
Festo pneumatic control block, and I am willing to pay for this assistance.
Anyone interested?
Respond directly by email to j...@idesolutions.us
Jim C Ashby III
IDE solutions, Inc.
Lead R&D Applications Engineering Technician
16456 Viho Rd.
Apple Valley, CA 92307-1366
832-512-8083 Cell
From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of timematcher
Sent: Tuesday, October 13, 2009 11:35 PM
To: r...@yahoogroups.com
Subject: Re: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
Hi
It does not exhibit this behavior when connected to PC's Serial Port.
It only manifests such behavior when connected to rabbit BL2100 serial Port.
I am using Serial port C only, using the 3-pin combination(Rx,Tx, GND).
CTS and RTS are Shorted together.
DCD, DSR and DTR shorted together.
===========================
The mistake i was doing was:
===========================
I did a hard reset and forgot to execute and save the following:
=========================
AT+IFC=0,0; //Original AT+IFC? = 2,2
AT&W
=========================
So after doing that it got solved. A flow control problem indeed.
Thanks a lot for the advice due to which i was able to find it out.
Regards
--- In r...@yahoogroups.com
,
"Dave McLaughlin" wrote:
>
> Could it be that you are not using handshaking and the modem is still
configured for this? Just a thought.
>
> Does it exhibit this behaviour when connected to the PC serial port or
just on the Rabbit. If on both I would check with the manufacturer that
there is not a fix for this?
>
> 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 timematcher
> Sent: 13 October 2009 14:19
> To: r...@yahoogroups.com
> Subject: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED} GPRS PPP
Problem failure connecting and sending email
>
> Currently i am experiencing problems with the modem's unreliable
behaviour. It stops responding to AT commands sometimes and i have to power
cycle the modem.
> Regards
> AM.
>

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )RE: {Disarmed} RE: {Disarmed} RE: {Disarmed} {DISARMED} GPRS PPP Problem failure connecting and sending email - Dave McLaughlin - Oct 14 23:00:13 2009
Hi Jim,
It is not that difficult to write the MODBUS TCP/IP stuff for Rabbit. All
the code is in the samples except for the bit that sends it over the TCP/IP
link. This you need to write yourself depending on how your network is
configured.
I have done this with TCP/IP over GPRS but it also works on Ethernet. The
code I have is UCOS II based.
If you get stuck and do indeed need help, give me a shout?
Regards
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 Jim Ashby
Sent: 14 October 2009 22:30
To: r...@yahoogroups.com
Subject: {Disarmed} RE: {Disarmed} RE: {Disarmed} [rabbit-semi] {DISARMED}
GPRS PPP Problem failure connecting and sending email
OK, I need some help writing some MODBUSS / TCPIP code to communicate to a
Festo pneumatic control block, and I am willing to pay for this assistance.
Anyone interested?
Respond directly by email to j...@idesolutions.us
Jim C Ashby III
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Problem with DEFAULT GATEWAY on rabbit 3720 - Stefan - Oct 15 8:28:29 2009
hi all
We developed a PC application that communicates with a rabbit 3720 module with UDP
protocol.
The module should be placed in a building where there are multiple VLANs. For example:
the Rabbit IP is 10.4.17.222 (static IP)
netmask 255.255.255.0
and it's placed on VLAN that have a server with 10.4.17.222.
When the application is put on the server everything goes perfectly.
Problem occurs when the application is put on a computer in another VLAN that have:
ip: 10.4.20.80
netmask: 255.255.255.0
default gateway: 10.4.20.1
Application packets sent reach the module, but no packets sent by Rabbit reach the
destination.
I tried to understand why, but no results.
I think it is a problem with the default gateway.
I mention that networks has no restrictions of any kind.
function of reciving the packages is:
char receive_packet(char* buf_udp)
{
int i;
//char buf_udp[N];
tcp_tick(NULL);
memset(buf_udp,'\0',N);
/* receive the packet */
if (udp_recv(&udp_client.sock, buf_udp, N)>0)
return 1;
udp_open(&udp_client.sock, LOCAL_PORT, -1, 1234, NULL);
return 0;
}
function of sending the packages is:
void send_packet(char buf_udp[],int length)
{
auto int retval;
/* send the packet */
retval = udp_send(&udp_client.sock, buf_udp, length);
if (retval < 0)
{
printf("Error sending datagram! Closing and reopening socket...\n");
// if (sequence == 1) {
// printf(" (initial ARP request may not have finished)\n");
// }
sock_close(&udp_client.sock);
if(!udp_open(&udp_client.sock, LOCAL_PORT, 0, 1234, NULL)) {
printf("udp_open failed!\n");
// exit(0);
}
}
tcp_tick(NULL);
}
Socket initialisation function is:
unsigned char ethernet_init(long szIP,long szNetMask,long szRouter)
{
if ( sock_init() != 0 )
{
//printf( "ETHERNET Error: sock_init\n" );
return 0;
}
while (ifpending(IF_DEFAULT) == IF_COMING_UP) {
tcp_tick(NULL);
}
if ( ifconfig(
IF_ETH0,
IFS_IPADDR, resolve("10.4.17.222"),
IFS_NETMASK, resolve( "255.255.255.0" ),
IFS_ROUTER_SET, resolve( "192.168.1.1" ),
IFS_NAMESERVER_SET, resolve( "192.168.1.1" ),
IFS_UP,
IFS_END
) != 0 )
{
//puts( "ETHERNET Error: ifconfig\n" );
return 0;
}
return 1;
}
Any help will be appreciated.
Regards
Stefan
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
Re: Problem with DEFAULT GATEWAY on rabbit 3720 - Dan Allen - Oct 15 22:10:00 2009
Your gateway must be in the same network as your RCM.
IFS_ROUTER_SET, resolve( "192.168.1.1" ),
should be IFS_ROUTER_SET, resolve( "10.4.17.x" ), (x == gateway device)
Dan...
On Thu, Oct 15, 2009 at 6:59 AM, Stefan
wrote:
> hi all
>
> We developed a PC application that communicates with a rabbit 3720 module
> with UDP protocol.
> The module should be placed in a building where there are multiple VLANs.
> For example:
> the Rabbit IP is 10.4.17.222 (static IP)
> netmask 255.255.255.0
>
> and it's placed on VLAN that have a server with 10.4.17.222.
>
> When the application is put on the server everything goes perfectly.
> Problem occurs when the application is put on a computer in another VLAN
> that have:
> ip: 10.4.20.80
> netmask: 255.255.255.0
> default gateway: 10.4.20.1
>
> Application packets sent reach the module, but no packets sent by Rabbit
> reach the destination.
> I tried to understand why, but no results.
> I think it is a problem with the default gateway.
> I mention that networks has no restrictions of any kind.
>
> function of reciving the packages is:
>
> char receive_packet(char* buf_udp)
> {
> int i;
> //char buf_udp[N];
>
> tcp_tick(NULL);
> memset(buf_udp,'\0',N);
>
> /* receive the packet */
> if (udp_recv(&udp_client.sock, buf_udp, N)>0)
> return 1;
> udp_open(&udp_client.sock, LOCAL_PORT, -1, 1234, NULL);
> return 0;
>
> }
>
> function of sending the packages is:
>
> void send_packet(char buf_udp[],int length)
> {
> auto int retval;
>
> /* send the packet */
> retval = udp_send(&udp_client.sock, buf_udp, length);
> if (retval < 0)
> {
> printf("Error sending datagram! Closing and reopening socket...\n");
> // if (sequence == 1) {
> // printf(" (initial ARP request may not have finished)\n");
> // }
> sock_close(&udp_client.sock);
> if(!udp_open(&udp_client.sock, LOCAL_PORT, 0, 1234, NULL)) {
> printf("udp_open failed!\n");
> // exit(0);
> }
> }
> tcp_tick(NULL);
> }
> Socket initialisation function is:
> unsigned char ethernet_init(long szIP,long szNetMask,long szRouter)
> {
> if ( sock_init() != 0 )
> {
> //printf( "ETHERNET Error: sock_init\n" );
> return 0;
> }
> while (ifpending(IF_DEFAULT) == IF_COMING_UP) {
> tcp_tick(NULL);
> }
>
> if ( ifconfig(
> IF_ETH0,
> IFS_IPADDR, resolve("10.4.17.222"),
> IFS_NETMASK, resolve( "255.255.255.0" ),
> IFS_ROUTER_SET, resolve( "192.168.1.1" ),
> IFS_NAMESERVER_SET, resolve( "192.168.1.1" ),
> IFS_UP,
> IFS_END
> ) != 0 )
> {
>
> //puts( "ETHERNET Error: ifconfig\n" );
> return 0;
> }
>
> return 1;
> }
>
> Any help will be appreciated.
>
> Regards
>
> Stefan
>
>
>
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

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