Wi-Fi Combo Forum Discussions
Hello.
I noticed this strange behaviour for USBX CDC ACM:
it sometimes fails when "Write" less than 8 bytes.
You can test this from "snip/usbx_usb_device/usb_device_cdc_acm_read_write".
Go to "usb_device_app_cdc_acm_console_rw"
and in the infinite loop substitue the code with this...
actual_length=3;
cdc_acm_buffer[0]='a';
cdc_acm_buffer[1]='b';
cdc_acm_buffer[2]='c';
requested_length = actual_length;
wiced_rtos_delay_milliseconds(1);
status = ux_device_class_cdc_acm_write( cdc_acm, cdc_acm_buffer, requested_length, &actual_length );
Open terminal program (I use Tera Term) and receive this 3 bytes flux data.
I use USBPCap Wireshark to sniff USB communication.
You notice that sometimes USBX don't send the 3 bytes packet but send ZLP (zero length packet).
Show Less
Hi,
we are developing software on CYW43907, power consumption is very critical for us. we put CYW43907 APP CPU into sleep mode when no data send, and WLAN CPU initialized with wiced_wifi_enable_powersave_with_throughput( 20 ). we have two serious bugs when testing software stabilities:
1. after long running, STA is disconnected from AP, and then STA keep sending probe request every 10 seconds, but without association request, WLAN is always down;
2. WLAN is down, and when APP CPU sending DATA or CMD to WLAN CPU, no response from WLAN CPU, no packets in air, measure the current, is about 60mA, no beacon receiving current pulse, looks like WLAN CPU can't wake up from sleep.
1.this two issues only found if APP CPU sleep on, if APP MCU is not sleep, everything is ok;
2.found many times when in 2.4G band, in 5G is very rare. and the channel utility is very high(~70%) by giving interference.(iperf UDP 10M)
SDK: WICED 6.4.
platform: CYW943907AEVAL1F
main sending loop:
1. send 1 packet;
2. read rssi and channel;
3.wiced_platform_mcu_enable_powersave();
4.sleep 1 second;
5.wiced_platform_mcu_disable_powersave();
6.goto 1
we have work on these two issues for more than one month, and still no any clues.
Thank you very much.
Show LessHello,
I am trying to configure SPI Slave on STM32F4xx in the Laird EWB Platform. The Host MCU is STM32F412.
I have added SPI4 on the STM32 to the Wiced definitions in platform.c. I can use this as SPI master without issues.
When I use the Wiced SPI Slave functions, I am getting a build errors.
build/laird.ampnet_app-LAIRD_EWB-ThreadX-NetX-SDIO/libraries/STM32F4xx.a(wiced_platform_common.o): In function `wiced_spi_slave_init':
C:\Data\AMP_WORK\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/../wiced_platform_common.c:429: undefined reference to `platform_spi_slave_drivers'
collect2.exe: error: ld returned 1 exit status
Another developer had the same issue some years ago. Here is a link to that thread.
The Laird EWB platform has platform_spi_slave_init(...) in the platform file.
...WICED\platform\MCU\STM32F4xx\peripherals\platform_spi.c
This same source file has the functions I used for SPI master.
What step am I missing to use this source for SPI slave?
Thank you,
-Rocko
Module
Mfr : Laird Connectivity
P/N : Sterling-EWB
MCU : STM32F412VEH6
WLAN : BCM4343W Wi-Fi CoB
Antenna : chip
Show Less<Our background>
We are developing TLS(https) client software.
In this development, we reuse the following example source file with some modification.
*The location of the original source file "httpbin_org.c"
"doc\WICED-Studio-6.4\43xxx_Wi-Fi\apps\snip\httpbin_org\httpbin_org.c"
- Our software repeatedly connects and disconnects with TLS to a specific server.
- The main changes to the above "httpbin_org.c" are as follows
- Add put and post
- support redirect("HTTP/1.1 302 Found")
- support split download("Accept-Ranges: bytes")
This time, among the above, we conducted a long-term test that repeats get / put / post and connecting and disconnecting to the TLS server.
(The above "redirect" and "split download" are not running in this test.)
As a result, the "wiced_tcp_connect" called by "http_client_connect" returned the following error:
- Wait error(4)
- Socket closed(7014 )
*The location of the source file of the function "http_client_connect":
"doc\WICED-Studio-6.4\43xxx_Wi-Fi\libraries\protocols\HTTP_client\http_client.c"
The time elapsed before these errors occur is irregular.
It may occur 20 minutes after the start of execution, or it may occur 10 hours later.
And whenever the above "Wait error" occurs, "internal_nx_tcp_socket_disconnect_callback" is always called to let us know that TLS server is disconnected during the connection.
<Our question>
Please tell me the meaning of the above two errors and how to avoid them.
I've tried several methods so far, but I can't recover, and at the moment I can't recover except by resetting.
Show Less
Hi,
I am finding the BLE scan whitelist is failing to operate. I have set the filter policy to accept adv packet from device in white list, directed adv packet not directed to local device is ignored,
wiced_bt_ble_update_scanner_filter_policy(BTM_BLE_SCANNER_FILTER_WHITELIST_ADV_RSP);
Then call the function to whitelist the address,
wiced_bool_t status = wiced_bt_ble_update_scanner_white_list(WICED_TRUE, p_bd_addr, addr_type);
However, the scan callback is called for any address, even devices that are not added to the whitelist.
I use the following bt config settings:
.client_max_links = 1u,
.ble_white_list_size = 1u,
I'd appreciate any useful suggestions, please.
Regards,
RH
Hello, guys!
I am developing a project based on wifi connection for use mqtt and the use of UARTs Fast and low (stdio) for control and communication with other devices.
It's all running properly, but to make an enhacement on the control of FASTUART, I decided to use a timer (based on rtos) to managed timeouts when a reception starts and flush the ring buffer when a timeout is trigger before a full frame has been received on the fastuart.
With this addition, when I use the make target "kits.CYW954907AEVAL1F.MyProject-CYW954907AEVAL1F-FreeRTOS-LwIP-debug download" next information is printed on console with the ERRORS:
Building Bootloader waf.bootloader-NoOS-NoNS-CYW954907AEVAL1F-P101-SoC.43909
Building Serial Flash Loader App
build/waf.sflash_write-NoOS-CYW954907AEVAL1F-P101-SoC.43909/libraries/Uart_43909_Library_CYW954907AEVAL1F.a(platform_uart.o): In function `Timer_Control_FASTUART_CallBack':
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2672: undefined reference to `wiced_rtos_stop_timer'
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2681: undefined reference to `wiced_rtos_deinit_timer'
build/waf.sflash_write-NoOS-CYW954907AEVAL1F-P101-SoC.43909/libraries/Uart_43909_Library_CYW954907AEVAL1F.a(platform_uart.o): In function `uart_seci_process_irq':
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2261: undefined reference to `wiced_rtos_stop_timer'
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2264: undefined reference to `wiced_rtos_deinit_timer'
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2288: undefined reference to `wiced_rtos_init_timer'
C:\WICED-Studio-6.6\43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/uart/platform_uart.c:2290: undefined reference to `wiced_rtos_start_timer'
collect2.exe: error: ld returned 1 exit status
make.exe[3]: *** [build/waf.sflash_write-NoOS-CYW954907AEVAL1F-P101-SoC.43909/binary/waf.sflash_write-NoOS-CYW954907AEVAL1F-P101-SoC.43909.elf] Error 1
make.exe[2]: *** [main_app] Error 2
tools/makefiles/wiced_apps.mk:416: recipe for target 'sflash_write_app' failed
make.exe[1]: *** [sflash_write_app] Error 2
make.exe[1]: *** Waiting for unfinished jobs....
I use the timer on the file "platform_uart.c" and its functions are declared via #include "wiced_rtos.h".
The added code is:
//Variables:
#ifdef USE_TIMER_TO_CONTROL_FASTUART
wiced_timer_t Timer_Control_FASTUART;
const uint32_t Timeout_Control_FASTUART = 250;
static void Timer_Control_FASTUART_CallBack(void *arg);
#endif
//IRQ UART function to process the FAST UART
static wiced_bool_t uart_seci_process_irq( platform_uart_driver_t* driver, uart_seci_t* uart_seci_base )
{
if(driver->interface->port == UART_FAST)
{
....
#ifdef USE_TIMER_TO_CONTROL_FASTUART
if(driver->rx_buffer->tail == 0)
{
if(wiced_rtos_init_timer( &Timer_Control_FASTUART, Timeout_Control_FASTUART, (timer_handler_t)Timer_Control_FASTUART_CallBack, (void *)driver) == WICED_SUCCESS)
{
if(wiced_rtos_start_timer(&Timer_Control_FASTUART) == WICED_SUCCESS)
{
}
}
}
#endif
...
}
}
//Timer CALLBACK in case of timeout
#ifdef USE_TIMER_TO_CONTROL_FASTUART
static void Timer_Control_FASTUART_CallBack(void *arg){
platform_uart_driver_t* driver = arg;
//stop timer:
if(wiced_rtos_stop_timer(&Timer_Control_FASTUART) == WICED_SUCCESS)
{
//restart variables:
driver->rx_buffer->tail = 0;
driver->rx_buffer->head = 0;
length_frame_fastuart = 0;
//deinit timer
if(wiced_rtos_deinit_timer( &Timer_Control_FASTUART ) == WICED_SUCCESS)
{
}
}
}
#endif
Could it be a problem of use timers inside an IRQ function?
NOTE: When I use a Make Targe without downloading, the code compiles without any problem. "kits.CYW954907AEVAL1F.MyProject-CYW954907AEVAL1F-FreeRTOS-LwIP".
Many thanks in advance!
Luis
Show LessUsing WICED 6.4.0.61, STM32L4+ connected to a 43012C0
I am running into an issue when sending data to a connected socket using the NETX API. After some time, anywhere from 2-20 minutes, my tcp sends return NX_NOT_CONNECTED. I've watched the connection in wireshark, and there is no FIN or RST being sent by either side of the connection. All traffic from the device stops, the server sends one keep alive, and finally the server RST the connection. When this happens, other wiced API calls, like getting the RSSI, hang indefinitely. I have tried closing the socket, and attempting to reconnect, but all attempts at connecting eventually return NX_NOT_CONNECTED. Even taking down the interface and attempting to rescan and connect to the AP fails on the scan call.
What I have noticed is that the WWD thread appears to be waiting on the SDIO semaphore, and never seems to unblock. Does anyone know what is happening, or if there is a work around for this which does not require restarting the chip from scratch?
Below is the stack trace for the WWD thread.
#0 __restore_interrupts (primask_value=2147483648)
threadx/5_8/tx_port.h:488
#1 _tx_thread_system_return_inline ()
threadx/5_8/tx_port.h:488
#2 _tx_thread_system_ni_suspend (thread_ptr=<optimized out>, thread_ptr@entry=0x200019d4
<wwd_thread>, wait_option=<optimized out>)
threadx/5_8/tx_thread_system_suspend.c:1278
#3 _tx_semaphore_get (semaphore_ptr=<optimized out>, wait_option=<optimized out>)
threadx/5_8/tx_semaphore_get.c:239
#4 _txe_semaphore_get (semaphore_ptr=semaphore_ptr@entry=0x200025b4 <sdmmc1_sem>,
wait_option=wait_option@entry=4294967295)
threadx/5_8/txe_semaphore_get.c:179
#5 host_platform_sdio_cmd (command=command@entry=SDIO_CMD_53, argument=argument@entry=2751496256,
response_expected=<optimized out>, response_expected@entry=(unknown: 164)
host_platform_wiced.c:314
#6 host_platform_sdio_transfer (command=SDIO_CMD_53, response=0x0, response_expected=(unknown: 164)
host_platform_wiced.c:531
#7 host_platform_sdio_transfer (direction=<optimized out>, command=<optimized out>,
mode=<optimized out>, block_size=<optimized out>, argument=<optimized out>, data=<optimized out>,
data_size=<optimized out>, response_expected=<optimized out>, response=<optimized out>)
host_platform_wiced.c:463
#8 wwd_bus_sdio_cmd53 (response_expected=RESPONSE_NEEDED, response=0x0, data=0x200208f0
<g_tx_mem+64> "a", data_size=<optimized out>, address=0, mode=<optimized out>, function=<optimized
out>, direction=<optimized out>)
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/bus_protocols/SDIO/wwd_bus_protocol.c:708
#9 wwd_bus_sdio_transfer (direction=<optimized out>, function=<optimized out>,
address=address@entry=0, data_size=<optimized out>, data=0x200208f0 <g_tx_mem+64> "a",
response_expected=RESPONSE_NEEDED)
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/bus_protocols/SDIO/
wwd_bus_protocol.c:663
#10 wwd_bus_transfer_bytes (direction=direction@entry=BUS_WRITE,
function=function@entry=WLAN_FUNCTION, address=address@entry=0, size=size@entry=97,
data=0x200208f0 <g_tx_mem+64>)
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/bus_protocols/SDIO/
wwd_bus_protocol.c:644
#11 wwd_bus_send_buffer (buffer=0x200208b0 <g_tx_mem>)
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/bus_protocols/SDIO/
wwd_bus_protocol.c:220
#12 wwd_thread_send_one_packet ()
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/wwd_thread.c:184
#13 wwd_thread_func (thread_input=<optimized out>)
wiced-sdk/43xxx_Wi-Fi/WICED/WWD/internal/wwd_thread.c:357
Show Less
Hi,
We have a design that use the laird Sterling EWB (cyw4343w + STM32f4x). I was running test on the sterling laird ewb dev kit via USB (FTDI chip) and everything works fine. Now we are trying to use the JTAG connector with our JLINK segger and we are not able to program the board (our board and the dev kit that as a Jtag connector header).
"**** OpenOCD failed - ensure you have installed the driver from the drivers directory, and that the debugger is not running **** In Linux this may be due to USB access permissions. In a virtual machine it may be due to USB passthrough settings. Check in the task list that another OpenOCD process is not running. Check that you have the correct target and JTAG device plugged in. ****"
Downloading DCT ...
Here's what we have done so far :
- Change the Jlink driver for the usblibK (3.1.0.0 and 3.0.7.0 try both)
- Add reset_config trst_and_srst srst_push_pull to the jlink.cfg file
- Change JTAG ?= CYW9WCD1EVAL1 for JTAG ?= jlink.
Our make target look like : "app folder"."app-name"-LAIRD_EWB JTAG=jlink download run.
We try every combination of everything listed but we always add the same result.
In the openocd_log.txt, we got this error (attached files) :
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Any help would be appreciated, we are running out of solutions here,
Thank you.
Show LessAccording to the datasheet, the CYW4343W has a WLAN unit and Bluetooth unit, both having an ARM CM3 processor, RAM and ROM on-chip memory. Also according to the datasheet:
"External patches may be applied to the ROM-based firmware to provide flexibility for bug fixes or feature additions. These patches may be downloaded from the host to the CYW4343W through the UART transports."
However, I can't seem to find any clear documentation on how to apply patches to the ROM-based firmware. Can anyone refer me to any documentation on how this is done?
A bit more context from my end: we have our custom hardware including a Murata 1DX module, which includes the CYW4343W chipset.
Any help would be much appreciated.
Show Less
Hello,
I am using the hardware module 1LD 43438 with Wiced v6.4.
I meet a new issue with the http_client lib (the 1st one on this ticket, currently still have no answer). The lib can be found here : ".../libraries/protocols/HTTP_clent/http_client.c". I also put the files enclosed.
The communication is done with HTTP request to a server on which I am downloading a .elf file for an OTA update. This file is downloaded by chunk of 1024 bytes.
HTTP request sent to the server:
GET https://[**hidden**].s3.eu-west-3.amazonaws.com/MyFile.stripped.elf
Host: [**hidden**].s3.eu-west-3.amazonaws.com
Range: bytes=362496-363519
HTTP response received from the server:
HTTP/1.1 206
Date: Fri, 30 Jul 2021 12:57:16 GMT
Content-Type: binary/octet-stream
Content-Length: 1024
Connection: keep-alive
Content-Range: bytes 362496-363519/441816
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Sec-WebSocket-Version: 13HTTP/1.1 101 Switching Protocols
HTTP/1.1 404 Not Found258EAFA5-E914-47DA-95CA-C5AB0DC85B11HTTP/1.0Unable to handle fragmented packetsHTTP/* * *
*Content-LengthTransfer-Encoding: chunkedWrong MAX_FRAGMENT_LENGTH value Unable to set TLS extensionƒH‹HH”H™HH¤HªHHTTP/2OPTIONSGETHEADPOSTPUTDELETETRACECONNECTmalloc_mutexsystem monitorCouldn't create system monitor thread; err = %d
app threadEvent flagsworker queueworker threadStarted ThreadX v5.8Failed to create WICED_HARDWARE_IO_WORKER_THREADFailed to create WICED_NETWORKING_WORKER_THREADbsscfg:event_msgsbsscfg:event_msgs_ext0@ Could not initialize wifi platform****************************************************
** ERROR: WLAN: could not download clm_blob file
** FATAL ERROR: system unusable, CLM blob file not found or corrupted.
****************************************************bus:txglomCould not turn o
If you have a look on the lib http_client.c, the function "deferred_receive_handler" is responsible to provide the http response from the lib to the application. at the line 511, the function try to detect if the header contains the key-word "Transfer-Encoding: chunked". If founded, the response is not managed as this case is not implemented in the lib. It should not be an issue as the server does not answer me with this kind of encoding.
However, the lib seems to looking for this keyword in the entire http response "fragment_available_data_length" (which is the header + the payload) instead of looking for only in the payload.
In my case, the file which I am trying to download, contains the string sequence in ascii format "Transfer-Encoding: chunked". Even if this string is contained in the payload, and not in the header, the lib detect it and the App is not able to process the payload as it is blocked by the lib (enter in the line 513 with the //TODO comment).
=> Could you explain why the lib is looking for the keyword in the entire header+payload data instead of in the header only ? Or is it a bug ?
=> how to handle this issue ?
I think you can easily reproduce this issue with any platform, using the exemple from Cypress Academy WW101 : CypressAcademy_WW101_Files-master\Projects\ww101key\07c\09_aws_get.
If needed for your test, I can share the link to download the .elf file in private message.
Show Less