2 Replies Latest reply on May 12, 2015 6:20 AM by maav

    Sometimes wiced_network_up() fails to start AP

    sam.lin

      Test on SDK-3.1.1/FreeRTOS+LwIP/on 4390.

       

      My device is running as AP.

      Sometimes the device fails to boot due to wiced_network_up() fails.

       

      result = wiced_network_up(WICED_AP_INTERFACE, WICED_USE_INTERNAL_DHCP_SERVER, &ap_ip_settings);

       

      wiced_network_up() returns 2 (TIMEOUT)

        ->wwd_wifi_start_ap() returns 2 (TIMEOUT)

          -> wwd_wifi_ap_init() returns 2

       

      My debug code shows it fails in below lines:

      151     CHECK_RETURN_WITH_SEMAPHORE( wwd_management_set_event_handler( apsta_events, wwd_handle_apsta_event, NULL, WWD_AP_INTERFACE ), &wwd_wifi_sleep    _flag );

      152

      153     /* Set AP mode */

      154     data = (uint32_t*) wwd_sdpcm_get_ioctl_buffer( &buffer, (uint16_t) 4 );

      155     CHECK_IOCTL_BUFFER_WITH_SEMAPHORE( data, &wwd_wifi_sleep_flag );

      156     *data = 1; /* Turn on AP */

      157     CHECK_RETURN_WITH_SEMAPHORE( wwd_sdpcm_send_ioctl( SDPCM_SET, WLC_SET_AP, buffer, 0, WWD_AP_INTERFACE ), &wwd_wifi_sleep_flag );

       

      I did retry a few times, then

      The first error happens at line 151.

      The second retry still fails at line 157.

      The third time retry hang up completely... (It passes line 151, then hang up)

       

      Just hit reset button a few times to test this issue, it's pretty easy to reproduce this problem.

      Generally, the boot failure rate is about 1/6.