Wi-Fi Combo Forum Discussions
Hello.
I have to develop an "oscilloscope-like application" with WICED.
The application has to send 1024Byte wide packets over WiFi Direct.
The packets are generated at a rate of 30 pakets/sec.
The 1024 bytes in the packets are to be plotted on a Tablet in a RealTime way.
My first question is : is it preferible to use TCP or UDP ??
For now I'm using TCP an I see wiced_tcp_set_type_of_service API that can tell to TCP stack how treat packets (Like Video Stream, Audio, ...).
I understand that I have to use Video Sream ... I'm correct ??
Show LessHello.
I write simple code to configure WICED as P2P GC.
In p2p_result_callback I start a task that connects to a server and initiates a cycle where it expects a TCP packet from server and responds with another TCP packet.
After two or three packets the WICED resets itself and I not understand what is the problem.
Can someone help me ?
Show LessHello.
I initialize WICED as P2P GC.
After successful WiFi P2P connection my firmware running on WICED creates a thread that
1. connects to a server
2. receive TCP packets called requests (one request is 8 bytes wide) and sends TCP packets called answers (one answer is 8 bytes wide).
On server's side I measure time between one request and the relative response and this time is about 200ms. It's too big, I expect about 10ms for example.
I report my thread code.
#define ANSWER_LEN 8
static void tcpConnect(uint args)
{
wiced_spi_message_segment_t segment;
wiced_tcp_socket_t tcp_socket;
wiced_packet_t* request_packet;
wiced_packet_t* answer_packet;
wiced_result_t result;
wiced_ip_address_t gateway;
uint16_t request_data_length;
uint16_t available_data_length;
int connection_retries;
char* request_data;
char* answer_data;
/* Get gateway */
wiced_ip_get_gateway_address ( WICED_P2P_INTERFACE, &gateway );
/* Create TCP socket */
wiced_tcp_create_socket ( &tcp_socket, WICED_P2P_INTERFACE );
/* Bind to the socket */
wiced_tcp_bind ( &tcp_socket, TCP_TARGET_PORT );
/* Connect to server */
do
{
result = wiced_tcp_connect ( &tcp_socket, &gateway, TCP_TARGET_PORT, 500);
connection_retries++;
}
while ( ( result != WICED_SUCCESS ) );
/* Loop */
while(WICED_TRUE)
{
/* Receive Server's Request */
wiced_tcp_receive ( &tcp_socket, &request_packet, WICED_NEVER_TIMEOUT );
/* Get the contents of the received packet */
wiced_packet_get_data ( request_packet, 0, (uint8_t**)&request_data, &request_data_length, &available_data_length );
/* Create the TCP packet. Memory for the tx_data is automatically allocated */
wiced_packet_create_tcp ( &tcp_socket, ANSWER_LEN, &answer_packet, (uint8_t**)&answer_data, &available_data_length );
/* Set the end of the data portion */
wiced_packet_set_data_end ( answer_packet, (uint8_t*)answer_data + ANSWER_LEN );
/* Delete the REQUEST */
wiced_packet_delete ( request_packet );
/* Send the TCP packet */
wiced_tcp_send_packet ( &tcp_socket, answer_packet );
}
}
What I'm wrong ?
Show LessHi Sir,
我们在评估一个蓝牙网关的方案,WiFi,BT都有用到,使用是GD 的M4核的MCU, freeRTOS ,cyw43455,keil GCC编译器。
WICED SDK是基于STM32开发的,如果要移植WiFi driver ,BT 协议栈,需要移植WICED哪部分代码,是否有相应的文档参考,谢谢。
Best Regards
Show LessTeam,
I'm working with DavidD_91 on a new opportunity where the customer is looking to save additional power by not using the USB interface on the CYW43907 under WICED.
Would you know if the following pins could be left floating to accomplish this goal?
- USB2_AVDD33
- USB2_AVDD33IO
- USB2_AVDD33LDO
Thanks in advance for the guidance.
Show LessHello,
I'm new in WICED.
I download WICED Studio and I see that there is usb_device_cdc_acm_read_write sample.
I understand that this sample configures WICED USB to be seen as VirtualComPort in PC side.
How throughput I can reach ? I have to reach 20MBps.
If I want to configure three bulk endpoints (two "out" endpoint, and one "in" endpoint, "in" I mean from PC to WICED, "out" I mean from WICED to PC)
like I did in Cypress-FX3 device and load my specfic USB driver (my collegue is able to develop USB drivers). Is it possibile or I have to use just CDC ACM ?
For example : if I take device_framework_full_speed ...
unsigned char device_framework_full_speed[] = {
/* Device descriptor 18 bytes
0x02 bDeviceClass: CDC class code
0x00 bDeviceSubclass: CDC class sub code
0x00 bDeviceProtocol: CDC Device protocol
idVendor & idProduct - http://www.linux-usb.org/usb.ids
*/
0x12, 0x01, 0x10, 0x01,
0xEF, 0x02, 0x01,
0x08,
0xB4, 0x04, 0x02, 0x00,
0x00, 0x01,
0x01, 0x02, 0x03,
0x01,
/* Configuration 1 descriptor 9 bytes */
0x09, 0x02, 0x4b, 0x00,
0x02, 0x01, 0x00,
0x40, 0x00,
/* Interface association descriptor. 8 bytes. */
0x08, 0x0b, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00,
/* Communication Class Interface Descriptor Requirement. 9 bytes. */
0x09, 0x04, 0x00,
0x00,
0x01,
0x02, 0x02, 0x01,
0x00,
/* Header Functional Descriptor 5 bytes */
0x05, 0x24, 0x00,
0x10, 0x01,
/* ACM Functional Descriptor 4 bytes */
0x04, 0x24, 0x02,
0x0f,
/* Union Functional Descriptor 5 bytes */
0x05, 0x24, 0x06,
0x00, /* Master interface */
0x01, /* Slave interface */
/* Call Management Functional Descriptor 5 bytes */
0x05, 0x24, 0x01,
0x03,
0x01, /* Data interface */
/* Endpoint 1 descriptor 7 bytes (Interrupt IN Transfer Type) */
0x07, 0x05, 0x83,
0x03,
0x08, 0x00,
0xFF,
/* Data Class Interface Descriptor Requirement 9 bytes */
0x09, 0x04, 0x01,
0x00,
0x02,
0x0A, 0x00, 0x00,
0x00,
/* First alternate setting Endpoint 1 descriptor 7 bytes (Bulk OUT Transfer Type)*/
0x07, 0x05, 0x02,
0x02,
0x40, 0x00,
0x00,
/* Endpoint 2 descriptor 7 bytes (Bulk IN Transfer Type) */
0x07, 0x05, 0x81,
0x02,
0x40, 0x00,
0x00,
};
Show LessHi,
we are using wiced SDK 6.4 , FreeRTOS -LWIP. Issue is Mbedtls part. We are try to connect google cloud based on proper certificate. we are not able to
connect google cloud .I am following the below steps.
1. Paste proper certificate in resource directory .(root_ca.pem , ec_private.pem)
2. Define MQTT Broker address , Port number = 8883 , jwt token
3. Enable mbedtls log #define MBEDTLS_DEBUG_LOG_LEVEL 4
We are facing issue in state number 15. If anyone please look error. May I know what is total states in mbedtls ? Here I attach the log details.
Show LessI am trying to access wiced_rtos_create_thread function from wiced bootloader code ota2_bootloader.c
I included necessary header files.
But it throwing an error like
\WICED\43xxx_Wi-Fi/apps/waf/ota2_bootloader/./ota2_bootloader.c:598: undefined reference to `wiced_rtos_create_thread'
void IPC_BL_create_thread (void)
{
wiced_rtos_create_thread(&IPCBLthread, IPC_BL_THREAD_PRIORITY, "IPC_BL", IPC_thread_BL,
IPC_BL_STACK_SIZE, NULL);
return;
}
What may be the issue?
Can we acess wiced rtos threadx api from ota bootloader section.
Please suggest.
Show LessHi,
I want to know malloc usage for my applicaion. For that I try to add malloc_debug libray to my sample applicaion snip.scan.
I am using IAR Embedded Workbench IDE - Arm 8.50.6
I am following the below steps
1. Add the components in the scan.mk file below for our reference
NAME := App_Scan
$(NAME)_SOURCES := scan.c
$(NAME)_COMPONENTS += test/malloc_debug
GLOBAL_DEFINES += WICED_ENABLE_MALLOC_DEBUG
2. snip.scan-ISM43340_M4G_L44-iar IAR = 1 ------ Build the target
I got below errors.
Warning[Lt009]: Inconsistent wchar_t size
tx_thread_initialize.o(ThreadX.ARM_CM4.iar.release.a) and 288 other
objects in ThreadX.ARM_CM4.iar.release.a and 235 other
libraries have wchar_t size 16 bits
crt0_IAR.o and 197 other objects, some of them in STM32F4xx.a and
179 other libraries have wchar_t size 32 bits
Error[Li005]: no definition for "__builtin_return_address" [referenced from
malloc_debug.o(Lib_malloc_debug.a)]
Error[Li005]: no definition for "__real_malloc" [referenced from
malloc_debug.o(Lib_malloc_debug.a)]
make.exe[1]: *** [build/snip.scan-ISM43340_M4G_L44-iar/binary/snip.scan-ISM43340_M4G_L44-iar.elf] Error 2
tools/makefiles/wiced_elf.mk:315: recipe for target 'build/snip.scan-ISM43340_M4G_L44-iar/binary/snip.scan-ISM43340_M4G_L44-iar.elf' failed
make: *** [main_app] Error 2
Makefile:351: recipe for target 'main_app' failed
There is no definition for __real_malloc , __builtin_return_address . I try to add standard header files but issue not resolved. My doubt is anything we need to add in malloc_debug.mk file for IAR Tool chain purpose. Please reply to this query. If we implement this feature It will helpful for trace the heap in our application
Show LessHi ,
I am using ISM43340 Wifi + BLE Combo module , Wiced SDK 6.4 , FreeRTOS environment. I want to know how to print stack and heap information at run time.
any API is there ? Iand also I want to increase the stack , heap size based on my micro controller. Where I need to add those values in wiced SDK.
Here I attach my platform files for my microcontroller reference.
Thanks
kasirajan
Show Less