Wi-Fi Combo Forum Discussions
Hi.
I am trying to download a 24KB file in 4KB chunks with http_get?
Unfortunately, the way wiced_http_get is written, even though the buffer and buffer length passed into this function are less, it just gets overwritten without any notification to the user?
On line 96, we copy the data into the buffer passed by the caller of this function. How is the user notified in the next iteration of the do..while loop?
52 wiced_result_t wiced_http_get( wiced_ip_address_t* address, const char* query, void* buffer, uint32_t buffer_length )
53 {
54 wiced_tcp_socket_t socket;
55 wiced_packet_t* reply_packet;
56 wiced_result_t result = WICED_ERROR;
57 wiced_result_t rx_result;
58 char * buffer_ptr = (char*) buffer;
59
60 if ( ( result = wiced_tcp_create_socket( &socket, WICED_STA_INTERFACE ) ) != WICED_SUCCESS )
61 {
62 return result;
63 }
64 result = wiced_tcp_connect( &socket, address, 80, 10000 );
65 if ( result != WICED_SUCCESS )
66 {
67 wiced_tcp_delete_socket( &socket );
68 return ( result );
69 }
70
71 if ( ( result = wiced_tcp_send_buffer( &socket, query, (uint16_t) strlen( query ) ) != WICED_SUCCESS ) )
72 {
73 wiced_tcp_disconnect( &socket );
74 wiced_tcp_delete_socket( &socket );
75 return ( result );
76 }
77
78 WPRINT_LIB_INFO( ("waiting for HTTP reply\n") );
79
80 do
81 {
82 rx_result = wiced_tcp_receive( &socket, &reply_packet, 5000 );
83 if ( rx_result == WICED_SUCCESS )
84 {
85 uint8_t* data;
86 uint16_t data_length;
87 uint16_t available;
88 uint32_t data_to_copy;
89
90 /* Record the fact we received a reply of some kind */
91 result = WICED_SUCCESS;
92
93 /* Copy data into provided buffer */
94 wiced_packet_get_data( reply_packet, 0, &data, &data_length, &available );
95 data_to_copy = MIN(data_length, buffer_length);
96 memcpy( buffer_ptr, data, data_to_copy );
97 buffer_ptr += data_to_copy;
98 buffer_length -= data_to_copy;
99 wiced_packet_delete( reply_packet );
100 }
101 } while ( rx_result == WICED_SUCCESS );
102
103 wiced_tcp_disconnect( &socket );
104 wiced_tcp_delete_socket( &socket );
105
106 return ( result );
107 }
Please help?
Show LessI have succesfully used the previously posted I2C Interface Example with WICED SDK-3.x as a starting point for interfacing with I2C sensors.
Before putting further effort into creating higher-level I2C function calls, a quick check here on the forum site:
- Is there any code available for additional I2C interface examples?
- Can anyone possibly share code (for WICED SDK) for interfacing with specific I2C sensors?
- Are there any gotchas or issues to be aware of? (DMA operation,etc...)
Thanks
Peter
Show LessHi everyone!
I am programming bluetooth and wi-fi apps using BCM4343W and SDK-3.5.2
Programming works only depend on example in SDK. not API Manual. at point of bluetooth. (there are wifi APIs)
Where can I found bluetooth API documents in SDK-3.5.2 ? or getting start documents ?
Apps object(goal) is that data from uart service in bluetooth transfers another internet server.(just tcp packets)
and I want to make app using bluetooth uart program using BCM4343W. and bluetooth need to be central & peripheral.
which example in SDK is most nearly this projects ?
Thank you for reading this.
Sincerly.
Show LessWhen using the "wiced_dct_read_wifi_config_section ( )" to read the WiFi settings from the DCT area, and if the WiFi password contains a "0" in its string,
then the password is read incorrectly !!
example:
password = 24C51A718F --> reading it from the DCT = 24C51A718F (good)
password = 24C50A708F --> reading it from the DCT = A1E011DD53 (not good)
so there is a bug with the read function, however, the write function is OK.
Show LessI am using Avnets BCM4343W IOT starterkit, and want to add an extra desired state to the startup example "shadow".
Broadcom/WICED provide header files to libray functions like
mqtt_connection_event_cb
parse_json_shadow_status
wiced_JSON_parser_register_callback
Wiced_mqtt_connect
wiced_mqtt_publish
but no source code unfortunately, and not enough documentation or examples for me to add an extra desired state( a local threshold variable), that I can control from
AWS iot shadow update(delta state).
How can I publish so it will register as a desired state in AWS, and how can I parse the jason document and extract the value of a specific state "threshold"?
Can I use "parse_json_shadow_status" or is it custom made for the shadow example program?
What would it take to expand the BCM4343W board to collect data from 4 sensors, send data to AWS and be able to change "threshold" to each of them?
Can BCM4343W handle 4 concurrent treads, one for each sensor?
Thanks in advance.
Show Less
Dear all,
I want to control channel switching on BCM43228 wireless card. But I can not find the data sheet about the radio chip of BCM43228. Now, my computer has Ubuntu 14.04 with wireless driver " hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz". However, I can not switch Wi-Fi channel with this driver. Can anyone help me ??
Show LessHi,
We are using Wiced SDK-3.3.1 with BESL library with ARM-CortexM4 platform. We have developed a test program which tests the TCP connection over SSL. This program does not use ca certificates so the authentication mode is set to SSL_VERIFY_NONE. When we tried running this program, the program got fail. When we debug it further, found that it is failing in ssl_handshake_client_async() function. Our observation is, first two iterations of ssl_handshake_client_async() API returns SUCCESS but third iteration returns TLS_ERROR_OUT_OF_MEMORY error.
We also tried increasing the Heap size(upto 64K) but that did not help. It would be helpful if you could guide us, also if you have any sample test program for the same please point us to it.
Thanks & Regards,
Santosh
Show LessHi,
I'm writing a WICED application.
It seem that any call to wiced_tls_deinit_identity() will cause a crash when trying to free the RSA key in wiced_tls.c:
if ( tls_identity->private_key.common.type == TLS_RSA_KEY )
{
rsa_free( (rsa_context*)&tls_identity->private_key.rsa );
}
I noticed that in your MQTT implementation you never call wiced_tls_deinit_identity(), is there any known issue with it?
Cheers,
Matteo
Show LessHi,
I'm using lwip tcp library in my application. I am getting EAI_MEMORY: 203 error with lwip_getaddrinfo() method. The first time the method gives no error, but when used a second time at a different place in the application, it generates this error. Can you suggest a way I could correct this error? I have tried allocating suitable amount of memory using malloc. But it was of no use.
This is the memory dumped into the BCM943364WCD1. Am I exceeding memory? How much memory can it handle?
Show LessI have built, downloaded and run the snip.scan demo program. When executed, PuTTY shows ...
Starting WICED v3.5.2
Platform BCM943362WCD4 initialised
Started ThreadX v5.6
Initialising NetX_Duo v5.7_sp2
Creating Packet pools
Waiting for scan results...
# Type BSSID RSSI Rate Chan Security SSID
----------------------------------------------------------------------------------------------
I get no SSID data.
I am wondering if the problem is that I have a BCM94343WWCD1 eval board. The WICED-SDK Make Target builds are for the BCM943362WCD4 board.
I have tried all of them and I get the same results.
Is there something I need to change to get this to work on the BCM94343WWCD1 ?
Thanks
Bill
Show Less