CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Thuraya sm2500 gprs connection with CCS tcp/ip stack 3.75

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zaltun



Joined: 15 Jun 2011
Posts: 1

View user's profile Send private message

Thuraya sm2500 gprs connection with CCS tcp/ip stack 3.75
PostPosted: Wed Jun 15, 2011 7:53 am     Reply with quote

Hi all,
We are making a board that will make a gprs connection over Thuraya sm 2500 module. The problem is the sm-2500 doesn't have tcp/ip stack implemented.
So we are using the Microchip tcp/ip stack 3.75 which is converted to CCS compiler with 18F46K20.
After sending ,
AT+CGDCONT = 1,"IP","get"
ATD*99#
I get connect and then PPP starts (many chars comes and goes)
but soon I get "Normal Termination by NCP" ERROR and disconnects.

Hope someone can help me.
Thanks.
Code:

while(TRUE) {

if (!ppp_is_connected() && !ppp_is_connecting()) {
printf(lcd_putc,"\fDialing");
delay_ms(1000);
fprintf(MODEM,"AT+cmee=2\r");
delay_ms(1000);
fprintf(MODEM,"ATE1V1&D2&C1S0=0\r");
delay_ms(1000);
fprintf(MODEM,"AT+CGDCONT = 1,\"IP\",\"get\"\r");
delay_ms(1000);
resp=ppp_connect(ppp_username, ppp_password, ppp_phonenumber);

if (resp==MODEM_BUSY) {
printf(lcd_putc,"\fBusy Signal");
delay_ms(2000);
}
else if (resp==MODEM_NO_DIALTONE) {
printf(lcd_putc,"\fNo Dialtone");
delay_ms(2000);
}
else if (resp!=MODEM_CONNECTED) {
printf(lcd_putc,"\fDial Error");
delay_ms(2000);
}
else {
printf(lcd_putc,"\f%LUbps", connected_baudrate);
printf(lcd_putc,"\nNegotiating PPP");
}

}

StackTask();
HTTPTask();
LCDTask();
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group