This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ppp_is_up never TRUE

I manage to run ppp to connect GPRS using GSM modem Dail *99# and its working at least kinda
But problem is It send USART AT command and modem return CONNECT I debug it using logic analyzer up to this stage after that RTE send a data packet and provider keep sending me data packets then suddenly the GSM modem return NO CARRIER and PPP_is_up never goes true
GSM modem is SIM900 and MCU is STM32F107RCT6 MDK5.01 will try to UPDATE it to MDK 5.
Code I user is like this

int main (void) { uint64_t PPP_timeout_counter=0; //osDelay(1000); net_initialize (); GPIO_PortClock(GPIOB,ENABLE); GPIO_PinConfigure(GPIOB,9,GPIO_OUT_PUSH_PULL,GPIO_MODE_OUT50MHZ); GPIO_PinConfigure(GPIOB,0,GPIO_OUT_PUSH_PULL,GPIO_MODE_OUT50MHZ); osDelay(100000); while(1) { net_main ();

GPIO_PinWrite(GPIOB,9,1);

osDelay(10000); GPIO_PinWrite(GPIOB,9,0);

osDelay(10000); //osDelay(5); //GPIO_PinWrite(GPIOB,9,0);

if (ppp_is_up()) { osDelay(100); GPIO_PinWrite(GPIOB,9,1); osDelay(100); GPIO_PinWrite(GPIOB,9,0);

} else { ppp_connect("*99***1#","",""); PPP_timeout_counter=0; while(!ppp_is_up()&&PPP_timeout_counter<PPP_TO) { PPP_timeout_counter++;// to time out wait for PPP to connect osDelay(PPP_TD); } osDelay(100); GPIO_PinWrite(GPIOB,9,1); osDelay(100); GPIO_PinWrite(GPIOB,9,0); osDelay(100); GPIO_PinWrite(GPIOB,9,1); osDelay(100); GPIO_PinWrite(GPIOB,9,0); osDelay(100); GPIO_PinWrite(GPIOB,9,1); osDelay(100); GPIO_PinWrite(GPIOB,9,0); }

if (ppp_is_up() && tcp_get_state(socket1)!=tcpStateESTABLISHED) { GPIO_PinWrite(GPIOB,0,1); socket1=tcp_get_socket(TCP_TYPE_CLIENT,0,5,tcp_callback1); if(socket1!=NULL) { } tcp_connect(socket1,IPDest,81,0);

} if(tcp_get_state(socket1)==tcpStateESTABLISHED) { uint8_t *sendbuf; strcpy((char *)sendbuf,"test\0"); tcp_send(socket1,sendbuf,4); osDelay(1000); tcp_close(socket1); osDelay(100); ppp_close(); GPIO_PinWrite(GPIOB,0,1); osDelay(10000); }

osThreadYield (); }

}

Yet another thing is after MODEM send NO CARRIER Program stop executing after a while or at least it seam to

Parents Reply Children
No data