What example code is provided for connecting the Avnet BCM4343W IoT Starter Kit with Amazon Web Services?

Solved
PeterF's picture
PeterF
Moderator(14)

Multiple AWS examples are provided within the latest Broadcom WICED SDK (these are located under the \apps\demo\aws_mqtt folder)

 

PUB_SUB
Publisher  : Example that publishes each time the User button on the EVB is pressed
Subscriber: Example subscribing to same topic. Toggles it's USER LED according to the message recieved

 

SHADOW
Example application that syncs- and reports device states to AWS Things Shadow.

 

LIGHT SENSOR CONTROLLED WINDOW (Avnet AES-EVB-BCM4343W platform)
One executable for publishing and the other for subscribing.
Publisher : Senses light and controls remote LED based on the light intensity by publishing to topic WICED_BULB in AWS IOT.
Subscriber: Receives the message sent for topic WICED_BULB and controls the LED.

 

TEMPERATURE SENSOR CONTROLLED WINDOW (Broadcom BCM943364WCD1 platform)
Publisher : Senses the indoor room temperature and gets outside temperature from weather.com.
Controls remote LED based on delta by publishing to topic WICED_BULB in AWS IOT Service.
Subscriber: Receives the message sent for topic WICED_BULB and controls the LED accordingly.

jeffddrake's picture
jeffddrake
Junior(0)

Hi, unless I have downloaded the incorrect SDK I believe the path is /apps/demo/aws_iot and not /apps/demo/aws_mqtt.

Is this correct?

PeterF's picture
PeterF
Moderator(14)

Jeff, thanks for pointing this out!
The AWS demo folder name changed in the release version WICED SDK 3.4.0-AWS 
ie. the four example folders are now located under \apps\demo\aws_iot
  \pub_sub
  \shadow
  \light_sensor_controlled_window
  \temperature_sensor_controlled_window

pihlung's picture
pihlung
Junior(2)

I copied the "light_sensor_controlled_window" code from WICED SDK 3.4.0-AWS to WICED-SDK-3.5.2. Added platform AWS94343W_AVN in publisher.mk. Create make target "demo.aws_iot.light_sensor_controlled_window-BCM94343W_AVN download download_apps run". When I run the make target for this project, I am still missing a /build directory for this project.

Console output:

13:22:06 **** Build of configuration Default for project WICED-SDK ****
"C:\\Users\\...\\Documents\\WICED\\WICED-SDK-3.5.2\\WICED-SDK\\make.exe" demo.aws_iot.light_sensor_controlled_window-BCM94343W_AVN download download_apps run 
MAKEFILE MAKECMDGOALS=demo.aws_iot.light_sensor_controlled_window-BCM94343W_AVN download download_apps run OTA2_SUPPORT is disabled
Making config file for first time
+-----------------------------------------------------------------------------------------------------+ 
| IMPORTANT NOTES                                                                                     | 
+-----------------------------------------------------------------------------------------------------+ 
| Wi-Fi MAC Address                                                                                   | 
|    The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt                 | 
|    Ensure each target device has a unique address.                                                  | 
+-----------------------------------------------------------------------------------------------------+ 
| MCU & Wi-Fi Power Save                                                                              | 
|    It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz | 
|    reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave   | 
|    Application Note located in the documentation directory if you plan to use powersave features.   | 
+-----------------------------------------------------------------------------------------------------+ 
Component demo.aws_iot.light_sensor_controlled_window not found - attempting to find on WICED website
Can't open perl script "./tools/makefiles/fetch_component.pl": No such file or directory

Unknown component: demo.aws_iot.light_sensor_controlled_window - directory or makefile for component not found. Ensure the demo/aws_iot/light_sensor_controlled_window directory contains light_sensor_controlled_window.mk
Below is a list of valid local components (Some are internal): 
WICED
GCC
MCU.STM32F2xx
MCU.STM32F2xx.peripherals
MCU.STM32F2xx.peripherals.libraries
MCU.BCM4390x
MCU.BCM4390x.peripherals
MCU.BCM4390x.peripherals.uart
MCU.BCM4390x.peripherals.usb_host
MCU.BCM4390x.peripherals.shared
MCU.BCM4390x.peripherals.sdio_host
MCU.BCM4390x.peripherals.ethernet
MCU.BCM4390x.peripherals.crypto.tiny_crypto
MCU.BCM4390x.peripherals.spi_flash
MCU.BCM4390x.BCM43903
MCU.BCM4390x.common.B1
MCU.BCM4390x.common.B0
MCU.BCM4390x.BCM43907
MCU.BCM4390x.BCM43909
MCU.STM32F4xx
MCU.STM32F4xx.peripherals
MCU.STM32F4xx.peripherals.libraries
MCU.LPC17xx
MCU.LPC17xx.peripherals
MCU.LPC17xx.peripherals.libraries
MCU.SAM4S
MCU.SAM4S.peripherals
MCU.SAM4S.peripherals.libraries.ASF
MCU.LPC18xx
MCU.LPC18xx.peripherals
MCU.LPC18xx.peripherals.libraries
MCU.BCM439x
MCU.BCM439x.WWD.internal
MCU.BCM439x.peripherals
MCU.BCM439x.peripherals.ROM.4390A1
IAR
WICED.WWD
LwIP
LwIP.WICED
LwIP.WWD
LwIP.WWD.FreeRTOS
NoNS
NoNS.WWD
NetX
NetX.WWD
NetX.WICED
NetX_Duo
NetX_Duo.WWD
NetX_Duo.WICED
BESL
BESL.crypto_open
ThreadX
ThreadX.WWD
ThreadX.WICED
NoOS
NoOS.WWD
FreeRTOS
FreeRTOS.WWD
FreeRTOS.WICED
waf.ota2_bootloader
waf.tiny_bootloader
waf.bootloader
waf.sflash_write
test.bt_mfg_test
test.apps_sleep
test.diagnostics
test.powersave
test.console
test.mfg_test
test.iperf_app
wwd.scan
wwd.appliance
wwd.ping
wwd.canned_send
snip.ota2_example
snip.uart
snip.udp_receive
snip.ap_clients_rssi
snip.keep_alive
snip.dtls_client
snip.nfc.config_token_server
snip.nfc.tag_reader
snip.nfc.config_token_client
snip.nfc.tag_writer
snip.wps_enrollee
snip.httpbin_org
snip.secure_mqtt
snip.wps_registrar
snip.ssdp
snip.ping_webserver
snip.mqtt
snip.https_client
snip.udp_transmit
snip.ota_fr
snip.ping_ethernet
snip.spi_slave
snip.spi_slave.master
snip.tcp_client_powersave
snip.stack_overflow
snip.packet_filter
snip.graphics.graphicstest
snip.graphics.audio_display
snip.graphics.hello
snip.tcp_server
snip.dct_read_write
snip.sntp_get_time
snip.amqp
snip.coap_app
snip.custom_ie
snip.amqps
snip.flac
snip.tftp
snip.email
snip.bluetooth.bt_dualmode_server
snip.bluetooth.ble_proximity_reporter
snip.bluetooth.ble_hello_sensor
snip.ping_powersave
snip.security_types
snip.config_mode
snip.gpio
snip.powercycle
snip.scan
snip.apsta
snip.tcp_server_async
snip.stdio
snip.https_server
snip.ping_deepsleep
snip.tcp_client
snip.crypto
snip.thread_monitor
snip.service_discovery
snip.power_management
snip.bluetooth_audio
snip.link_status
snip.http_server_sent_events
demo.temp_control
demo.coap_exosite
demo.aws_iot.temperature_controlled_device.remote_sensor
demo.aws_iot.temperature_controlled_device.device
demo.aws_iot.light_sensor_controlled_window.publisher
demo.aws_iot.light_sensor_controlled_window.subscriber
demo.aws_iot.shadow
demo.aws_iot.temperature_sensor_controlled_window.publisher
demo.aws_iot.temperature_sensor_controlled_window.subscriber
demo.aws_iot.pub_sub.publisher
demo.aws_iot.pub_sub.subscriber
demo.bt_smartbridge
demo.apollo
demo.audio_loopback
demo.appliance
demo.bt_internet_gateway.restful_smart_server
demo.bt_internet_gateway.bt_http_proxy_service.hps_client_keypad
demo.bt_internet_gateway.bt_http_proxy_service.hps_server
demo.bt_internet_gateway.blemesh_network
utilities.base64
utilities.command_console
utilities.command_console.trace
utilities.command_console.platform
utilities.command_console.thread
utilities.command_console.fs
utilities.command_console.wifi
utilities.command_console.mallinfo
utilities.command_console.traffic_generation
utilities.command_console.p2p
utilities.command_console.ping
utilities.command_console.ethernet
utilities.command_console.wps
utilities.JSON_parser
utilities.linked_list
utilities.ring_buffer
utilities.TLV
utilities.mini_printf
utilities.crc
drivers.sensors.NCP18XH103J03RB
drivers.nfc
drivers.spi_slave
drivers.spi_slave.master
drivers.USB.USBX
drivers.USB.USBX.WICED
drivers.bluetooth_le
drivers.bluetooth_le.BTE
drivers.bluetooth
drivers.bluetooth.sbc
drivers.bluetooth.BTE
drivers.bluetooth.mfg_test
drivers.audio.AK4961
drivers.audio.spdif
drivers.audio.AK4954
drivers.audio.WM8533
drivers.spi_flash
drivers.power_management
drivers.power_management.max17040
drivers.power_management.max8971
graphics.u8g
bt_audio
daemons.ota_server
daemons.DNS_redirect
daemons.Gedday
daemons.simple_HTTP_server
daemons.DHCP_server
daemons.bt_smartbridge
daemons.tftp
daemons.HTTP_server
daemons.ota2_service
daemons.SSDP
daemons.bt_internet_gateway
daemons.bt_internet_gateway.restful_smart_server
daemons.bt_internet_gateway.bt_http_proxy_server
daemons.bt_internet_gateway.blemesh
daemons.device_configuration
test.wl_tool
test.wl_tool.43341B0
test.wl_tool.43438A1
test.wl_tool.43909B0
test.wl_tool.4343WA1
test.wl_tool.43362A2
test.wl_tool.4390A1
test.wl_tool.43364A1
test.iperf
test.malloc_debug
inputs.gpio_button
inputs.button_manager
audio.display
audio.tone_player
audio.apollo.audio_pll_tuner
audio.apollo.apollo_streamer
audio.apollo.audio_render
audio.apollo.audioplc
audio.apollo.apollo_config_gatt_server
audio.apollo.802_dot_1as_avb
audio.apollo.apollocore
audio.apollo.apollo_player
audio.apollo.audiopcm
audio.codec.sbc_if
audio.codec.codec_framework
audio.codec.FLAC
protocols.HTTP_client
protocols.SNTP
protocols.websocket
protocols.COAP
protocols.AMQP
protocols.MQTT
protocols.DNS
protocols.HTTP
protocols.SMTP
protocols.Xively
crypto.micro-ecc
filesystems.ota2
filesystems.wicedfs
filesystems.FATFS
filesystems.FileX
filesystems.FileX.WICED
BCM943362WCD6
BCM943362WCD8
BCM943341WCD1
BCM943907AEVAL2F_1.B1
BCM943907AEVAL2F_1.B0
BCM943909WCD1_3.B1
BCM943909WCD1_3.B0
BCM943364WCD1
BCM94390WCD2
BCM9WCDPLUS114
BCM943438WCD1
BCM94343W_AVN
BCM943907WAE_1.B1
BCM943907WAE_1.B0
BCM943907AEVAL1F_1.B1
BCM943907AEVAL1F_1.B0
BCM943362WCD4
BCM943903WCD1_1
BCM94343WWCD1
BCM943362WCD4_ext
BCM943903PS
Below is a list of valid components from the internet: 
Can't open perl script "./tools/makefiles/fetch_component.pl": No such file or directory
    
tools/makefiles/wiced_config.mk:339: *** Unknown component: demo.aws_iot.light_sensor_controlled_window - directory or makefile for component not found. Ensure the demo/aws_iot/light_sensor_controlled_window directory contains light_sensor_controlled_window.mk.  Stop.
make: *** No rule to make target 'build/demo.aws_iot.light_sensor_controlled_window-BCM94343W_AVN/config.mk', needed by 'main_app'.  Stop.

13:22:14 Build Finished (took 7s.793ms) "

Please advise as how to create/generate needed make files. Thanks..

I can build the "shadow" app for the BCM94343W_AVN platform fyi.

I few other questions related to my project:

light_sensor_controlled_window is using WICED_ADC_4, I want to modify the program to use WICED_ADC_1 that control Arduino A0. What is the max voltage the ADC can take? 

Advise as how to build a project that include AWS iot thingname/certificate/key/wifi ssid/passphrase, to avoid setting it up after each build/download?

Thanks

/Pih Lung

 

 

 

PeterF's picture
PeterF
Moderator(14)

Pih,
Ensure that you have the following correctly set-up:

 

Make Target:

demo.aws_iot.light_sensor_controlled_window.publisher-BCM94343W_AVN download download_apps run

 

publisher.mk file must target Avnet platform files:

VALID_PLATFORMS := BCM94343W_AVN

 

Regarding your other questions:

 

ADC input voltage max
This will be as spec'd in the STM32F411 datasheet (ie. VREF+) 

http://www.st.com/web/en/resource/technical/document/datasheet/DM00115249.pdf 

 

How to bake-in the WiFi network settings and AWS certificates into the source code

I will attach some slides describing this shortly...
 

PeterF's picture
PeterF
Moderator(14)

For detail on how to "bake-in" the WiFi network settings and AWS certificates into the source code, please refer to slides 11 - 13 of the Installation Tutorial Part 2 document

 

Use the link below to download Installation Tutorial Part 2: