When will link_up_callback/link_down_callback be called?

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

cross mob
Anonymous
Not applicable

I have called wiced_network_register_link_callback(sta_link_up, sta_link_down);

in my application and add print "Link UP" and "Link Down" in the callbacks.

I just leave my device on the desk and no network traffic for a while,

sometimes I found my console shows "Link UP/Link Down" multiple times like

below:

Link UP

Link Down

Link UP

Link Down

Link UP

Link Down

Link UP

Does that mean the system automatically calls link_up/link_down callbacks when

I actually doing nothing? Is this normal (for BCM4390)?

Thanks.

0 Likes
5 Replies
Anonymous
Not applicable

One more question for this:

What if I send tcp/udp packet in Link Down status (when link_down_callback() is called).

Will the system automatically bring up network and process sending packet?

Or the sending packet action just fails?

0 Likes
Anonymous
Not applicable

I'm a bit nervous about this.

I suppose the network is up and always up after wiced_network_up().

I have a http server running for my application.

So if the system automatically calls link down, the client cannot

make connection at that time.

In what kind of situation the system will call link_up/link_down?

0 Likes
Anonymous
Not applicable

After adding debug code, I found:

The link down is triggered by WLC_E_DEAUTH_IND /** 802.11 DEAUTH indication */

in WICED/internal/wifi.c wiced_link_events_handler() line 690

A following link up is then called by handshake_error_callback() line 581

Is this normal? Any idea about this issue?

0 Likes
Anonymous
Not applicable

You cannot make this assumption that the network will always be active and available.

There can be a number of reasons why the LINK could go down - Including the AP being powered off, or the device or AP moving out of range, or a large number of devices in the network causing interference, or for most enterprise APs - automatic disconnect after a certain period of inactivity.

So your application does need to catch the link down events, and react as appropriate - either by re-establishing the link immediately or establishing it before trying to send additional data.

Anonymous
Not applicable

The system will NOT automatically bring up the Link for you. Sending packets will fail when the Link is down.

0 Likes