Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Software Change Log Version Release Date Changes 1.0 4/7/2016 Initial Release Introduction The Edge MicroServer is a powerful component of the ThingWorx architecture. The Edge MicroServer allows for the rapid deployment of connections between the ThingWorx platform and an associated data reporting device, with minimal design requirements on the part of the user. The Edge MicroServer provides an “always-on” connection to the platform, and it opens a local web server that interacts with the REST API available on the platform. This document provides installation and usage instructions for setting up the Edge MicroServer via a ThingWorx C-SDK Implementation on a Broadcom BCM943364WCD1. About the Broadcom BCM943364WCD1 The Broadcom BCM943364WCD1 module is mounted on a full-featured USB-based evaluation and development board that is fully compatible with the WICED Wi-Fi Software Development Kit (SDK). Designed to be a lower cost alternative to the popular BCM43362, the onboard SIP module leverages the BCM43364 2.4 GHz WLAN IEEE 802.11b/g/n MAC/baseband/radio. In addition, the module integrates a power amplifier (PA) that meets the output power requirements of most handheld systems, a low-noise amplifier (LNA) for best-in-class receiver sensitivity, and an internal transmit/ receive (iTR) RF switch, further reducing the overall solution cost and printed circuit board area. Powered by the STM32F411 32-bit ARM microcontroller, the board is also provisioned to support the authentication chip utilized by Apple’s HomeKit offering. The Thingworx C-SDK distribution may be installed on the device, and this guide will follow the procedure for doing so. This guide will also follow a Reference Implementation procedure for connecting the device to a remote ThingWorx server with a simulated “steam sensor” demo.
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Installation Setup of the Broadcom device with this guide will require the use of a Linux operating system on either a host or guest (virtual machine) operating system, such as Ubuntu. It is possible to compile the necessary code in Windows, but this guide recommends using a Linux environment. Please note that this guide was written for a computer running Microsoft Windows 7 with an Ubuntu (v14.04) virtual machine. Refer to the Troubleshooting section of this guide for help with frequently asked questions. Downloads and Prerequisites Begin by downloading the WICED 3.5.x (latest) SDK from https://community.broadcom.com/community/wi ced-wifi/wiced-wifi-documentation. Follow the link at the bottom of the page for the “WICED SDK 3.5.x IDE Installer and .7z Source Files”, and then locate the post containing the *.7z zip file. Refer to the screenshots for guidance. Note: For a build on Linux, download the *.7z files to the Linux machine. If you are compiling on Windows, you may download the .exe executable version. You will also need a Broadcom community site account in order to access these pages. This is free to create.
Page 6
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Once downloaded, extract the compressed sudo apt-get install p7zip-full WICED-SDK. Install p7zip first if you do not unzip <file_name>.7z.zip already have it: 7za x <file_name>.7z...
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Next, change directory to the demo folder in your mkdir thingworx extracted file as in: WICED-SDK-3.5.x/apps/demo and create a folder named ‘thingworx’. Download the ThingWorx C-SDK from the PTC support site (downloads section) at support.ptc.com. Open the Thingworx C-SDK and copy the “src” folder to WICED-SDK-3.5.x/apps/demo/thingworx. Configuration and Setup Extract the Broadcom zip file packaged with this Starter Kit onto your Linux OS. Copy the ‘thingworx.c’, ‘thingworx.mk’, and ‘wifi_config_dct.h’ files to the WICED-SDK- 3.5.x/apps/demo/thingworx directory, created earlier.
Page 8
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Copy the ‘twWiced.c’, ‘twWiced.h’, and ‘twWicedThread.c’ files (located in …/src/porting in the Extracted Starter Kit package) to WICED-SDK- 3.5.x/apps/demo/thingworx/src/porting/. Open and edit the file apps/demo/thingworx/src/porting/twOSPort.h Change the following line: #include TW_OS_INCLUDE to #include “twWiced.h”...
Page 9
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Open and edit the file apps/demo/thingworx/thingworx.c Edit the following line to include the IP address of the ThingWorx server which the device will connect to: #define TW_HOST “type_ip_address_here” Edit the following line to include a valid AppKey created on this server: #define TW_APP_KEY “type_app_key_here” As shown below:...
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Open and edit the following: apps/demo/thingworx/wifi_config_dct.h Add a local WIFI SSID as a value to CLIENT_AP_SSID Add the SSID passphrase to the value CLIENT_AP_PASSPHRASE Compiling and Running the Application Navigate to the root WICED-SDK-3.5.x directory. Make sure that the Broadcom device is connected via USB. Note: If performing this in a Linux virtual machine environment, you’ll need to set up the VM so that the USB device is connected to the guest virtual machine instead of the host computer. Execute the following command from the WICED-SDK-3.5.x root directory: sudo ./make demo.thingworx-BCM943364WCD1-FreeRTOS-LwIP download run Confirm that you see the message above when the build is complete. The build may take a few minutes to finish.
Page 11
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Optional: Connect to the device via serial to view its console log output. This is especially useful for debugging and troubleshooting purposes. This can be done from either Linux or Windows. From a Linux machine, you may use the “screen” command when the device is connected and recognized via serial USB. This guide will cover the procedure for viewing the serial output via Windows, and not Linux. From Windows, and on the host operating system, use a client such as PuTTY. The device will first need to be connected to the host operating system and the virtual machine may need to be shut down. The drivers for the WICED device will need to be installed on the Windows machine. From the links at https://community.broadcom.com/community/wiced-wifi/wiced-wifi-documentation, download the Windows .exe executable and install the IDE program when finished. Drivers for the device will be installed along with the IDE. At this point, the presence of the WICED device should be recognized as connected to a COM port in Windows. Re-connect the device if you do not see it, and, if necessary, restart your computer.
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) In PuTTY or another similar program such as HyperTerminal, connect to the device at the COM port shown in the Device Manager, and connect via Serial at baud rate 115200. The console output from the device should immediately be visible. Confirm that a log similar to the following is shown. Binding Properties in ThingWorx Navigate to your ThingWorx remote server (same server configured on the Broadcom device) from any computer. 10...
Page 13
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Click on “Monitoring” in the top-right corner, and then select “Remote Things”. Next, click on “Unbound Things”, and the Broadcom device should be visible as a connected unbound thing. To connect this Unbound Thing to a Thing and begin binding properties, follow the standard procedure for binding a Remote Thing. Create a new Thing in Thingworx Composer with the same name as the remote Unbound Thing. Ensure that this Thing’s Thing Template is the RemoteThing Template. Next, edit the Thing’s properties, and click on “Manage Bindings”, and then click the “Remote” tab in the new window to view the Thing’s available properties. In this guide, the properties pushed from the device 11...
Page 14
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) are the standard “SteamSensor” example properties, compiled and running as a simulator on the device. They include Temperature and Pressure. Click “Add All Above Properties” to add these properties to the Thing, and then click “Done”. After saving and refreshing, you should see properties updating on the Thing from the Properties page. For additional help, refer to the Troubleshooting section below. 12...
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) To stop the device from running the simulator, open PuTTY serial connection, and press “Q” to terminate the device’s program. If you wish to restart, the physical “RESET” button on the device must be pressed once. Troubleshooting Problem Solution(s) Unable to extract WICED zip; problems with Make sure you have pzip installed on the linux machine, and make sure extracted file architecture you are using the proper extraction method. Type sudo apt-get install p7zip-full unzip <file_name>.7z.zip...
Page 16
“wifi_config_dct.h” are exactly correct. Switch to testing on an unsecured wifi network if necessary. Ensure you have the latest WICED SDK installed. Contact Broadcom if the device will not connect to any WiFi network. Verify that no firewall or network configuration settings are preventing the device from communicating with a remote ThingWorx server.
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0) Known Limitations This device has the following known limitation: 1. The Broadcom device does not currently support connection via HTTPS (SSL / TLS). Compatibility This guide has been tested for compatibility with the DEVICE and the following ThingWorx platform and operating system: ThingWorx 7.0.0 ThingWorx Platform Version Windows 7, Service Pack 1 Ubuntu 14.04 OS (Virtual Machine) v 3.5.2 WICED SDK Document Revision History Revision Date Version Description of Change April 7, 2016 1.0 Initial Release 15...
Need help?
Do you have a question about the ThingWorx Broadcom BCM943364WCD1 C-SDK and is the answer not in the manual?
Questions and answers