wip_bearerStart returns WIP_BERR_PARAM "bug or not a bug"


#1

Hi,

Here the peudo code:

//--------------
// First connexion (success)
//--------------
wip_netInit()
wip_bearerOpen( GPRS )
wip_bearerSetOps( APN, Login, Pass)
wip_bearerStart() (returns WIP_BERR_OK_INPROGRESS)
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
// Just close
wip_bearerClose()
wip_netExit()

//--------------
// Second connexion (failed)
//--------------
wip_netInit()
wip_bearerOpen( GPRS )
wip_bearerSetOps( APN, Login, Pass)
wip_bearerStart() (returns WIP_BERR_PARAM)
[GPRS]: start: GPRS setup failed: -3
// Just close
wip_bearerClose()
wip_netExit()

If I just start and close the bearer: the second (and the others) connexion failed unless I perform a AT+CGATT=0. Why ?
What does “[GPRS]: start: GPRS setup failed: -3” mean ?

But if I create a TCP socket and manage it correctly, between the bearerStart and the bearerClose, all the connexions works…

Any idea ?

THanks !


#2

More info:

THe problem appears when I call wip_bearerClose/wip_netExit before the ADL_GPRS_EVENT_ACTIVATE_OK and after the ADL_GPRS_EVENT_SETUP_OK !
In this case, I need to issue the AT+CGACT=0,1 (rather than the AT+CGATT=0) command.

Is there any reason to not be able to call the wip_bearerClose/wip_netExit before the ADL_GPRS_EVENT_ACTIVATE_OK ?
Is it a bug or a “normal” behavior ?

Thanks.