Broadcom ThingWorx Broadcom Setup Manual

Type
Setup Manual
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Broadcom!BCM943364WCD1!C-SDK!
Setup!Guide!
Version!1.0
Copyright © 2016 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
User and training guides and related documentation from PTC Inc. and its subsidiary companies (collectively “PTC”) are subject to
the copyright laws of the United States and other countries and are provided under a license agreement that restricts copying,
disclosure, and use of such documentation. PTC hereby grants to the licensed software user the right to make copies in printed form
of this documentation if provided on software media, but only for internal/personal use and in accordance with the license
agreement under which the applicable software is licensed. Any copy made shall include the PTC copyright notice and any other
proprietary notice provided by PTC. Training materials may not be copied without the express written consent of PTC. This
documentation may not be disclosed, transferred, modified, or reduced to any form, including electronic media, or transmitted or
made publicly available by any means without the prior written consent of PTC and no authorization is granted to make copies for
such purposes.
Information described herein is furnished for general information only, is subject to change without notice, and should not be
construed as a warranty or commitment by PTC. PTC assumes no responsibility or liability for any errors or inaccuracies that may
appear in this document.
The software described in this document is provided under written license agreement, contains valuable trade secrets and
proprietary information, and is protected by the copyright laws of the United States and other countries. It may not be copied or
distributed in any form or medium, disclosed to third parties, or used in any manner not provided for in the software licenses
agreement except with written prior approval from PTC.
UNAUTHORIZED USE OF SOFTWARE OR ITS DOCUMENTATION CAN RESULT IN CIVIL DAMAGES AND CRIMINAL
PROSECUTION. PTC regards software piracy as the crime it is, and we view offenders accordingly. We do not tolerate the piracy of
PTC software products, and we pursue (both civilly and criminally) those who do so using all legal means available, including public
and private surveillance resources. As part of these efforts, PTC uses data monitoring and scouring technologies to obtain and
transmit data on users of illegal copies of our software. This data collection is not performed on users of legally licensed software
from PTC and its authorized distributors. If you are using an illegal copy of our software and do not consent to the collection and
transmission of such data (including to the United States), cease using the illegal version, and contact PTC to obtain a legally
licensed copy.
Important Copyright, Trademark, Patent, and Licensing Information: See the About Box, or copyright notice, of your PTC
software.
UNITED STATES GOVERNMENT RESTRICTED RIGHTS LEGEND
This document and the software described herein are Commercial Computer Documentation and Software, pursuant to FAR
12.212(a)-(b) (OCT’95) or DFARS 227.7202-1(a) and 227.7202-3(a) (JUN’95), and are provided to the US Government under a
limited commercial license only. For procurements predating the above clauses, use, duplication, or disclosure by the Government
is subject to the restrictions set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software Clause at
DFARS 252.227-7013 (OCT’88) or Commercial Computer Software-Restricted Rights at FAR 52.227-19(c)(1)-(2) (JUN’87), as
applicable. 01012015
PTC Inc., 140 Kendrick Street, Needham, MA 02494 USA!
!
!
!
!
!
! !
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 1! !
!
Software!Change!Log!....................................................................................................................................!2!
Introdu c tio n !.................................................................................................................................................!2!
About!the!Broadcom!BCM943364WCD1!.................................................................................................!2!
Installation!....................................................................................................................................................!3!
Downloads!and!Prerequisites!...................................................................................................................!3!
Configuration!and!Setup!..............................................................................................................................!5!
Compiling!and!Running!the!Application!...................................................................................................!8!
Binding!Properties!in!ThingWorx!...........................................................................................................!10!
Troubleshooting!.........................................................................................................................................!13!
Known!Limitations!......................................................................................................................................!15!
Compatibility!..............................................................................................................................................!15!
Document!Revision!History!........................................................................................................................!15!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 2! !
Software!Change!Log!
!"#$%&'(
)"*"+$"(,+-"(
./+'0"$(
1.0!
4/7/2016!
Initial!Rele a se !
!
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!w e b!
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!pop ular!B CM43362,!the !on bo ard !SIP!m od ule !levera ges!
the!BCM4 33 64 !2.4!GH z!W L AN !IEEE !802 .11b /g/n !M A C/b ase ba nd /rad io.!In!ad dition ,!the!m o du le!
integrate s !a!p o w e r!a mplifier!(PA)!that!m e e ts !th e !o ut p u t!p o w e r!re q u irements!o f!most!h an d h e ld !sy ste ms,!
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!in s ta lled !
on!the!device,!and!this !g u id e !will!follo w!the!
procedure!for!doing!so.!!This!guide!will!also!follow!
a!Reference!Implemen ta tio n !proced u re!for!
connecting!the!device!to!a!remote!ThingWorx!
server!with!a!simulated!“steam!sensor”!dem o.!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 3! !
Installation!
!
Setup!of!the!Broadcom!device!with!this!guide!will!require!the!use!o f!a!Linu x!op era ting!syste m !on !eithe r!a!
host!or!guest!(virtual!machine )!ope ratin g!syste m ,!such !as!Ub un tu.!It!is!po ss ib le !to !c o m p ile !t h e!n e c es sa ry !
code!in!Windows,!but!this!guide!recommends!using!a!Linux!environmen t.!!!1*"+$"('&-"(-/+-(-/%$(02%3"(
4+$(4#%--"'(5&#(+(6&782-"#(#2''%'0(9%6#&$&5-(:%'3&4$(;(4%-/(+'(<=2'-2(>?@ABCAD(?%#-2 +*(7+6/%' "B((!
Refer!to!the!Troubleshooting!section!of!this!guide!for!help!with!frequently!asked!questions.!
Downloads!and!Prerequisites!
!
1. !
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 !b o tto m!of!the !p ag e !fo r!th e !“WICED !S D K !
3.5.x!IDE!Installer!and!.7z!Source!Files”,!and!then!
locate!th e !po s t!c o nt ain in g !th e !* .7 z!z ip !file.!
!
Refer!to!the!screenshots!for!guidance.!
!
E&-"F!!For!a!build!on!Linux,!download!the!*.7z!files!
to!the!Linux!ma ch ine.!!If!you !are!co m piling!o n!
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.!!
!
2. !
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 4! !
3. !
Once!downloaded,!extract!the!compressed!
WICED-SDK.!!Install!p7zip!first!if!you!do!not!
already!have!it:!
sudo apt-get install p7zip-full
unzip <file_name>.7z.zip
4. !
!
!
5. !
!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 5! !
6. !
Next,!change!directory!to!the!demo!folder!in!your!
extracted!file!as!in:!WICED-SDK-3.5.x/apps/demo!
and!create!a!folder!named!thingworx ’.!
mkdir thingworx
!
7. !
Download!the!ThingWorx!C-SDK!from!the!PTC!
support!site!(downloads!section)!at!
support.ptc.com.!
!
8. !
Open!the!Thingworx !C-SDK!and!copy!the!“src”!
folder!to!WICE D -SDK-3.5.x/apps/demo/thingworx.!
!
!
!
Configuration!and!Setup!
!
1. !
Extract!the!Broadcom!zip!file!packaged!with!
this!Starter!Kit!onto!you r!Linu x!O S.!
!
2. !
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.!
!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 6! !
3. !
Copy!!the!twWice d.c’,!‘t wWiced.h,!and!
twWice dT hre ad .c’!file s!( lo c a te d !i n !
/src/porting!in!the!Extracted!Starter!Kit!
package)!to!WICED-SDK-
3.5.x/apps/demo/thingworx/src/porting/.!
!
!
!
4. !
Open!and!edit!the!file!
apps/demo/thingworx/src/porting/twOSPort.h@
@
@
@
@
Change!the!following!line:!!!
G%'6*23"(H:IJKILE.M<,N((
to((
G%'6*23"(O-4:%6"3B/P!
!
!
!
!
!
!
!
!
!
!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 7! !
!
5. !
Open!and!edit!the!file!apps/demo/thingworx/thingw o rx.c@
@
Edit!the!following!line!to!include!the!IP!address!of!the!ThingWorx!server!which!the!device!will!connect!to:!!!
G3"5%'"(H:IQJKH(O-R8"I%8I+33#"$$I/"#"P(
(
Edit!the!following!line!to!inclu de !a!valid!Ap p Key !crea ted !on!th is!server:!
G3"5%'"(H:IS11ITNU(O-R8"I+88IV"RI/"#"P!!
!
As!shown!below:!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 8! !
6. !
Open!and!edit!the!following:!apps/demo/thingworx/wifi_config_dct.h@
!
Add!a!local!WIFI!SSID!as!a!value!to!.MLNEHIS1IKKL,(
Add!the!SSID!passphrase!to!the!value!.MLNEHIS1I1SKK1Q)SKN!
!
!
!
!
Compiling!and!Running!the!Application!
!
1. !
Navigate!to!the!root!WICED-SDK-3.5.x!directory.!
2. !
Make!sure!that!the!Broadcom!device!is!connected!via!USB.!!E&-"F(If!performin g!t h is!in !a !L in u x !vir tu a l!
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.!!!!
!
3. !
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.!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 9! !
4. !
J8-%&'+*F!!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!connec te d !an d !re co g n ize d !
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)!
! 10! !
5. !
In!PuTT Y !or!another!similar!program!such!as!HyperTerminal,!connect!to!the!device!at!the!COM!port!shown!
in!the!De v ice !Manag er,!a n d !co n n e ct!v ia !Se ria l!a t!b a u d!r at e!1 1 5 2 0 0 .!
!
The!console!output!from!the!device!should!immediately!be!visible.!!Confirm!that!a!log!similar!to!the!
following!is!sho w n .!
!
!
Binding!Properties!in!ThingWorx!
!
1. !
Navigate!to!your!ThingWorx!remote!server!
(same!serve r!con figu red !on !the!B roa dc om!
device)!from!any!computer.!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 11! !
2. i!
Click!on!“Monitoring”!in!the!top-right!corne r,!
and!then!select!“Remote!Things”.!!Next,!click!
on!“Unbound!Things”,!and!the!Broadcom!
device!should!be!visible!as!a!connected!
unbound!thing.!
!
3. !
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.!
!
!
!
4. !
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!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 12! !
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”.!
!
!
!
5. !
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.!
!
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 13! !
!
6. !
To!stop!the!device!from!running!the!simulator,!open!PuTTY!serial!connection,!and!press!“Q”!to!terminate!
the!device’s!prog ram .!
If!you!w ish !t o !re st a rt,!the!phy sic al!“ R E S ET ” !b u t to n !o n !t h e!d e v ice !must!be !p r es se d !o n c e .!
!
!
!
Troubleshooting!
Problem
Solution(s)
1.
Unable to extract WICED zip; problems with
extracted file architecture
1. Make sure you have pzip installed on the linux machine, and make sure
you are using the proper extraction method. Type
sudo apt-get install p7zip-full
unzip <file_name>.7z.zip
7za x <file_name>.7z
2. Try extracting the files on a different machine first, and copy the
contents to the Linux machine.
3. Contact the Broadcom Community for further assistance.
2.
Problems with the compilation of the Broadcom
C-SDK
1. Double-check all steps to verify that the file structure and hierarchy is
exactly correct for all files, especially the edited files. Restart from
scratch if necessary.
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 14! !
2. Verify that the edited files (SSID, Appkey, IP address) are exactly
correct with no syntax errors, such as a missing quotation mark. The
Appkey must be exactly correct, the server hostname should be correct
(for IP addresses, type the IP address without “http”).
3. Try to use a different version of either the WICED SDK or ThingWorx C-
SDK.
3.
The device is not visible via USB / Serial in
either a guest or host operating system
1. Follow directions from your virtual machine provider to ensure that the
device is connected via serial in “pass-through” from the host computer.
2. For problems with the host computer, make sure you have the WICED
drivers installed before connecting the device to your computer. Use
Windows and download/install the WICED 3.5.x .exe installer, which
includes serial drivers, from
https://community.broadcom.com/community/wiced-wifi/wiced-wifi-
documentation
4.
Cannot connect to the device via PuTTY or
another terminal program, or no console output
1. Verify that the device is properly connected to the computer or virtual
machine you are attempting to view the console from.
2. Verify that the proper USB serial drivers are installed.
3. Verify that the baud rate of the serial connection is 115200.
4. Verify that the SDK has compiled correctly on the device. Disconnect it
and reconnect it before trying again.
5. Try an alternative terminal program, such as PuTTY or HyperTerminal.
5.
Cannot bind a Thing to the Broadcom Device in
Thingworx.
1. Ensure that the Thing name you are creating is exactly the same as the
device’s ID in the ThingWorx Unbound Things page. The Thing name
can alternatively be customized if it is set to be an identifier in the
source code.
2. Ensure the Thing you are creating is of the RemoteThing Template.
3. Refer to ThingWorx support for further assistance.
6.
Device will not connect to ThingWorx server / is
not visible under “Unbound Things”.
1. Check the “All” tab instead of the unbound things tab to confirm that the
device is not already bound to a Remote Thing.
2. Double-check the connection settings in “thingworx.c. Re-compile if
changes were necessary.
3. Confirm that the wifi network is active and that the connection
parameters in “wifi_config_dct.hare 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.
4. Verify that no firewall or network configuration settings are preventing
the device from communicating with a remote ThingWorx server. This is
a common problem.
5. Test on a locally-hosted ThingWorx platform to rule out internet
connectivity issues.
!
Broadcom BCM943364WCD1 C-SDK Setup Guide (v 1.0)!
! 15! !
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!Th ing W o rx!p latform!and!
operating!system:!
ThingWorx!Platform!Version!
ThingWorx!7.0.0!
OS!
Windows!7,!Service!Pack!1!
OS!(Virtual!Machine)!
Ubuntu!14.04!
WICED!SDK!
v!3.5.2!
!
!
!
Document!Revision!History!
!
)"?%$%&'(,+-"(
!"#$%&'(
,"$6#%8-%&'(&5(./+'0"(
April!7,!2016!
1.0!
Initial!Rele a se !
!
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17

Broadcom ThingWorx Broadcom Setup Manual

Type
Setup Manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI