Trouble Establishing Network


#1

Hi There,

I am having issues connecting to the network (GPRS/IP). I am using standard TCP/IP sample that came along with the M2MStudio. Following is what I see:

If during initialization I see the FOLLOWING messages, network is UP and AT+CGPADDR command shows me the IP address assigned.

[GPRS]: start: -> CONNECTING
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
[GPRS]: GPRS EVENT: 27 (cid=1)
[GPRS]: GPRS EVENT ACTIVATE OK (cid=5)
[GPRS]: GPRS: -> CONNECTED

If during initialization I see the FOLLOWING messages, network is DOWN and AT+CGPADDR command shows me no IP address.

[GPRS]: start: -> CONNECTING
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
[GPRS]: GPRS EVENT: 27 (cid=1)
[GPRS]: GPRS EVENT SETUP/ACTIVATE KO (cid=5): -> DISCONNECTED

Everytime I see this, my only solution is to do at+cfun=1 or reboot the radio. Is there any API or AT command set to fix this with out having to physically restart the radio?

Thanks,
H


#2

Hi,

Using the Open AT application when the IP address has become invalid WIP_BEV_IP_DISCONNECTED will be received. Now the IP needs renewal and hence a

wip_bearerStart () should be called. The following code snippet can be used to renew the IP and connect to network again.

case WIP_BEV_IP_DISCONNECTED:
          	Send_Response( ADL_AT_PORT_TYPE( ADL_PORT_UART1, ADL_AT_UNS ), "+GPRS: DISCONNECTED\r\n" );
            	wm_strcpy( gprs_why, "IPD" );
            	wip_bearerStop( bearer );
             	break;

case WIP_BEV_STOPPED:
         	wm_strcat( gprs_why, "BEV_ST" );
             	gprs_init_pending = TRUE;
             	gprs_active = FALSE;
            	Gprs_Init();
             	break;

Where the Gprs_Init(); performs the wip_bearerStart.