1 Reply Latest reply on Feb 14, 2020 8:11 AM by EdMA_4611511

    Could not set Country code, WWD_WLAN_BADARG / WICED_DISABLE_MCU_POWERSAVE

    EdMA_4611511

      Hi,

       

      I have an issue during wiced_init() => "Could not set Country code"

      I get retval = WWD_WLAN_BADARG while calling " retval = wwd_sdpcm_send_iovar( SDPCM_SET, buffer, 0, WWD_STA_INTERFACE );",

       

       

       

      Below a description of my software & Hardware and a Log

       

      Hardware :

      - Custom board with an BL6212 and an STM32F412ZG
      - Wifi chip is connected through SDIO, without "WL_HOST_WAKE / WL_IRQ / OOB" connected on "WWD_PIN_SDIO_OOB_IRQ / RC6" .

      => "#define WICED_DISABLE_MCU_POWERSAVE" is  Uncomment.

       

      Note : I am not sure if "WICED_DISABLE_MCU_POWERSAVE" is supported because in Wiced Eclipse IDE Version 6.4 if I uncomment "#define WICED_DISABLE_MCU_POWERSAVE" in "wiced_defaults.h / L246" and I try to compile : "snip.scan-BCM943438WCD1" => I got compilation errors.

       

       

      Sofware

      - Wiced SDK 6.4

      - IAR  (I have migrate the code to IAR, so my issue can also come from that).

       

       

       

      Below a Log,

       

      Notes :

      - WWD_LOG is active, so we have trace of SDIO transfert.

      - The "return retval" after "WPRINT_WWD_ERROR(("Could not set Country code\n"));" is commented, so the firmware continue even if SET country failed.

      - I ove log wwd_sdpcm_send_ioctl() retval on errors :

       

       

      -------------------- START LOG --------------------

       

      Starting WICED Unknown

      Platform Unknown initialised

      Started FreeRTOS Unknown

      WICED_core Initialized

      Initialising LwIP Unknown

      ............!Ce·....................................................................................................................................................................................................................................................................................................................................................................................DHCP CLIENT hostname WICED IP

      Started Wiced Thread

      Wcd:< Rcvd pkt 0x20015194

      credit update =16

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =17

      Wcd:< Procd pkt 0x20015194: IOCTL Response (43 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =18

      Wcd:< Procd pkt 0x20015194: IOCTL Response (38 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =19

      Wcd:< Procd pkt 0x20015194: IOCTL Response (47 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =20

      Wcd:< Procd pkt 0x20015194: IOCTL Response (43 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =21

      Wcd:< Procd pkt 0x20015194: IOCTL Response (48 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =22

      Wcd:< Procd pkt 0x20015194: IOCTL Response (48 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

       

       

       

       

      --> WARN:  wwd_sdpcm_send_ioctl L#1030 wwd_sdpcm_send_ioctl() FAILED, retval=2002

       

       

       

       

      --> WARN:  wwd_management_wifi_on L#314 Could not set Country code

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =23

      Wcd:< Procd pkt 0x20015194: IOCTL Response (58 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =24

      Wcd:< Procd pkt 0x20015194: IOCTL Response (28 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =25

      Wcd:< Procd pkt 0x20015194: IOCTL Response (32 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =26

      Wcd:< Procd pkt 0x20015194: IOCTL Response (37 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

       

       

       

       

      --> WARN:  wwd_sdpcm_send_ioctl L#1030 wwd_sdpcm_send_ioctl() FAILED, retval=2023

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =27

      Wcd:< Procd pkt 0x20015194: IOCTL Response (48 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      WLAN MAC Address : 60:23:A4:04:36:75

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =28

      Wcd:< Procd pkt 0x20015194: IOCTL Response (232 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      WLAN Firmware    : wl0: May  2 2019 02:39:20 version 7.45.98.83 (r714225 CY) FWID 01-476cc09d

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =29

      Wcd:< Procd pkt 0x20015194: IOCTL Response (235 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2019-05-02 02:30:04

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =30

      Wcd:< Procd pkt 0x20015194: IOCTL Response (36 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =31

      Wcd:< Procd pkt 0x20015194: IOCTL Response (36 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =32

      Wcd:< Procd pkt 0x20015194: IOCTL Response (32 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Init took ~1342 ms

      Waiting for scan results...

        # Type  BSSID              RSSI Rate Chan Security               SSID                            CCode    Flag

      ------------------------------------------------------------------------------------------------------------------

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =33

      Wcd:< Procd pkt 0x20015194: IOCTL Response (32 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =34

      Wcd:< Procd pkt 0x20015194: IOCTL Response (69 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:> Sending pkt 0x200124B8

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wcd:< Rcvd pkt 0x20015194

      credit update =35

      Wcd:< Procd pkt 0x20015194: IOCTL Response (106 bytes)

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

      Wiced Thread: Woke

       

       

       

       

      --> WARN:  wwd_sdpcm_send_ioctl L#1030 wwd_sdpcm_send_ioctl() FAILED, retval=2004

      Wiced Thread: Woke

       

       

       

       

       

       

      -------------- TASK  MONITOR --------------

       

       

      monitor                         X       9       95      6

      IDLE                            R       0       40      9

      temperature_probe_to_display    B       16      97      2

      button_driver                   B       16      33      5

      display_driver                  B       24      43      4

      mbr_driver                      B       24      61      3

      console                         B       8       111     7

      tcpip_thread                    B       7       977     13

      defaultTask                     B       24      97      1

      worker thread                   B       50      91      11

      worker thread                   B       52      1755    12

      wifi                            B       24      247     8

      WWD                             B       55      576     14

      Tmr Svc                         B       16      101     10

       

       

       

       

      FreeRTOS Free Heap : 39520 now - 39008 min

       

       

      -------------------------------------------

       

       

       

       

      Heap Memory : used 8008 / 65536