# Q2686 GPRS problem

**URL:** <https://forum.sierrawireless.com/t/q2686-gprs-problem/4829>\
**Category:** Legacy AirPrime modules\
**Created:** [January 14, 2011, 7:51am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829 "2011-01-14T07:51:37Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 14, 2011, 7:51am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/1 "2011-01-14T07:51:37Z")

</div>

Hai,

Am using Q2686G.  
The firmware version is :: R74\_00gg.Q2686G  
Application OS :: 06.21  
Boot loader version :: V08b0e

When trying to connect to GPRS, getting the Cid Info is giving problem.

what am doing is,

1. waiting for WIND: 7 event

2. Then doing GPRS setup [with Cid as ‘1’]and handler subscribe, both are returning OK

3. In handler, am receving  
i. Event::25[ADL\_GPRS\_EVENT\_SETUP\_OK] with Cid::1. Then am doing adl\_gprsAct(1).This also returning OK  
ii. then, receiving Event::27[ADL\_GPRS\_EVENT\_ME\_ATTACH] with Cid::1, in shell am getting

4. adl\_gprsGetCidInformations(Cid,info) giving error as , “ADL\_RET\_ERR\_PARAM -ERROR”

Why the Cid is changed to 5[bcoz, they mentioned it is b/w 0-4 only] when the event “ADL\_GPRS\_EVENT\_ACTIVATE\_OK” ?

Am i calling adl\_gprsGetCidInformations(Cid,info) in correct place?

Please help me with is… Thank you…

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 14, 2011, 9:28am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/2 "2011-01-14T09:28:27Z")

</div>

> [@aezakmi](#):
>
> 1. waiting for WIND: 7 event.

Why do you think that is an appropriate event to wait for?  
Check the meaning of this event…

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 14, 2011, 9:52am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/3 "2011-01-14T09:52:53Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > 1. waiting for WIND: 7 event.
> 
> Why do you think that is an appropriate event to wait for?  
> Check the meaning of this event…

In our forum, one of our friend told to wait for event “WIND : 4”[product is ready to process AT commands.]

I did that. But i cant get anything different. Problem remain the same.

“WIND :7” will come, when the n/w service is available for emergency call. I tried that. that time, i got some more lines in shell,  
" +WIND: 15,1,“Airtel”,2,“Airtel”,3,“+22”,4,“11/01/14,09:44:48+22”,6,“0” "

Is it wrong? Why the Cid value changed to 5. Its limit is[0-4] only.

Thank you awneil

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 14, 2011, 10:59am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/4 "2011-01-14T10:59:41Z")

</div>

> [@aezakmi](#):
>
> In our forum, one of our friend told to wait for event “WIND : 4”[product is ready to process AT commands.]

It’s ready to process AT commands - but it does not have any network service

> [@](#):
>
> “WIND :7” will come, when the n/w service is available for emergency call.

In this state, only an emergency call is allowed; no other network access is possible - that includes GPRS attach.

Need to wait until unit is registered - either on the “home” network, or Roaming…

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 14, 2011, 1:15pm UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/5 "2011-01-14T13:15:52Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > In our forum, one of our friend told to wait for event “WIND : 4”[product is ready to process AT commands.]
> 
> It’s ready to process AT commands - but it does not have any network service
> 
> > [@](#):
> >
> > “WIND :7” will come, when the n/w service is available for emergency call.
> 
> In this state, only an emergency call is allowed; no other network access is possible - that includes GPRS attach.
> 
> Need to wait until unit is registered - either on the “home” network, or Roaming…

Sir,  
Thank you for your replay. I waited for a long time. But after WIND: 7 , also some events related to SMS and calls are only coming. I checked in user guide. Can not find any API to check or to do registration . Kindly help me .

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 14, 2011, 1:33pm UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/6 "2011-01-14T13:33:11Z")

</div>

> [@aezakmi](#):
>
> Can not find any API to check or to do registration.

There isn’t one. 😠  
See: [New Features - Complete API - #15 by awneil](https://forum.sierrawireless.com/t/new-features-complete-api/3305/15)

So you’ll have to make do with AT Commands - just as you did with the +WIND: unsolicited responses…

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 17, 2011, 8:46am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/7 "2011-01-17T08:46:23Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > Can not find any API to check or to do registration.
> 
> There isn’t one. 😠  
> See: [New Features - Complete API - #15 by awneil](https://forum.sierrawireless.com/t/new-features-complete-api/3305/15)
> 
> So you’ll have to make do with AT Commands - just as you did with the +WIND: unsolicited responses…

Thank you awneil. Now, I installed GPRS hadler after the unit is ready to process the AT commands. Then, after the GPRS handler received, the “ADL\_GPRS\_EVENT\_ME\_ATTACH”, am calling the GPRS setup function. Now, the Cid is not changing and am getting the DNS1,local ip .

But, when i call “wip\_TCPClientCreate” with one IP and port number[In which am already running server], the create is returning OK . But when i try to transmit some data using GPRS using “wip\_write” it is giving error as, " WIP\_CEV\_ERROR" and error number is “-989”. Saying Destination Host is Un-reachable. But that host is up and waiting in that socket.

Is there any way to confirm the GPRS functionality ?

Thank you,

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 17, 2011, 8:54am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/8 "2011-01-17T08:54:33Z")

</div>

> [@aezakmi](#):
>
> after the GPRS handler received, the “ADL\_GPRS\_EVENT\_ME\_ATTACH”

Note that the unit does not necessarily automatically GPRS-Attach.

You are lucky that yours just happens to - but that might stop if you change settings and/or change provider, etc.

I think it is safer to wait for GSM Registration (GSM Attach).

> [@](#):
>
> Saying Destination Host is Un-reachable. But that host is up and waiting in that socket.

But is it reachable?

ie, is it a “Public” IP address that the module can “see”?

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 17, 2011, 9:55am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/9 "2011-01-17T09:55:20Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > after the GPRS handler received, the “ADL\_GPRS\_EVENT\_ME\_ATTACH”
> 
> Note that the unit does not necessarily automatically GPRS-Attach.
> 
> You are lucky that yours just happens to - but that might stop if you change settings and/or change provider, etc.
> 
> I think it is safer to wait for GSM Registration (GSM Attach).
> 
> > [@](#):
> >
> > Saying Destination Host is Un-reachable. But that host is up and waiting in that socket.
> 
> But is it reachable?
> 
> ie, is it a “Public” IP address that the module can “see”?

ok sir. I will change the code to wait for GSM attach.

And regarding the client socket, the server is up and it is public IP. I can connect to that sever using another system, using the same SIM card.

I called “wip\_netInit” at the beginning itself.I am creating the client socket after i get the “ADL\_GPRS\_EVENT\_ACTIVATE\_OK”.

" if( (client = wip\_TCPClientCreate( servIpAddr,port,(wip\_eventHandler\_f)&Handler2, NULL ))==NULL)  
adl\_atSendResponse ( ADL\_AT\_UNS,“\n ERROR:wip\_TCPClientCreate\n”);  
else  
{  
adl\_atSendResponse ( ADL\_AT\_UNS,“\n OK:: wip\_TCPClientCreate\n”);  
nwrite=wip\_write(client, “HAI”, strlen(“HAI”);

```
} "

```

But, in handler am receiving “WIP\_CEV\_ERROR” with error number:: -989

Thank you,

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 17, 2011, 10:41am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/10 "2011-01-17T10:41:47Z")

</div>

> [@aezakmi](#):
>
> I called “wip\_netInit” at the beginning itself.I am creating the client socket after i get the “ADL\_GPRS\_EVENT\_ACTIVATE\_OK”

If you’re using WIP, then you should use the WIP events - in this case, WIP\_BEV\_IP\_CONNECTED.

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 18, 2011, 7:07am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/11 "2011-01-18T07:07:08Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > I called “wip\_netInit” at the beginning itself.I am creating the client socket after i get the “ADL\_GPRS\_EVENT\_ACTIVATE\_OK”
> 
> If you’re using WIP, then you should use the WIP events - in this case, WIP\_BEV\_IP\_CONNECTED.

thank you awneil. With out using GPRS event handler, now i tried.  
I called “wip\_netInit” at the beginning. Then waiting for event 15 to occur. [till the CPU receive NITZ info from network]. I get,  
" +WIND: 15,1,“Airtel”,2,“Airtel”,3,“+22”,4,“11/01/18,07:01:14+22”,6,“0” "

after that i called gprs bearer function which will do, wip\_bearerOpen, wip\_bearerSetOpts, and wip\_bearerStart . but wip\_bearerStart get failed with following error,

wip\_bearerStart failed:-27 -ERROR WIP\_BERR\_OK\_INPROGRESS .

it is saying “Connection started, an event will be sent after completion” . But am not at all getting the “WIP\_BEV\_IP\_CONNECTED”

Thank you very much,

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 18, 2011, 7:45am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/12 "2011-01-18T07:45:44Z")

</div>

> [@aezakmi](#):
>
> Then waiting for event 15 to occur. [till the CPU receive NITZ info from network]. I get,  
> " +WIND: 15,1,“Airtel”,2,“Airtel”,3,“+22”,4,“11/01/18,07:01:14+22”,6,“0” "

Not a good idea, I’m afraid.

Not all networks give NITZ at all, and some that do only give it after GPRS attach.  
So it’s no better than waiting for GPRS-Attach - but possibly worse!

As I said to you before:

> [@I](#):
>
> I think it is safer to wait for GSM Registration (GSM Attach).

> [@aezakmi](#):
>
> but wip\_bearerStart get failed with following error,  
> wip\_bearerStart failed:-27 -ERROR WIP\_BERR\_OK\_INPROGRESS

No, that is not a failure at all - that is perfectly normal behaviour!  
See: [Documentation Unhelpful/Misleading: WIP\_BERR\_OK\_INPROGRESS - #3 by medhat](https://forum.sierrawireless.com/t/documentation-unhelpful-misleading-wip-berr-ok-inprogress/3706/3)

> [@aezakmi](#):
>
> But am not at all getting the “WIP\_BEV\_IP\_CONNECTED”

If you don’t get WIP\_BEV\_IP\_CONNECTED, you should get WIP\_BEV\_CONN\_FAILED

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 18, 2011, 8:28am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/13 "2011-01-18T08:28:47Z")

</div>

See also: [https://forum.sierrawireless.com/t/wip-initializing-a-gprs-bearer-example-is-wrong/4836/1](https://forum.sierrawireless.com/t/wip-initializing-a-gprs-bearer-example-is-wrong/4836/1)

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 18, 2011, 12:00pm UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/14 "2011-01-18T12:00:38Z")

</div>

> [@awneil](#):
>
> > [@aezakmi](#):
> >
> > Then waiting for event 15 to occur. [till the CPU receive NITZ info from network]. I get,  
> > " +WIND: 15,1,“Airtel”,2,“Airtel”,3,“+22”,4,“11/01/18,07:01:14+22”,6,“0” "
> 
> Not a good idea, I’m afraid.
> 
> Not all networks give NITZ at all, and some that do only give it after GPRS attach.  
> So it’s no better than waiting for GPRS-Attach - but possibly worse!
> 
> As I said to you before:
> 
> > [@I](#):
> >
> > I think it is safer to wait for GSM Registration (GSM Attach).
> 
> > [@aezakmi](#):
> >
> > but wip\_bearerStart get failed with following error,  
> > wip\_bearerStart failed:-27 -ERROR WIP\_BERR\_OK\_INPROGRESS
> 
> No, that is not a failure at all - that is perfectly normal behaviour!  
> See: [Documentation Unhelpful/Misleading: WIP\_BERR\_OK\_INPROGRESS - #3 by medhat](https://forum.sierrawireless.com/t/documentation-unhelpful-misleading-wip-berr-ok-inprogress/3706/3)
> 
> > [@aezakmi](#):
> >
> > But am not at all getting the “WIP\_BEV\_IP\_CONNECTED”
> 
> If you don’t get WIP\_BEV\_IP\_CONNECTED, you should get WIP\_BEV\_CONN\_FAILED

thank you awneil… now i am trying with new sim card. As you warned me,this is not returning NITZ. Thank you.  
so, i am sending “AT+CREG=1” command using adl\_atCmdCreate API. After this API’s success, i am calling gprs setup function.

Now am getting WIP\_BERR\_OK\_INPROGRESS and after some time WIP\_BEV\_CONN\_FAILED. Am getting WIP\_BOPT\_ERROR value as 4. " WIP\_BOPT\_ERROR::4 " .

But its not negative, and this error code is not listed in document.

Thank you very much …

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 18, 2011, 1:11pm UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/15 "2011-01-18T13:11:59Z")

</div>

> [@awneil](#):
>
> See also: [WIP "Initializing a GPRS Bearer" example is WRONG!](https://forum.sierrawireless.com/t/wip-initializing-a-gprs-bearer-example-is-wrong/4836/1)

how can i know the local ip assigned to the unit after connecting to GPRS when using “WIP” . Is there any thing like getCidInfo API.

Thank you,

---

<div class="post-metadata">

**Author:** ![josepvr](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@josepvr](https://forum.sierrawireless.com/u/josepvr)\
**Post date:** [January 18, 2011, 1:53pm UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/16 "2011-01-18T13:53:09Z")

</div>

> [@aezakmi](#):
>
> how can i know the local ip assigned to the unit after connecting to GPRS when using “WIP” . Is there any thing like getCidInfo API.  
> Thank you,

```auto
s8 err;
ascii IpAddr[15];
wip_in_addr_t appIpAddr;
err = wip_bearerGetOpts(bearer,WIP_BOPT_IP_ADDR,&appIpAddr,WIP_BOPT_END);
wip_inet_ntoa(appIpAddr, IpAddr,15);
```

---

<div class="post-metadata">

**Author:** ![aezakmi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aezakmi](https://forum.sierrawireless.com/u/aezakmi)\
**Post date:** [January 19, 2011, 3:38am UTC](https://forum.sierrawireless.com/t/q2686-gprs-problem/4829/17 "2011-01-19T03:38:07Z")

</div>

> [@josepvr](#):
>
> > [@aezakmi](#):
> >
> > how can i know the local ip assigned to the unit after connecting to GPRS when using “WIP” . Is there any thing like getCidInfo API.  
> > Thank you,
> 
> ```auto
> s8 err;
> ascii IpAddr[15];
> wip_in_addr_t appIpAddr;
> err = wip_bearerGetOpts(bearer,WIP_BOPT_IP_ADDR,&appIpAddr,WIP_BOPT_END);
> wip_inet_ntoa(appIpAddr, IpAddr,15);
> ```

got it. thank you josep
