zaltun
Joined: 15 Jun 2011 Posts: 1
|
Thuraya sm2500 gprs connection with CCS tcp/ip stack 3.75 |
Posted: Wed Jun 15, 2011 7:53 am |
|
|
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(); |
|
|