Auto attachment to GPRS?

Hello everyone again,

I’ve just received a couple of new devices to take a shufti at, and I would love to get a couple of things clarified about their behavior.

In the past I’ve been using some Q2687’s and I’ve now got some Q26Extremes.
I notice that after booting I’m getting the GPRS event:


sporadically even though nothing as been started yet (i.e. sitting there idle).

Now I’ve had a look and the only main difference I can see, at this early point, between this new device and the old is the result of:


Where only the Q26Extreme has the result:

+WGPRS: 2,0,1

I understand from the docs that is: ‘sets ACTIVABLE automatically after init a define PDP context’
(which I wouldn’t take to mean try to attach. … ?)

The code that I would take to mean ‘attempt to attach automatically’ is the same in both as:

+WGPRS: 0,1

(I read the docs that +WGPRS: 0,0 would mean that it should attach automatically?)

Am I mis-understanding some fundamentals here? My understanding is that the device should (attempt to) attach when you want to connect, in my case, using wip_bearerOpen, wip_bearerSetOpts, wip_bearerStart.
Is there another configuration detail that I’ve missed so far?

Another issue ('m considering splitting this into a separate post, if this is considered better taste please let me know) is that the 2 devices act differently.

I’ve flashed the firmware to 7.44 on both and uploaded the application (different apps for each device as they are 2 parts of the same project, but the gprs code is the same).
The 1st device connects fine, but when the 2nd device attempts to it initially doesn’t but the 2nd attempt (some time later) appears to get it sorted.

I’ve taken a trace of the two, I can see where it’s different, but not why it might be.
First attempt (this is after a fresh power-up)
(the ‘|B|’ lines are diagnostic messages from my bearer event handler)

[GPRS]: GPRS CTX (cid=1) found
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate

[GPRS]: GPRS CTX (cid=1) found

|B| Bearer Event Handler
[WIP]  No more ctx, call adl_gprsUnsubscribe()

and the 2nd (a little later in the same run):

[GPRS]: start: -> CONNECTING
[GPRS]: GPRS CTX (cid=1) found
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate

[GPRS]: GPRS CTX (cid=1) found

|B| Bearer Event Handler
|B| Connected


Would anyone be able to point me the right direction to figure this stuff out?
It’s a little frustrating as I’m not doing anything before or after the first attempt and yet the 2nd works and it does this every time.

Any information that anyone could shed would be most appreciated, for now i’ll continue digging.

An update . . .

With regard to the ADL_GPRS_EVENT_ACTIVATE_KO ‘issue’ I’ve been able to implement better handling of it (wasn’t until recently I’ve come across this issue :stuck_out_tongue:)

Simply put i wasn’t handling the WIP_BEV_CONN_FAILED event :stuck_out_tongue:
so pretty much I try to connect again if I receive this event (there is more code than this, but it suits as an example of my fix).

I’m still not sure why I get this error sometimes though (especially after a fresh startup, would have thought it’ll be ready for anything :wink: ).