Bearer events don't happen

Hi!

Debugging my code I notice that bearer’s events don’t take place. I subscribe modem’s sim, open the bearer, setup bearer’s options, and then start it, in that order. At some times it’s supposed to happen an event which makes the code goes through the handler I define, and the first thing that it does is print a message through serial port. This message is never shown, even if I give modem 30-50 segs to make the registration. Afterwards the modem start doing different things until it resets. Everything is done in the main task, as there is no other.

Can anyone give me some guidance on how to debug it?

Thank you!

Try opening and setting up bearer after registration is achieved.

Rudolf

Thank you for your answer Rudolfl. It seems it keeps going to the timeout. This is are the debugging messages I put to the code to see whats happenning.

Initiating launch sequence…

Initialized…

// Initialization of network starts here

Initialization delay //15 secs

AT+CREG?
+CREG: 0,0

OK

+WIND: 1

AT+CREG?
+CREG: 0,2

OK

+WIND: 16

AT+CREG?
+CREG: 0,2

OK

+WIND: 7

AT+CREG?
+CREG: 0,1

OK

+WIND: 4

+WIND: 10,“SM”,0,“FD”,0,“ON”,0,“SN”,0,“EN”,0

+WIND: 11,“F2091B217C46FA48F19319EF4DE12495”,“56A7DAEB1BE67DE0A601A2A35BF375F3”,“9E5A4518994A9F33F64DB3CE480256D0”

AT+CREG?
+CREG: 0,1

OK

Sim subscription

Activating GPRS.

Openning bearer

wip_bearerOpen

wip_bearerSetOpts+dns

Starting bearer.

Setting routine. // This is the routine we’ll jump in case bearer is started

gprsStart

wip_bearerStart

ResWip // ResWip = wip_bearerStart(…)

-27 // So openning, we waits 30 seconds now.

Timeout.

wip_bearerStart // In case it fails, try another time before going idle

ResWip

-28 // Another connection in course

OK // Seems the watchdog resets because we came idle…

+WIND: 13

I tried som AT+CSQ during connection, returns 20,1, so it doesn’t seem an antenna problem.

It’s worth to say that code won’t reach wip_bearerStart until every single step returns ok values, if any one fails, modem is reset.

Do you have any other sugestion?

Thank you!

I think you may have wrong APN and/or user name password. Perhaps SIM does not have data services activated?
My steps in activating GPRS are: (simplified form without error checking)
wip_bearerOpen( &gprs_bearer, // My variable defined as wip_bearer_t gprs_bearer;
“GPRS”,
wvc_gprsHandler, // my event hadler
NULL );
wip_bearerSetOpts( gprs_bearer,
WIP_BOPT_GPRS_APN, GPRS_APN,
WIP_BOPT_LOGIN, GPRS_USER,
WIP_BOPT_PASSWORD, GPRS_PASSWORD,
WIP_BOPT_END );
wip_bearerStart( gprs_bearer );

Also, watchdog should not kick in unless you are stuck in the loop somewhere.

Rudolf

I’m afraid it is not a wrong APN or login configuration as far as Sierra wireless tcp example works with this configuration, with the same modem, and the same SIM. Everything looks in the same fashion it should be, but Sierra Wireless examples success where my code fails.

Do you have another suggestion?

I’m really desperate with this as my deadline comes tomorrow and it seems it’s an OS bug. Could any developer contact me by private message, my distrib has no developer who could review my code, and I’ve spent sooo many time reading documentation, posting in this forum, and testing my migrated app, without success.

Thank you in advance!

Hi,

How do you close or stop the bearer , after the wip_bearerStart function ?