Wi-Fi Combo Forum Discussions
Working with SDK 3.5.2, BCM94343 platform.
I've tried "wiced_bt_dev_read_rssi" with custom callback.
But it always returns WICED_BT_BUSY and the callback is never entered.
Is it possible for a WICED BLE peripheral to retrieve RSSI of a connected remote device?
Show LessWICED SDK 3.5.2 using the Broadcom BCM9WCD1EVAL1 demo board with the apps/demo/aws_iot/pub_sub/publisher project
Using the AWS IoT publisher sample project. I have generated my client cert and priv key and loaded into resources in project. These have been tested externally so I know they are good. The root CA cert is also known to be good.
I modified mqtt_network.c mqtt_network_init() function call and its call to wiced_tls_init_context() and changed the NULL for peer CN to a server name that is totally different than the once I am actually connecting to, and TLS verification is required.
I then placed a lot of WPRINT_APP_INFO() function calls to output debug info to the console to trace out the various return values and determine what paths are being taken. See below for a trace.
Everything appears okay as we move along the code until run the wiced_tcp_start_tls() function which in turn calls wiced_generic_start_tls_with_ciphers() where in the do while loop for the ssl handshake we have a problem.
The mqtt_network_connect() function will make multiple attempts to connect before giving up. The first pass the handshake fails with error code 5037 = CERTIFICATE_NAME_MISMATCH. Okay, that is what I expected using my settings below. However the do while loop in the mqtt_network_connect() function says that we should try again, so it does. The problem is that the second attempt PASSES. Crazy!
Something is not being properly initialized before the next pass is my guess. Or there is some counter getting maxed out (not reset) and a default return code of success is being returned. Whatever is going on, I am stuck trying to debug this because there is no source code for the ssl_handshake_client_async() function.
And if I use the proper name in the peer cn parameter in the wiced_tls_init_context() function call, it is exactly the same result for AWS IoT connection. First pass through is error 5037, second pass is success. While that seems good, the fact that I can do this with a bad peer cn name means that this verify is not trustworthy and I cannot protect against MITM attacks.
When can we expect a fix? This was reported back on Aug 18 2015 and it is still not answered or fixed? Why?
https://community.broadcom.com/message/18777#18777
#define MQTT_BROKER_ADDRESS | "AWG29O1L5K0Q3.iot.us-east-1.amazonaws.com" |
wiced_tls_init_context( &socket->tls_context, &socket->tls_identity, "www.google.com" );
#define WICED_TLS_DEFAULT_VERIFICATION | (TLS_VERIFICATION_REQUIRED) |
Starting WICED v3.5.2
Platform BCM943362WCD4 initialised
Started ThreadX v5.6
Initialising NetX_Duo v5.7_sp2
Creating Packet pools
WWD SDIO interface initialised
WLAN MAC Address : 40:2C:F4:AF:32:91
WLAN Firmware : wl0: Oct 22 2015 15:05:09 version 5.90.230.15 FWID 01-47a517a
Joining : XXX
Successfully joined : XXX
Obtaining IPv4 address via DHCP
DHCP CLIENT hostname WICED IP
IPv4 network ready IP: 192.168.1.68
Setting IPv6 link-local address
IPv6 network ready IP: FE80:0000:0000:0000:422C:F4FF:FEAF:3291
Resolving IP address of MQTT broker...
Resolved Broker IP: 54.85.255.214
[MQTT] Opening connection...
[mqtt_network.c] mqtt_network_init() wiced_tcp_create_socket() success...
[mqtt_network.c] mqtt_network_init() using security...
[mqtt_network.c] mqtt_network_init() wiced_tls_init_root_ca_certificates() success...
[mqtt_network.c] mqtt_network_init() - wiced_tls_init_identity() success...
[mqtt_network.c] mqtt_network_init() - wiced_tls_init_context() success...
[mqtt_network.c] mqtt_network_init() - wiced_tcp_enable_tls() success...
[mqtt_network.c] mqtt_network_init() - mqtt_network_connect()
[mqtt_network.c] mqtt_network_connect() try 0
[tcpip.c] wiced_tcp_connect() wiced_tcp_start_tls()
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - root_ca_certificates exist
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - identity does exist
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() error 5037...
error 5037...
result = 5037...
[mqtt_network.c] mqtt_network_connect() try 1
[tcpip.c] wiced_tcp_connect() wiced_tcp_start_tls()
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - root_ca_certificates exist
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - identity does exist
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - do while loop ( tls_context->context.state != SSL_HANDSHAKE_OVER
[wiced_tls.c] wiced_generic_start_tls_with_ciphers() - ssl_handshake_client_async() success...
success...
result = 0...
success...
[mqtt_network.c] mqtt_network_init() - wiced_tcp_register_callbacks() success...
Success
Show LessOn WICED-SDK-3.5.1, I see that the callbacks for up or down are not working reliably.
for snip.link_status: after you register callbacks and bring up STA.
/* Register callbacks */
wiced_network_register_link_callback( link_up, link_down, WICED_STA_INTERFACE );
/* Bring up the STA (client) interface ------------------------------------------------------- */
wiced_network_up( WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL );
/* Initialise semaphore to notify when the network comes up */
wiced_rtos_init_semaphore( &link_up_semaphore );
I see that when you bring the AP down, the link down status callback only gets pushed out to subscribers upon a subsequent bring up of the AP?
Show LessHi
I'm trying to bond with my Android phone from a BCM943341 eval board.
The bluetooth communications seems to go well until I try to connect to it.
I use wiced_bt_start_inquiry to start the inquiry.
When I see the phone, I cancel the inquiry and try to bond with it using wiced_bt_dev_sec_bond. I then get the BTM_PAIRING_IO_CAPABILITIES_BR_EDR_REQUEST_EVT event and set the local_io_cap to DISPLAY_AND_KEYBOARD (which is what I will be having on the target board), and auth_req to BTM_AUTH_ALL_PROFILES_NO (which is a guess).
I then get a connect status callback telling me it is connected.
Then I get a BTM_USER_CONFIRMATION_REQUEST_EVT with the PIN, and I reply with a:
wiced_bt_dev_confirm_req_reply(WICED_BT_SUCCESS, p_event_data->user_confirmation_request.bd_addr);
A dialog pops up on the phone with the PIN and I press PAIR.
After that, I get a BTM_PAIRING_COMPLETE_EVT. This is when I initiate the service discovery using:
wiced_bt_sdp_init_discovery_db(sdp_disc_db, size, 0, NULL, 0, NULL)
(where size is the sum of the wiced_bt_sdp_discovery_db_t plus 50 records and 50 attributes total 1600 bytes)
Then I start the discovery using:
wiced_bt_sdp_service_search_request(bd_addr, sdp_disc_db, discComplete_cb);
But the result I get to the discComplete_cb (after a few seconds) is always FFF1 (WICED_BT_SDP_CONN_FAILED).
Anyone has a suggestion?
Show LessIn the method "wiced_hostname_lookup" from wiced_tcpip_common.c, there is a check to see if a DNS lookup is necessary. For this check the method "str_to_ip" from wiced_lib.c is used. The str_to_ip method, however, considers URL's with three dots in them as IP addresses. Hence no DNS lookup is done.
I have attached a very minimal example that reproduces this issue in dns_lookup-fails.c.
Locally I have fixed the issue by patching str_to_ip to include a check if the IP address is nonzero.
I.e. change "if ( num == 4 )" to "if ( num == 4 && (address->ip.v4 != 0) )"
Show LessIs BCM43907 available for purchase yet? We need a few SOCs to begin development on a few prototypes...
Hi, I using a WICED version 3.3.1 with Threadx.NetX duo and send tcp stream with function "wiced_tcp_send_buffer()" the function is return "WICED_SUCCESS" but the wireshark capture is not OK
when PC is not receive packet and it answer with TCP dup ack but Netx duo is not retransmit a loss packet, it send the next packet forward.
i open socket with default in " nx_tcp_socket_transmit_configure(&socket->socket, WICED_TCP_TX_DEPTH_QUEUE, WICED_TCP_SEND_TIMEOUT/WICED_TCP_TX_RETRIES, WICED_TCP_TX_RETRIES, 0);"
can any one help me to configuration NetX duo?
or
NetX duo has a callback function to handler this error?
Show LessI notice that there are a bunch of documents that have links in the document directory that have broken links (i.e. they weren't in the installer).
Specifically:
file:///C:/WICED-SDK-3.5.2/doc/WICED-Application-Framework-April-2013.pdf
file:///C:/WICED-SDK-3.5.2/doc/WICED-SDK-Software-Stack.pdf
The two things that I am specifically looking for
1. How do you create a new "blank" project? (obviously I can run all of the examples)
2. Is there a software architecture overview... how board support works.. how the RTOS abstraction layer works.
Thanks,
Alan
Show LessAn unexpected error occurred that if I use Defensics Software to change WPA(AES) handshake message,
then my example app(main.c) doesn't work for BCM943438WCD1.
WICED SDK: 3.3.1
Chip: BCM943438
Make Target: FreeRTOS-LwIP-SDIO
Example App Source Code: main.c
Example App Log: log.txt
Wireshark log: WPA-cap1.pcapng (Line 46 => Correct handshake message, Line 117 => Error handshake message)
Show Less