- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, when I wire WL_IRQ / WL_HOST_WAKE and enable WICED_DISABLE_MCU_POWERSAVE it works.
So I had 2 issues :
1/ I didn't define WWD_DOWNLOAD_CLM_BLOB
2/ define WICED_DISABLE_MCU_POWERSAVE / use of WWD_PIN_SDIO_OOB_IRQ pin is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note :
- I use the firmware "43438A1.bin" available in "WICED-Studio-6.4\43xxx_Wi-Fi\resources\firmware\43438"
- But I didn't define "WWD_DOWNLOAD_CLM_BLOB"
I did imagine NVRAM is enough, but I might be wrong, does CLM_BLOB is also needed ? What is the difference ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need CLM blob to ensure that the country code is set in the CLM. The CLM blob file should be present in \resources\firmware\43438\43438A1.clm_blob. And the WWD_DOWNLOAD_CLM_BLOB should be enabled to allow WICED to download the .clm_blob file to the 43438 radio. By default, this is defined in WWD.mk. The ccode from the NVRAM file is set in the CLM blob. In any case, the clm_blob file is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, for your reply.
Yes, when clm_blob is uploaded I have a correct wiced_init() with the debugger in step by step mode.
To be able to run correctly the wiced_init() in standard execution mode I need to add delay between SDIO write/read.
With this fix, when the "scan" demo start I have only the first 3 wifi SSID.
So I think I had 2 bugs :
1/ I didn't upload clm_blob.
2/ WL_IRQ / WL_HOST_WAKE is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, when I wire WL_IRQ / WL_HOST_WAKE and enable WICED_DISABLE_MCU_POWERSAVE it works.
So I had 2 issues :
1/ I didn't define WWD_DOWNLOAD_CLM_BLOB
2/ define WICED_DISABLE_MCU_POWERSAVE / use of WWD_PIN_SDIO_OOB_IRQ pin is required.