if softap is woking more than one day, some clients will be disconnected and can't reconnect anymore

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

cross mob
Anonymous
Not applicable

I use wiced create a softap, and then do wifi scan each 1 minute.  4 clients connect to this softap. After abort 1 day, may only 1 client is connected, others are disconnected. And no client can connect to this softap anymore.

0 Likes
8 Replies
GregG_16
Employee
Employee
50 sign-ins 25 sign-ins 25 comments on KBA

Can you attach, or send to me in a message, the code/snip/app used?  I have had clients connected to the softAP using the Console app, but i would like to use your exact setup.

0 Likes
Anonymous
Not applicable

I don't know howto upload file. Just copy the source code in here. Hope you can reproduce this issue.

Set the softAP security type as WPA. you can change the scan interval if you want.

#include "wiced.h"

/******************************************************

*                      Macros

******************************************************/

#define DELAY_BETWEEN_SCANS       (60*1000)

/******************************************************

*               Function Declarations

******************************************************/

wiced_result_t scan_result_handler( wiced_scan_handler_result_t* malloced_scan_result );

/******************************************************

*               Variables Definitions

******************************************************/

static const wiced_ip_setting_t ap_ip_settings =

{

    INITIALISER_IPV4_ADDRESS( .ip_address, MAKE_IPV4_ADDRESS( 192,168,  0,  1 ) ),

    INITIALISER_IPV4_ADDRESS( .netmask,    MAKE_IPV4_ADDRESS( 255,255,255,  0 ) ),

    INITIALISER_IPV4_ADDRESS( .gateway,    MAKE_IPV4_ADDRESS( 192,168,  0,  1 ) ),

};

static int record_count, scan_times=0;

static wiced_time_t scan_start_time;

/*

* Callback function to handle scan results

*/

wiced_result_t scan_result_handler( wiced_scan_handler_result_t* malloced_scan_result )

{

    malloc_transfer_to_curr_thread( malloced_scan_result );

    if (malloced_scan_result->scan_complete != WICED_TRUE)

    {

        ++record_count;

    }

    else

    {

        wiced_time_t scan_end_time;

        wiced_time_get_time(&scan_end_time);

        WPRINT_APP_INFO( ("Scan complete in %lu milliseconds, %d APs\r\n", scan_end_time - scan_start_time,record_count));

    }

    free( malloced_scan_result );

    return WICED_SUCCESS;

}

void application_start(void)

{

    /* Initialise Wiced system */

    wiced_init();

    /* Bring up the softAP interface  */

    wiced_network_up(WICED_AP_INTERFACE, WICED_USE_INTERNAL_DHCP_SERVER, &ap_ip_settings);

    while(1)

    {

        record_count = 0;

        scan_times++;

        WPRINT_APP_INFO( ( "\r\nStart %d scan, waiting for scan results...\r\n", scan_times ) );

        wiced_time_get_time(&scan_start_time);

        wiced_wifi_scan_networks(scan_result_handler, NULL );

        wiced_rtos_delay_milliseconds(DELAY_BETWEEN_SCANS);

    }

}

0 Likes
Anonymous
Not applicable

Do you know howto get the 43362's console output by SDIO in WICED? Just like the DHD_DEBUG in Linux. Maybe we can upload the debug output from 43362 to help you debug this issue.

0 Likes
Anonymous
Not applicable

I got the same issue.

If client disconnect from softAP and try to reconnect, it will fail.

  • WEP / WAP / WPA2 have the same issue.
  • SDK 2.4.1 / 3.0.0 have the same issue.
  • FreeRTOS-LwIP / ThreadX-NetX have the same issue.

But if only softAP mode (not ap/sta concurrent mode) everything will be fine.

0 Likes
Anonymous
Not applicable

Well, on this issue, everything seems be fine when I use SDK 3.0.1.

So, SDK 2.4.1 will patch for this issue?

0 Likes
Anonymous
Not applicable

where did you download the SDK 3.0.1? Did you test use the SDK3.0.1's 43362.bin to replace SDK2.4.1, and tested in SDK2.4.1? I want to confirm this is firmware issue or a SDK issue. Thank you.

0 Likes
Anonymous
Not applicable

I use SDK 3.1.2

I have similar condition.'

With Soft AP, sometime client will be disconnected and can't be connected again.

0 Likes
Anonymous
Not applicable

Dear All:

              I use stm32f4 +  bcm43341 to create a http gateway server.

              When http request from outside exceed what stm32f4 can handle, what system will be?

              What I saw in my case like that.

               Tasks is continued to be push into queue for waiting service.

               When queue is run out, system will go crash and can't work.

               I do experiment for several time.

               I make external tasks exceed ST MCU processing ability.

               System queue can be used for a while.

               But when queue is run out, the only way for WICED is crash and even can't reboot automatically.

               Does anyone meet this question and has solution?

               BR

               Lee Wang

0 Likes