Wi-Fi Combo Forum Discussions
text.format{('custom.tabs.no.results')}
Hi
The Ethernet interface doesn't get any data, in this two apps:
test.console-CYW943907AEVAL1F download run
and
snip.ping_ethernet-CYW943907AEVAL1F download run
In the WICED Studio 6.0.1.5 the Ethernet interface works perfect with the two apps !!!
Cypress, please give us a workaround, or tell us when the next WICED Studio version will be released !
Thanks
CC
Show LessMy warmest spring hello to all fellow raccoons!
A quick one:
What is the CLM blob and why the 43362 does not require one?
I am using WICED SDK v6.1.
I have observed that if I compile, for example the scan snip, with the debug option I get a failed assertion in:
0x0802609e in host_buffer_release (buffer=0x0, direction=WWD_NETWORK_RX) at WICED/network/NetX_Duo/WWD/wwd_buffer.c:189
189 wiced_assert( "Error: Invalid buffer\n", buffer != NULL );
(gdb) bt
#0 0x0802609e in host_buffer_release (buffer=0x0, direction=WWD_NETWORK_RX) at WICED/network/NetX_Duo/WWD/wwd_buffer.c:189
#1 0x0801bc20 in wwd_wifi_get_iovar_buffer (iovar_name=0x802d7ec "clmver", out_buffer=0x2000be64 "", out_length=200, interface=WWD_STA_INTERFACE) at WICED/WWD/internal/wwd_wifi.c:4192
#2 0x0801c1b2 in wwd_wifi_get_clm_version (version=0x2000be64 "", length=200 '\310') at WICED/WWD/internal/wwd_wifi.c:4876
#3 0x08016b02 in wiced_wlan_connectivity_init () at WICED/internal/wifi.c:310
#4 0x0801696a in wiced_init () at WICED/internal/wifi.c:180
#5 0x08016712 in application_start () at apps/snip/scan/scan.c:98
#6 0x0800d23a in application_thread_main (thread_input=0) at WICED/RTOS/ThreadX/WICED/wiced_rtos.c:231
#7 0x080150b4 in _tx_thread_shell_entry ()
Hello to my fellow digital raccoons!
Quick one:
Is there any case that with WICED Studio 6.1.0 the build summary is buggy?
I am using a macOSX high sierra.
I do not see complete info about Flash requirements:
Show Less
Hi!
How do I change the snip.httpbin_org example to enable it to access my custom URL?
Basically, my application involves pushing the GPIO status on my custom webpage on the web server.
So, I am thinking of making an http put request with the GPIO status on my custom webpage by building-up on this example.
If there's any other approach that I can consider, I'll be happy to hear from you all.
Thanks.
Show LessHi all!
Anybody knows if it is possible to enable Monitor mode on Raspberry Pi B Plus with Cypress CYW43455 WiFi NIC? It works well capturing 802.11 PHY and MAC headers?
Thanks a lot!
Show LessDear vnak:
Reagarding the previous thread: interface about wifi+bt combo-BCM43353
One more question:BT audio data can transmit though UART instead of I2S/PCM, is it right?
Best regards!
limin
Show LessWe're having an issue with connecting to Google IOT Cloud using the MQTT bridge and TLS on CYW943907AEVAL1F running the latest Wiced Studio 6.1 (WICED-Studio-6.1.0.85-IDE-Installer).
I've narrowed down the issue to a couple methods, but cannot for the life of me figure out what the code is supposed to be doing.
in wiced_tls.c, there is this method (~line 625):
static int ssl_receive_packet( void *ctx, unsigned char **buf, size_t len )
... which (~line 710):invokes wiced_packet_get_data .... which returns 4
else
{
WPRINT_SECURITY_DEBUG (("Skip [%d] no of bytes from TCP received packet with length : [%d]\n",
socket->tls_context->context.received_packet_bytes_skipped,
socket->tls_context->context.received_packet_length ));
result = wiced_packet_get_data( (wiced_packet_t*)socket->tls_context->context.received_packet,
socket->tls_context->context.received_packet_bytes_skipped, (uint8_t**) ( buf ),
(uint16_t*)&length, &available_data_length );
if ( result != WICED_SUCCESS )
{
WPRINT_SECURITY_DEBUG (("wiced_packet_get_data failed with result : [%d] \n", result ));
return result;
}
Therefore, with debugging turned on results in:
Skip [33] no of bytes from TCP received packet with length : [33]
wiced_packet_get_data failed with result : [4]
According to the MQTT protocol, it looks to me like everything went fine during the MQTT Connect (Connect ACK) return indicates success.
WICED/security/BESL/mbedtls_open/library/ssl_tls.c:1939: dumping 'raw buffer after decryption' (4 bytes)
WICED/security/BESL/mbedtls_open/library/ssl_tls.c:1939: 0000: 20 02 00 00
I've attached a log with debugging turned on, along with some additional debugging.
Any help would be appreciated as this is a blocking issue....
Thanks in advance.
============================================================================================================
Highlighted below are the additional logging statements added to the tcp_ip.c module ~(Line 914):
============================================================================================================
wiced_result_t wiced_packet_get_data( wiced_packet_t* packet, uint16_t offset, uint8_t** data,
uint16_t* fragment_available_data_length, uint16_t *total_available_data_length )
{
NX_PACKET* first_packet = packet;
NX_PACKET* iter = packet;
uint16_t requested_offset = offset;
uint16_t fragment_length;
wiced_assert( "Bad args", (packet != NULL) && (data != NULL) && (fragment_available_data_length != NULL) &&
(total_available_data_length != NULL) );
while ( iter != NULL )
{
/* It is more appropriate to use the difference between nx_packet_append_ptr and nx_packet_prepend_ptr rather
* than nx_packet_length. If the packet was fragmented the nx_packet_length will reflect the sum of the data length of all
* fragments, not the length of the fragment alone */
fragment_length = (uint16_t)( iter->nx_packet_append_ptr - iter->nx_packet_prepend_ptr );
WPRINT_APP_INFO(("[TCPIP] wpgd loop1-frag_len[%u], frag_av_len[%u] offset[%u], nx_PLen:[%lu], nx_app_ptr[%u] nx_pre_ptr[%u]\n",
fragment_length, *fragment_available_data_length, offset, iter->nx_packet_length,
*iter->nx_packet_append_ptr, *iter->nx_packet_prepend_ptr ));
if ( iter->nx_packet_length == 0 )
{
*data = NULL;
*fragment_available_data_length = 0;
*total_available_data_length = 0;
return WICED_TCPIP_SUCCESS;
}
else if ( offset < fragment_length )
{
*data = iter->nx_packet_prepend_ptr + offset;
*fragment_available_data_length = (uint16_t) ( iter->nx_packet_append_ptr - *data );
/* This will give number of bytes available after this offset including this packet and further packets in the chain */
*total_available_data_length = (uint16_t) ( first_packet->nx_packet_length - requested_offset );
return WICED_TCPIP_SUCCESS;
}
else
{
offset = (uint16_t) ( offset - ( iter->nx_packet_append_ptr - iter->nx_packet_prepend_ptr ) );
}
WPRINT_APP_INFO(("[TCPIP] wpgd loop - frag_len[%u], frag_avail_len[%u] offset[%u], nx_PLen:[%lu]\n",
fragment_length, *fragment_available_data_length, offset, iter->nx_packet_length ));
iter = iter->nx_packet_next;
}
WPRINT_APP_INFO(("[TCPIP] wpgd out packet:[lu] offset[%u] data[%d] frag avail[%u] tot[%u]...\n",
//*packet->dummy,
offset, **data, *fragment_available_data_length, *total_available_data_length));
return WICED_TCPIP_ERROR;
}
Show LessHello All!
I hope this is the right place to post this question.
I just got a kit and am trying to scan for BLE packets and send them to a local server on my computer. It's mostly working but my HTTP connection get stuck after a few BLE packets are scanned and sent. My current implementation has a console command tied to a callback function that scans for BLE packets and then opens a connection to the server set up on my laptop.
I haven't had much experience working with HTTP requests, but I have to re-open a connection every time I want to send a packet, since I get a HTTP_DISCONNECTED event after sending a packet. I don't know if this is how it is designed to work. Is there another way of implementing it?
I picked up the HTTP post request implementation from http://www.cypress.com/blog/technical/wiced-http-client and I added a BLE scan callback function to the ble_hello_sensor example in WICED IDE.
After all the packets are scanned, I think that the call http_client_connect is stuck, although it has a timeout, so I'm not sure what's happening there.
Connecting to 10.0.0.59
Connected
Disconnected from 10.0.0.59
device found!
Connecting to 10.0.0.59 <--- Never goes beyond this!
My ble_scan, packet sending code and event handler is like this:
static int hello_sensor_scan_ble( int argc, char *argv[] )
{
WPRINT_BT_APP_INFO( ("************************\n") );
WPRINT_BT_APP_INFO( ("Scanning for BLE devices\n") );
WPRINT_BT_APP_INFO( ("************************\n") );
// wiced_bt_ble_observe (WICED_TRUE, 2,(wiced_bt_ble_scan_result_cback_t *) hello_sensor_scan_ble_callback);
wiced_bt_ble_scan(BTM_BLE_SCAN_TYPE_HIGH_DUTY, WICED_TRUE, (wiced_bt_ble_scan_result_cback_t *) hello_sensor_scan_ble_callback);
return ERR_CMD_OK;
}
static void hello_sensor_scan_ble_callback(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data)
{
uint8_t adv_data_length;
uint8_t *p_data = NULL;
uint8_t LENGTH = 7;
char* name = "abcdefg";
switch (p_scan_result->ble_evt_type)
{
case BTM_BLE_EVT_CONNECTABLE_ADVERTISEMENT:
/* Check the contents of the ADV - what's the name? */
p_data = wiced_bt_ble_check_advertising_data( p_adv_data, BTM_BLE_ADVERT_TYPE_NAME_COMPLETE, &adv_data_length);
if (adv_data_length != 0) {
if (( memcmp( p_data, name, LENGTH ) == 0 )) {
WPRINT_BT_APP_INFO(("device found!\n"));
send_packet();
}
return;
default:
return;
}
}
static void send_packet(void)
{
wiced_result_t result;
http_client_init( &client, WICED_STA_INTERFACE, event_handler, NULL );
WPRINT_APP_INFO( ( "Connecting to %s\n", SERVER_HOST ) );
/* 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);
/* 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;
}
WPRINT_APP_INFO( ( "Connected\n" ) );
http_header_field_t header[3];
char messageBody[128]; // Enough to hold the message body
char messageLengthBuffer[10]; // Enough to hold the characters for the Content-Length: header
char *receiverAddress = "192.168.1.255";
char *rssi = "1";
char *senderAddress = "192.168.1.255";
sprintf(messageBody,"&receiverAddress=%s&rssi=%s&senderAddress=%s", receiverAddress, rssi, senderAddress);
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 MIME_FORM_URL "application/x-www-form-urlencoded"
header[1].field = HTTP_HEADER_CONTENT_TYPE;
header[1].field_length = sizeof( HTTP_HEADER_CONTENT_TYPE ) - 1;
header[1].value = MIME_FORM_URL;
header[1].value_length = sizeof( MIME_FORM_URL ) - 1;
sprintf(messageLengthBuffer," %d",strlen(messageBody)); // 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);
http_request_init( &requests[0], &client, HTTP_POST, request_uris[2], HTTP_1_1 );
http_request_write_header( &requests[0], &header[0], 3 );
http_request_write_end_header( &requests[0] );
http_request_write( &requests[0], (uint8_t*)messageBody, strlen(messageBody) );
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,10000);
if ( result != WICED_SUCCESS )
WPRINT_APP_INFO( (" POST request timed out \n") );
else
{
WPRINT_APP_INFO( ("\nPOST successful\n") );
}
}
http_request_deinit( &requests[0] );
http_client_disconnect( &client );
}
static void event_handler( http_client_t* client, http_event_t event, http_response_t* response )
{
switch( event )
{
case HTTP_CONNECTED:
WPRINT_APP_INFO(( "Connected to %s\n", SERVER_HOST ));
break;
case HTTP_DISCONNECTED:
{
WPRINT_APP_INFO(( "Disconnected from %s\n", SERVER_HOST ));
break;
}
case HTTP_DATA_RECEIVED:
{
wiced_rtos_set_semaphore(&requestSemaphore);
break;
}
default:
break;
}
}
}
}
Thanks!
Show LessUsing a STM412 Discovery EVK connected to a Murata 4343W EKV through the SD card slot, we are unable to get SSID's. Logs for the same code base used on WWCD1 Wiced kit, and the STM412 kit are attached. MAC address and other IO comms are coming through after a successful firmware download. Would appreciate if anyone has any feedback or guidance to what the issue could be. WiFi Host wake and WIFI_REG_ON is externally connected between kits.
Show Less