Maintaining TCP through powersave.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

[SDK-2.3.0, BCM943362WCD4]

I have been trying to test the ability of Wiced to maintain a TCP connection across powersaves.

I have effectively merged tcp_client and ping_powersave to create an app that

creates a TCP connection and then sleeps. It wakes every N seconds to send and receive data

down the same connection (i.e. the connection is not destroyed).  Its talking to a HTTP 1.1 server (i.e. with keep-alive).

It works, i.e. it wakes and successfully sends and receives data on the same connection.

The trouble is I cant seem to keep the service up for more than a few wakes.

From wireshark the AP does not seem to be deauthing and I can see no connection resets from the server side.

If I enable the connection to be setup and destroyed on every wake (see #define CONNECT_EVERY_TIME)  then

the system will stay awake for at least 500 seconds (perhaps a separate issue here).

So it would seem that somehow the TCP state is not being maintained across a sleep, or it is but it loses its mind fairly quickly.

App is attached - just need to provide SSID.

[ATTACH]152[/ATTACH]

0 Likes
2 Replies
Anonymous
Not applicable
Please supply the build string you are using.

This will help determine whether this is a network or RTOS dependent issue.
0 Likes
Anonymous
Not applicable

Discussion is being locked. If you have any follow-up, please start a new discussion.

0 Likes