Q2686- client socket FCM issue


#1

Hai,
Am using Q2686G.
The firmware version is :: R74_00gg.Q2686G
Application OS :: 06.21
Boot loader version :: V08b0e.

when using wip_TCPClientCreate() API, some times,the WIP_CEV_OPEN is received in handler immediately . But in some other time WIP_CEV_OPEN is not at all get received in the event handler even the socket creation is done successfully.Rebooting the unit is helping some time, but not all the time.

What is the reason behind this? Why the event WIP_CEV_OPEN is not invoked all the time? and what may the remedy for this?

Thank you,


#2

How do you know that it’s done successfully?


#3

bcoz,
1. Before calling this API, the unit is connected to internet and got one IP.
2. And “wip_TCPClientCreate” is NOT returning a NULL value.

       Its almost  invoking WIP_CEV_OPEN 95% of time. some times only the handler didn't get called. 

So, i confirmed about the socket thing.

Or is there any other way to confirm that?


#4

Of course, you can’t create a socket if you don’t have an IP address - but simply having one is no guarantee that creating a socket will work!

That simply indicates that it was able to initiate creating the socket - again, it is no guarantee that creating the socket will work!

Are you sure that it doesn’t get called at all?

Are you handling the WIP_CEV_ERROR case?

How long are you waiting?


#5

[quote=“awneil”]

Of course, you can’t create a socket if you don’t have an IP address - but simply having one is no guarantee that creating a socket will work!

That simply indicates that it was able to initiate creating the socket - again,

can you tell any way to ensure the socket creation is success?That will help me a lot

i waited for around 20 minutes. It doesn’t get called

yes awneil, i am handling WIP_CEV_ERROR

]
around 20 min. If i reboot the unit means, some times, say 70% of time, it works fine. But, in remote site who will reboot?. really i can’t get why this is happening?

thank you awneil,


#6

WIP indicates state changes of the socket to you via the WIP_CEV_ events.

Look at the State Diagram given in the WIP User Guide.

Your application must include timeouts on all waits - and have appropriate recovery mechanisms on timeout (and other) errors.

After wip_TCPClientCreate() you certainly should get either WIP_CEV_OPEN or WIP_CEV_ERROR - again, see that State Diagram given in the WIP User Guide.

Are you sure that you have a reliable bearer connection?

Can you connect reliably to the same host over GPRS from a PC?

WIP Debugging Tips:
https://forum.sierrawireless.com/t/wip-beareropen-returning-wip-berr-bad-state/3517/12
forum.sierrawireless.com/viewtop … ces#p18469


#7

thank you. Its a problem with network. Connection is not reliable.
Thanks for the tips awneil…


#8

Radio connections - especially mobile radio connections - are inherently unreliable.

Therefore your application needs to be designed to cope with these issues!