Wi-Fi Combo Forum Discussions
Hi,
Test on sdk-6.1. (The same errors on sdk-6.0.1)
I got a lot of HCI errors during boot if ENABLE_BT_PROTOCOL_TRACES is defined.
My testing code is pretty simple as it just calls wiced_bt_stack_init() then start wiced_bt_ble_observe().
I got below error after calling wiced_bt_stack_init() .
The HCI command 0xfc2e/0xfc4c seems to be HCI_CMD_OPCODE_WRITE_RAM/HCI_CMD_OPCODE_LAUNCH_RAM.
The BLE still working but these Errors seems abnormal things....
I have no idea what's going on, maybe someone from cypress can clarify if this is a problem or not.
e.g
00:00:01.751000 SENT Command to HCI. Name: (null) (Hex Code: 0xfc2e Param Len: 0) Ctrl(0)
00:00:01.759000 Error - Unknown HCI command: 64558 [0xfc2e] Length: 0
00:00:01.765000 --
00:00:01.768000 --
00:00:01.770000 RCVD Event from HCI. Name: HCI_Command_Complete (Hex Code: 0x0e Param Len: 4) Ctrl(0)
00:00:01.780000 Parameters
00:00:01.782000 Num HCI Cmd Packets : 1 (0x01)
00:00:01.789000 Cmd Code : 0xfc2e ((null))
00:00:01.796000 00
00:00:01.798000 --
00:00:01.849000 --
00:00:01.850000 SENT Command to HCI. Name: (null) (Hex Code: 0xfc4c Param Len: 70) Ctrl(0)
00:00:01.859000 Parameters
00:00:01.862000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 70
00:00:01.868000 --
00:00:01.877000 --
00:00:01.879000 RCVD Event from HCI. Name: HCI_Command_Complete (Hex Code: 0x0e Param Len: 4) Ctrl(0)
00:00:01.889000 Parameters
00:00:01.891000 Num HCI Cmd Packets : 1 (0x01)
00:00:01.897000 Cmd Code : 0xfc4c ((null))
00:00:01.904000 00
00:00:01.906000 --
00:00:01.908000 --
00:00:01.910000 SENT Command to HCI. Name: (null) (Hex Code: 0xfc4c Param Len: 255) Ctrl(0)
00:00:01.919000 Parameters
00:00:01.921000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
00:00:01.928000 --
00:00:01.953000 --
00:00:01.955000 RCVD Event from HCI. Name: HCI_Command_Complete (Hex Code: 0x0e Param Len: 4) Ctrl(0)
00:00:01.965000 Parameters
00:00:01.967000 Num HCI Cmd Packets : 1 (0x01)
00:00:01.974000 Cmd Code : 0xfc4c ((null))
00:00:01.980000 00
All "Unknown HCI command" lines during boot as below:
00:00:01.759000 Error - Unknown HCI command: 64558 [0xfc2e] Length: 0
00:00:01.862000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 70
00:00:01.921000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
00:00:01.998000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
................ // same messages repeat many times...
00:00:12.576000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
00:00:12.652000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
00:00:12.728000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 255
00:00:12.804000 Error - Unknown HCI command: 64588 [0xfc4c] Length: 8
00:00:12.858000 Error - Unknown HCI command: 64590 [0xfc4e] Length: 4
00:00:13.162000 Error - Unknown HCI command: 64551 [0xfc27] Length: 12
Show LessHi,
When use wiced_bt_ble_scan() there is a parameter call scan_type,
so we can set BTM_BLE_SCAN_TYPE_HIGH_DUTY or BTM_BLE_SCAN_TYPE_LOW_DUTY.
And I can find the corresponding scan interval/window/duration in wiced_bt_cfg_settings_t.
However, with wiced_bt_ble_observe(), I don't find such duty cycle setting.
So I have no idea what is the duty cycle setting used by wiced_bt_ble_observe().
Show LessFor my application I need to port app code that uses FreeRTOS function calls so I want to by bypass the WICED abstraction layer and use FreeRTOS directly.
When I build the project in debug mode and run it, the GDB session does not show the task in the Debug window. If I pause execution, the GDB session disconnects (and I have to close openocd-all-brcm-libftdi.exe in task manager).
I can run a basic app with the WICED abstraction layer + freeRTOS and it run in the debugger fine with all the tasks listed in the Debug window (top left of IDE).
Any ideas? Is there something that provides information for GDB to populate the Debug screen that I am missing?
Show LessTrying to setup BCM94343WWCD1 as a headset using a dsp for audio.
The schematic for BCM94343WWCD1 shows that it has a 4 line BT_PCM interface.
Is there any reference on how this can be hooked up to a dsp and how to route this pcm data to/from the headset profile ?
Sajid
Show LessHello!
I am using the HTTP client library to make 3 different requests. One request is posted continuously. The second and third is sent every minute sequentially (through flags), like: 0 -> 1 -> 2. The same connection sends different requests.
I use the keep alive header to keep the connection open. Due to some configurations on the sever, I get disconnected roughly every minute so I use a flag to call the http_client_disconnect() and http_request_deinit() APIs and I'm back in business. However I have noticed that sometimes, after a while say 30-40minutes (this is just an estimate) later my requests start bombing. I start getting semaphore timeouts on all of them and things never recover. I am not entirely sure how to debug this problem. I'm not sure if it is related to how I re-initialize my requests. What is the right way to re-initialize the request/connection after getting a disconnect callback? Such a callback might be received while processing any of the 3 requests. My 2nd request is a housekeeping request that is a long json and the 3rd is a http bulk request which can get huge if my queue size gets bigger, so they have a higher semaphore timeout.
I have provided a snippet of what I'm trying, hope someone can give me some hints to debug this!
Show Less// 1 min timer
static void housekeeping_callback(void *arg)
{
send_packet_type = 1;
}
static void http_send_thread( uint32_t arg )
{
wiced_result_t result;
WPRINT_APP_INFO (( "Started httpservice_thread\n" ));
do
{
/*wait for network up*/
wiced_rtos_delay_milliseconds( 100 );
} while ( wiced_network_is_ip_up( WICED_STA_INTERFACE ) != WICED_TRUE );
while ( 1 )
{
/* check for network link */
if ( wiced_network_is_ip_up( WICED_STA_INTERFACE ) != WICED_TRUE )
{
wiced_rtos_delay_milliseconds( 100 );
continue;
}
switch (send_packet_type) {
case 0:
{
wiced_rtos_pop_from_queue( &whttp_queue, &pop, WICED_NEVER_TIMEOUT );
send_packet();
}
break;
case 1:
send_housekeeping_packet();
send_packet_type = 2;
break;
case 2:
{
int count = get_queue_size();
char *bulk_packet = (char *)malloc(sizeof ( (count) * sizeof(buffer) ) );
for (int i = 0; i < count; i++) {
wiced_rtos_pop_from_queue( &whttp_queue, &pop, 200 );
}
send_bulk_packet();
free(bulk_packet);
send_packet_type = 0;
}
break;
default:
break;
}
}
}
// requests 1 and 2 follow same pattern!
// static void send_housekeeping_packet()
// static void send_bulk_packet()
static void send_packet()
{
wiced_result_t result;
if (got_disconnected) {
http_request_deinit( &requests[0] );
http_client_disconnect( &client );
wiced_rtos_delay_milliseconds( 50 );
got_disconnected = WICED_FALSE;
}
if ( wiced_network_is_ip_up( WICED_STA_INTERFACE ) == WICED_TRUE && is_connected_http == WICED_FALSE) {
// configure HTTP client parameters
client_configuration.flag = (http_client_configuration_flags_t)(HTTP_CLIENT_CONFIG_FLAG_SERVER_NAME | HTTP_CLIENT_CONFIG_FLAG_MAX_FRAGMENT_LEN);
client_configuration.server_name = (uint8_t*) SERVER_HOST;
client_configuration.max_fragment_length = TLS_FRAGMENT_LENGTH_1024;
http_client_configure(&client, &client_configuration);
WPRINT_APP_DEBUG( ( "Connecting to %s\n", SERVER_HOST ) );
// if you set hostname, library will make sure subject name in the server certificate is matching with host name you are trying to connect. pass NULL if you don't want to enable this check
client.peer_cn = (uint8_t*) SERVER_HOST;
if ( ( result = http_client_connect( &client, (const wiced_ip_address_t*)&ip_address, SERVER_PORT, HTTP_NO_SECURITY, CONNECT_TIMEOUT_MS ) ) != WICED_SUCCESS )
{
WPRINT_APP_INFO( ( "Error: failed to connect to server: %u\n", result) );
return;
} else {
is_connected_http = WICED_TRUE;
}
}
WPRINT_APP_DEBUG( ( "Connected\n" ) );
jsonize_packet(send_packet_buffer);
header[0].field = HTTP_HEADER_HOST;
header[0].field_length = sizeof( HTTP_HEADER_HOST ) - 1;
header[0].value = SERVER_HOST;
header[0].value_length = sizeof( SERVER_HOST ) - 1;
#define JSON_URL "application/json"
header[1].field = HTTP_HEADER_CONTENT_TYPE;
header[1].field_length = sizeof( HTTP_HEADER_CONTENT_TYPE ) - 1;
header[1].value = JSON_URL;
header[1].value_length = sizeof( JSON_URL ) - 1;
#define CONNECTION "Keep-Alive"
header[3].field = HTTP_HEADER_CONNECTION;
header[3].field_length = sizeof( HTTP_HEADER_CONNECTION ) - 1;
header[3].value = CONNECTION;
header[3].value_length = sizeof(CONNECTION) - 1;
char messageLengthBuffer[10]; // Enough to hold the characters for the Content-Length: header
sprintf(messageLengthBuffer," %d",strlen(send_packet_buffer)); // Put the message body into the buffer so that you can strlen it
header[2].field = HTTP_HEADER_CONTENT_LENGTH;
header[2].field_length = sizeof( HTTP_HEADER_CONTENT_LENGTH ) - 1;
header[2].value = messageLengthBuffer;
header[2].value_length = strlen(messageLengthBuffer);
wiced_time_get_time(&start_send_time);
http_request_init( &requests[0], &client, HTTP_POST, request_uris[0], HTTP_1_1 );
http_request_write_header( &requests[0], &header[0], 4 );
http_request_write_end_header( &requests[0] );
http_request_write( &requests[0], (uint8_t*)send_packet_buffer, strlen(send_packet_buffer) );
result = http_request_flush( &requests[0] );
if ( result != WICED_SUCCESS )
{
WPRINT_APP_INFO( (" POST request flush failed\n") );
}
else
{
result = wiced_rtos_get_semaphore(&requestSemaphore,7000);
if ( result != WICED_SUCCESS )
WPRINT_APP_DEBUG( (" POST request timed out \n") );
else
{
WPRINT_APP_DEBUG( ("\nPOST successful\n") );
}
}
}
static void event_handler( http_client_t* client, http_event_t event, http_response_t* response )
{
switch( event )
{
case HTTP_CONNECTED:
break;
case HTTP_DISCONNECTED:
{
got_disconnected = WICED_TRUE;
is_connected_http = WICED_FALSE;
break;
}
case HTTP_DATA_RECEIVED:
{
// set semaphore
wiced_rtos_set_semaphore(&requestSemaphore);
break;
}
default:
break;
}
}
Hi mdl
I'm using a BCM43341 WiFi/BT combo chip and have tried to increase the BT UART speed from 115200 without success.
I have tried the alternative bt_firmware_download in libraries/drivers/bluetooth/mfg_test/internal/firmware/bt_firmware.c
It calls a function called bt_host_update_baudrate that sends a HCI command to the controller, but after changing the baudrate, I'm never able to re-establish communication.
Is that code supposed to work?
We're still on 3.7. Have recently heard that our chip should be supported in 5.2 so we'll try that when we get our heads above water.
Cheers,
Magnus
Show LessHello,
Per this prior thread: wiced studio 5.2 backward compatibility for 4343wcd1
I also face the same issue. After updating filesystem, device lost wifi functionality. So is there any solution to update filesystem?
Show LessHello all, I am new to the WICED framework so there may be an obvious solution to this. I am using a Type1LD Wi-Fi and BT module with WICED 6.1. I have noticed that by default RF firmware is being placed on external Flash but static Web resources are being placed in internal program Flash. The decision making for this appears to be in wiced_config.mk
~/WICED-Studio-6.1/43xxx_Wi-Fi/tools/makefiles/wiced_config.mk:
416 ALL_RESOURCES := $(sort $(foreach comp,$(PROCESSED_COMPONENTS),$($(comp)_RESOURCES_EXPANDED)))
417
418: LOCATION_CONFIGURABLE_RESOURCES += resources/$(WIFI_FIRMWARE_BIN)
419: LOCATION_CONFIGURABLE_RESOURCES += resources/$(WIFI_FIRMWARE_CLM_BLOB)
420
421 ifeq ($(RESOURCES_LOCATION), RESOURCES_IN_WICEDFS)
422: INTERNAL_MEMORY_RESOURCES += $(filter-out $(LOCATION_CONFIGURABLE_RESOURCES), $(ALL_RESOURCES))
423 endif
424
It appears that the only location configurable resources are WIFI_FIRMWARE_BIN and WIFI_FIRMWARE_CLM_BLOB and all other resources will be placed in internal Flash.
Before I begin hacking up the wiced_config.mk file, is there a straight forward way to tell the framework build process to always place static resources, Web or otherwise, into external Flash?
Thanks.
P.S. I have seen this post but I did not find it helpful.
Show LessHello,
When I'm trying to connect to the Azure IOT hub server with AMQP functions, the program freezes and then restarts (not all the time) when it's calling the following function:
( After reboot, the program no longer has this problem. And it happens again on a new connection on the same device ).
WICED SKD : 5.1.0
wiced_result_t wiced_generic_start_tls_with_ciphers( wiced_tls_context_t* tls_context, void* referee, wiced_tls_endpoint_type_t type, wiced_tls_certificate_verification_t verification, const cipher_suite_t* cipher_list[], tls_transport_protocol_t transport_protocol )
{
}
and more precisely in the loop below :
do
{
uint64_t curr_time;
if (type == WICED_TLS_AS_SERVER)
{
result = ssl_handshake_server_async( &tls_context->context );
if ( result != TLS_SUCCESS )
{
WPRINT_SECURITY_INFO(( "Error with TLS server handshake\n" ));
goto exit_with_inited_context;
}
}
else
{
result = ssl_handshake_client_async( &tls_context->context );
if ( result != TLS_SUCCESS )
{
WPRINT_SECURITY_INFO(( "Error with TLS client handshake %u\n", (unsigned int)result ));
goto exit_with_inited_context;
}
}
/* break out if stuck */
curr_time = tls_host_get_time_ms();
if ( curr_time - start_time > MAX_HANDSHAKE_WAIT )
{
WPRINT_SECURITY_INFO(( "Timeout in SSL handshake\n" ));
result = TLS_HANDSHAKE_TIMEOUT;
goto exit_with_inited_context;
}
/* if no state change then wait on client */
if ( prev_state == tls_context->context.state )
{
host_rtos_delay_milliseconds( 10 );
}
else /* otherwise process next state with no delay */
{
prev_state = tls_context->context.state;
}
} while ( tls_context->context.state != SSL_HANDSHAKE_OVER );
return WICED_SUCCESS;
I have an impression that during the different tests of the enumerator below (TLS STATES), the test blocks on number 3:
typedef enum
{
SSL_HELLO_REQUEST,
SSL_CLIENT_HELLO,
SSL_SERVER_HELLO,
SSL_SERVER_CERTIFICATE,
SSL_SERVER_KEY_EXCHANGE,
SSL_CERTIFICATE_REQUEST,
SSL_SERVER_HELLO_DONE,
SSL_CLIENT_CERTIFICATE,
SSL_CLIENT_KEY_EXCHANGE,
SSL_CERTIFICATE_VERIFY,
SSL_CLIENT_CHANGE_CIPHER_SPEC,
SSL_CLIENT_FINISHED,
SSL_SERVER_CHANGE_CIPHER_SPEC,
SSL_SERVER_FINISHED,
SSL_FLUSH_BUFFERS,
SSL_HANDSHAKE_OVER
} tls_states_t;
Can you explain the reason for this and help me to solve the problem ?
Show LessHi everybody.
Our customer is thinking to integrate wireless connectivity using module based CYW43438 and SDK Wiced.
Does CYW/BCM 43438 support Apple HomeKit?
Thanks!!!
Show Less