Wi-Fi Combo Forum Discussions
Hello.
I'm new in Wiked.
I have to establish P2P connection with an Android Tablet. Tablet has to be GO, WICED has to be GC.
After connection I have to send UDP packets with 1024Byte payload.
I write this task.
wiced_result_t tx_udp_packet(const wiced_ip_address_t target_ip_addr)
{
wiced_packet_t* packet;
char* udp_data;
uint16_t available_data_length;
/* Wait P2P Connection */
wiced_rtos_get_semaphore(&semaphoreHandle, WICED_WAIT_FOREVER);
/* Create UDP socket */
if (wiced_udp_create_socket(&udp_socket, UDP_TARGET_PORT, WICED_P2P_INTERFACE) != WICED_SUCCESS)
{
WPRINT_APP_INFO( ("UDP socket creation failed\n") );
return WICED_ERROR;
}
while(WICED_TRUE)
{
/* Create the UDP packet */
if ( wiced_packet_create_udp( &udp_socket, 1024, &packet, (uint8_t**) &udp_data, &available_data_length ) != WICED_SUCCESS )
{
WPRINT_APP_INFO( ("UDP tx packet creation failed\n") );
return WICED_ERROR;
}
/* Set the end of the data portion */
wiced_packet_set_data_end( packet, (uint8_t*) udp_data + 1024 );
/* Send the UDP packet */
if ( wiced_udp_send( &udp_socket, &target_ip_addr, UDP_TARGET_PORT, packet ) != WICED_SUCCESS )
{
WPRINT_APP_INFO( ("UDP packet send failed\n") );
wiced_packet_delete( packet ); /* Delete packet, since the send failed */
return WICED_ERROR;
}
/* Delay 1 sec */
wiced_rtos_delay_milliseconds(1000);
}
/*
* NOTE : It is not necessary to delete the packet created above, the packet
* will be automatically deleted *AFTER* it has been successfully sent
*/
return WICED_SUCCESS;
}
Is it correct ?
This task pends for a semaphore (semaphoreHandle) that is signalled in a P2P result callback if result is CONNECTION_P2P_CONNECTED.
P2P result callback is registered in this way:
connection_register_p2p_result_callback(&p2p_result_callback);
Can someone help me ?
Show LessGood afternoon, WICED community!
I have a question about the CYW43907 chip and GSIO SPI master interface.
I want to stream the data from SPI slave and send it in a form of UDP packages to Wi-Fi.
I am using WICED Studio 6.4 to read the data from the SPI slave as fast as possible. However, I have noticed that the GSIO driver works in polling mode that increases CPU usage. Moreover, I can see the inter-byte delays and the delays caused by manually toggled CS line.
They equal about 0.8 microseconds for both inter-byte and chip select delay. Please, receive the waveform with the 5 MHz clock signal and CS signal captured by the oscilloscope.
The code I am using to send the SPI packets is the following:
wiced_result_t spi_send(uint8_t *tx_buf_ptr, uint8_t *rx_buf_ptr, int size, wiced_spi_device_t *spi_device_ptr)
{
platform_result_t result = PLATFORM_SUCCESS;
platform_spi_config_t config;
/* Chip select is not a GPIO when NULL. */
config.chip_select = ( spi_device_ptr->chip_select != WICED_GPIO_NONE ) ? &platform_gpio_pins[spi_device_ptr->chip_select] : NULL;
config.speed = spi_device_ptr->speed;
config.mode = spi_device_ptr->mode;
config.bits = spi_device_ptr->bits;
/* Activate chip select */
platform_spi_chip_select_toggle(&platform_spi_peripherals[spi_device_ptr->port], &config, WICED_TRUE );
/* SPI transfer after init and CS */
platform_spi_transfer_nosetup( &platform_spi_peripherals[spi_device_ptr->port], &config, tx_buf_ptr, rx_buf_ptr, size);
/* Deassert chip select */
platform_spi_chip_select_toggle(&platform_spi_peripherals[spi_device_ptr->port], &config, WICED_FALSE );
return (wiced_result_t) result;
}
It is a modified version of wiced_spi_transfer function that eliminates multiple SPI initialization (with the original function the delay between the packages is too big)
Given the results above, I have the following questions:
1. Is it possible to use SPI GSIO Master in interrupt or DMA mode?
The polling mode seems to be slow.
2. How can I decrease inter-byte distance and chip select delay in polling mode?
3. What is the maximum SPI GSIO Master clock frequency and corresponding data transfer rate tested by Cypress engineers?
4. Is it possible to increase the slew rate of SPI GPIO pins to increase the signal quality?
5. Does the next generation CYW54907 WiFI MCU has the same SPI GSIO functionality and bugs or did Cypress engineers improved the module?
Thank you in advance.
Best,
Sergei
Show LessHello, Cypress community,
I have an application, where I need to receive the data from FPGA and stream it through the WiFi link. Ideally, I want to utilize the whole bandwidth of the WiFi connection that is about ~150 Mbps for CYW43907 (theoretical) and ~450 Mbps for CYW54907 (theoretical).
My first question is the following:
1. What interface is the best to push the data from FPGA to Cypress WiFi MCUs?
I can see a few options for doing this:
- SDIO 3.0
- Ethernet
- SPI
- USB 2.0
I tried to work with SPI. However, I can't push the frequency of the SPI clock higher than ~ 13 MHz. It means that I can achieve a maximum of about 13 Mbps.
The datasheet says that Ethernet can have a maximum speed of 100 Mbps.
2. Can you confirm that I can achieve 100 Mbps connection speed of Ethernet by using the WICED SDK?
If not, what is the maximum?
Regarding the SDIO 3.0, I found that it can work in the following mode:
- "SDR50: SDR up to 100 MHz (1.8 V signaling)."
According to "SD Specifications Part 1 Physical Layer Simplified Specification Version 3.01 May 18, 2010" this mode achieves only 50 Mbps.
3. Am I right that I can get a maximum of 50 Mbps by using the SDIO module on CYW43907/CYW54907?
Another promising option is USB 2.0 working in HS mode (480 Mbps according to Cypress datasheet )
4. Did you make speed test with USB 2.0 working in HS mode?
What it is the maximum speed of USB connection I can get by using WICED SDK?
Thank you in advance.
Best,
Sergei
Show LessHello,
I'm running "test.console-CYW943907AEVAL1F download run"
on WICED board ...
I have seen the command p2p_discovery_enable
and I see that can accept argument "listen".
What is the difference between launch the command with "listen" or not ?
Show LessHello
I'm new in WICED.
I write this simple code.
void p2p_result_callback(connection_p2p_result_t result)
{
if(result == CONNECTION_P2P_CONNECTED)
{
/* I'm happy */
}
}
void application_start(void)
{
wiced_init( );
if(connection_launch(CONNECTION_P2P_GC) != WICED_SUCCESS)
{
WPRINT_APP_INFO( ("CONNECTION_P2P_GC failed\n") );
}
/* PLACEHODLDER */
}
This code work propertly. I can connect with my Android Tablet.
Starting WICED Wiced_006.006.000.0009
Platform CYW943907AEVAL1F initialised
Started ThreadX v5.9
WICED_core Initialized
Initialising NetX_Duo v5.12
Creating Packet pools
WLAN MAC Address : A4:08:EA:D9:C0:A2
WLAN Firmware : wl0: Jul 20 2020 00:08:56 version 7.15.168.149 (21d266a) FWID 01-d4dbc762
WLAN CLM : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2020-07-20 00:01:06
Creating p2p app worker thread
P2P GC Start was successful
No persistent GO information! Wait for the invitation
Launched P2P GC: 00000000
Connection Request from: 36:46:EC:AA:94:B2 HUAWEI MediaPad T5 status=02
Starting group formation in PBC mode
P2P group owner intent = 0
connection_p2p_wps_result_handler: WPS completed successfully
Obtaining IPv4 address via DHCP
L1434 : dhcp_client_init() : DHCP CLIENT hostname = [WICED IP]
IPv4 network ready IP: 192.168.49.178
Setting IPv6 link-local address
IPv6 network ready IP: FE80:0000:0000:0000:A408:EAFF:FED9:C0A2
Storing credentials for DIRECT-ud-HUAWEI MediaPad T5 into WIFI DCT[4] section.
status,COMPLETE,result,CLIENT,groupid,36:46:EC:AA:94:B2 DIRECT-ud-HUAWEI MediaPad T5
*** Associated on channel: 42 ***
If I register result callback substituting PLACEHODLDER with
connection_register_p2p_result_callback(&p2p_result_callback);
and try to connect my Android Tablet, the connection stops after invitation .... I dont' see any log after invitation request
and on Android WiFi Direct manager the WICED Direct Device disappears
Starting WICED Wiced_006.006.000.0009
Platform CYW943907AEVAL1F initialised
Started ThreadX v5.9
WICED_core Initialized
Initialising NetX_Duo v5.12
Creating Packet pools
WLAN MAC Address : A4:08:EA:D9:C0:A2
WLAN Firmware : wl0: Jul 20 2020 00:08:56 version 7.15.168.149 (21d266a) FWID 01-d4dbc762
WLAN CLM : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2020-07-20 00:01:06
Creating p2p app worker thread
P2P GC Start was successful
No persistent GO information! Wait for the invitation
Launched P2P GC: 00000000
Connection Request from: 36:46:EC:AA:94:B2 HUAWEI MediaPad T5 status=0A
Invitation request from NOT stored persistent group
Can someone help me ?
Show LessI am using CYW4343W and I need to connect it in Wifi Direct mode. When I try to do it, I get the following message:
ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-52)
I enabled debugs in brcmfmac driver and this is what I see:
[ 4903.349827] brcmfmac: brcmf_fil_cmd_data Firmware error: BCME_ERROR (-1)
[ 4903.349849] brcmfmac: brcmf_fil_iovar_data_get ifidx=1, name=chanspec, len=4
[ 4903.349858] brcmutil: data
[ 4903.349874] 00000000: 53 00 00 00 S...
[ 4903.349895] ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-52)
It works OK in regular Wifi mode. Incidentally, when I tried to configure it for hotspot mode, I got exactly the same error. I am using kernel 5.4.56.
Does any one know if CYW4343W is capable of working in Wifi direct mode? How do I get past this error? Any help would be much appreciated.
Show LessHi,
I am using Wiced Studio 6.4 with Murata1LD. I am trying to interface an external flash with Murata1LD board using SPI.
But the build time of my Wiced Studio has increased to 14minutes from 2minutes since last few weeks. Is there any particular reason for this change?
Thanks,
Binsy M S
Show LessHello.
I want to develop a Firmware for WICED that configures MCU as P2P Client.
I download WICED Studio and I write this simple SNIP
#include "wiced.h"
#include "p2p_structures.h"
connection_manager_context_t cm;
void application_start(void)
{
wiced_init( );
connection_set_settings(&cm);
connection_launch(CONNECTION_P2P_GC);
}
I have 2 questions:
1) I'm on the right way ?
2) Compier tells me apps/demo/gil/rdg/rdg.c:50:1: error: unknown type name 'connection_manager_context_t'; did you mean 'mbedtls_cipher_context_t'?
I add #include "connection_manager.h" but compiler tells me apps/demo/gil/rdg/rdg.c:3:10: fatal error: connection_manager.h: No such file or directory
I'm stucked !
Show LessHello,
Working with:
Chip: 1LD 43438
Wiced: v6.4
I created 2 platforms with the only difference is one is used with internal flash, and the other one external flash. The files projects are the same.
the ONLY difference in the platform files are the following:
- platform_config.h :
- for the external flash platform, I have this additionnal line: #define USES_RESOURCE_FILESYSTEM
- PlatformwithIntFlash.mk :
- RESOURCES_LOCATION ?= RESOURCES_IN_DIRECT_RESOURCES
- PlatformwithExtFlash.mk :
- RESOURCES_LOCATION ?= RESOURCES_IN_WICEDFS
- DCT_IMAGE := $(OUTPUT_DIR)/DCT.stripped.elf
- FILESYSTEM_IMAGE := $(OUTPUT_DIR)/filesystem.bin
Then I use makefile to build one or this other:
MyApp.PlatformwithIntFlash VERBOSE=1 download run
MyApp.PlatformwithExtFlash VERBOSE=1 WIPE=1 download_apps download run