Dell Wyse 3000 Edge MicroServer Installation And Setup Guide

Transcription

Dell Wyse 3000 Edge MicroServer Installation andSetup GuideJuly 2015

Table of Contents1.Introduction . 1-1About the Dell WYSE 3000. 1-12.Installation and Setup . 2-1Login to the Dell Wyse 3000 device . 2-1Set Up a Websocket Connection . 2-23.Establishing and Testing a Connection . 3-8Connect to the Dell WYSE 3000 via Serial Port . 3-8Connect the Dell WYSE 3000 to the ThingWorx Platform . 3-94.Troubleshooting .4-15

1. IntroductionThe Edge MicroServer is a powerful component of the ThingWorx architecture. The EdgeMicroServer allows for the rapid deployment of connections between the ThingWorx platform andan 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 webserver that interacts with the REST API available on the platform.This document provides installation and usage instructions for setting up the Edge MicroServerwith the Dell WYSE 3000.About the Dell WYSE 3000The Dell WYSE 3000 is a multi-port x86 Intel-based thin client device, running Windows EmbeddedStandard 7. It is manufactured by Dell Inc., and is intended for use as a rapid-connecting specializedand limited-role device.Specifications of the device as tested for this guide include an Intel Celeron CPU N2807@1.57Ghz, 4.00GB of RAM, and 16GB of flash memory.The Edge MicroServer Win32 distribution may be installed on the Dell WYSE 3000, and this guidewill follow the procedure for doing so. This guide will also follow the features involved withsimulating a connection and pushing and pulling data from the Dell WYSE 3000 to the ThingWorxas a remote thing.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 1-1

2. Installation and SetupSetup of the Dell WYSE 3000 with an EMS will first require connecting to the Dell Wyse 3000 from acomputer via Ethernet cable and a local DHCP Server. Please note that this guide was writtenfor a computer running Microsoft Windows.Refer to the Troubleshooting section of this guide for help with frequently asked questions.Login to the Dell Wyse 3000 device1.Connect a monitor, mouse, and keyboardto the device, and power it on.2.After the device automatically logs in,hold down the “shift” key and click Start Log off. Continue holding the shift keyuntil the system asks you to choose anaccount to login to.3.Choose “Adminstrator”, and log in. Thedefault password is “DellCCCvdi”.4.On the Windows Embedded 7 Desktop,open the “Networking and SharingCenter”, and then go to WindowsFirewall.Disable all Firewalls.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-1

Set Up a Websocket Connection1.This section begins by setting up WindowsDHCP server on the ThingWorx hostcomputer. If you already have this clientset up on your host computer, then skipahead to opening up a websocketconnection.Begin by downloading the DHCP serverinstaller for Windows from:http://www.dhcpserver.de/cms/2.In Windows, before installing the DHCPserver, open “Network and SharingCenter”, and then click the link on the leftfor “Change Adapter Settings”ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-2

3.Right-Click on “Local Area Connection”,and choose “Properties”.4.Select “Internet Protocol Version 4”, andthen click “Properties”. Click the buttonfor “Use the following IP address”, and seta private IP address that starts with“192.168 ”. Subnet Mask may be left as255.255.255.05.Connect the Dell Wyse 3000 device to yourcomputer with an Ethernet cable. Note:From here on out, you may wish to disableany connection to another network toThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-3

avoid causing IP address conflicts withother devices on your local network.6.Extract the DHCP Server packagedownloaded earlier, and run the“dhcpwiz” executable. Follow the steps inthe wizard to get to the “NetworkInterface Cards” screen.7.Select “Local Area Connection”, andconfirm that its DHCP setting is disabledby default.8.On the next screen, check “HTTP (WebServer)” and leave the others unchecked.Click “Next”.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-4

9.Set the IP-Pool to a reasonable rangewhich contains your local machine’s IPaddress (chosen earlier). Click Next.10. Check “Overwrite Existing File”, then click“Write INI file”. Click “Next”, then “Finish”.11. Open the “dhcpsrv” program as anAdministrator.12. Check “Firewall Enabled”, click“Configure”. Install the service if you havenot yet done so. Finally, click the “Start”button to begin running the DHCP Server.Note: If you have an instance of Apache Tomcat or anyother local server running, you should stop it beforeclicking “Start” on the DHCP Server.13. Open up a browser, and type in“localhost/dhcpstatus.xml” into theaddress bar. The Dell Wyse 3000 shouldbe detectable and listed as a client, with anIP address assigned.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-5

14.Confirm the Dell device’s IP address bytyping “ipconfig” in any command promptterminal (open command.exe).15.Start Tomcat on the host computer, andensure the ThingWorx platform isaccessible.16.Download the ThingWorx EdgeMicroserver for Windows package fromthe PTC Support Downloads site.Tip: You can confirm the connection to your hostcomputer is established by typing “ping 192.168.137.1”(or similar ip address) from a command prompt windowon the Dell device.Get the latest release of the “Win32”package.17.Transfer the MicroServer zip file to theDell WYSE.Tip: You can create a shared folder on the Dell device andtransfer the file over a LAN, or you can move it using aflash drive.18.Open the “config.json” file in“\MicroServer\etc”, or open eitherconfig.json.complete orconfig.json.minimal and save it asconfig.json.Note: Open the config.json.complete, orconfig.json.minimal files, and work off of one them, andSave As “config.json” when finished. It’s recommendedyou start with config.json.minimal.19.Set the IP address for “ws servers” to be“192.168.137.1” and the port to be “80”(Unless these numbers are different foryour local host ThingWorx computer;replace them with your actual values)20.Set “appKey” to be the value of yourapplication key, generated in ThingWorxunder “Application Keys”.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-6

21.Set “encryption” under “ws connection” tobe “none”.See the example at right of config.json:Save and close the config.json file whenfinished editing.22.Run the “wsems” application under theMicroServer root directory, by typing“./wsems”23.In the browser on your host computer,navigate to the ThingWorx platform, andclick “Monitoring”. Here, click “RemoteThings”, and then click on the “Unbound”tab.Here, you should see the “MyGateway”entity here.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 2-7

3. Establishing and Testing a ConnectionConnect to the Dell WYSE 3000 via Serial Port1.Connect the host computer to the Delldevice’s serial port using anappropriate serial-serial or serial-USBcable.2.Open a command prompt window onthe computer, and type “powershell”.powershell3.Identify your computer’s serial portnames by typing the following es()4.In this guide, the screenshot at rightshows “COM3” as an available port.5.Type the following two commands toopen the port, replacing “COM3” withyour computer’s port name asappropriate: port new-Object System.IO.Ports.SerialPortCOM3, 9600, None, 8, oneOn the Dell device, repeat theprocedure for opening a port, butensure that the correct name is used byutilizing the “getportnames() commandagain. See right for the commandsequence:powershellTo verify that a connection has beenestablished, on either the computer orthe Dell device, type the following: port.WriteLine(“Hello World”)6.7. mes() port new-Object System.IO.Ports.SerialPortCOM3, 9600, None, 8, one port.open()ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-8

8.On the other computer, receive themessage by typing: port.ReadLine()Connect the Dell WYSE 3000 to the ThingWorx Platform1.From the Starter Kit package, place thefollowing included files in the followingMicroServer directories on the DellWYSE 3000:Place “config.lua” in the Dell’s \etc\folder.Place “testTemplate.lua” in the\etc\custom\templates\ directory.Place “testSample.lua” in the\etc\custom\scripts\ directoryThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-9

2.Open “testSample.lua”, and change theport numbers listed to those of yourDell Device’s serial port number:Save the file when finished.3.Run the “wsems” executable under\MicroServer\, and then run“luaScriptResource” in the samedirectory.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-10

The command prompt windows at rightare similar to what you should see afterrunning “wsems” and“luaScriptResource”ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-11

4.On the ThingWorx platform on the hostcomputer, navigate to the ThingWorxmonitor and go to Remote Things again.Here, you should see two unboundthings listed:5.In ThingWorx, create a new Thingentity named “testThing”, and select“RemoteThing” as the implementingThing Template.6.On the General Information page forthis new Thing, click “Browse” next toits identifier field, and select “testit”from the available choices.Save the testThing entity whenfinished.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-12

7.Click “Properties”, and then select“Edit” if necessary to re-enter editmode.Next, click “Add My Property”, andcreate a new STRING property named“testValue”.Click “Done”.8.On the Properties page, click “ManageBindings”, and then click the “Remote”tab at the top left of the new window.9.Click and drag to add “testScriptDemo”remote property to the “testValue”property, and then click Done.Note: If you can’t see the remote things here, verify that the“wsems” and “luaScriptResource” are both running on theDell device, and that the connection is established properly.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-13

10. Click “Edit” on the testValue property,and under “Cache Options” at the right,change the value to “Fetched fromRemote Every Read”.11. Click “Done”, and then “Save”.12. On the ThingWorx host computer,ensure that a serial port connection isestablished (see earlier section on“Connect to the Dell WYSE 3000 viaSerial Port”), open a command promptwindow, and type the following (seeright): port.WriteLine(“Hello World”)13. On the ThingWorx platform, on theproperty page for the “testThing”Thing, refresh the value for “testValue”.Note: The host computer is acting as both an originatingdata injector, for which it sends data to the Dell WYSE viaSerial Port, and as a host ThingWorx server, in which itreceives a value response from the Dell device via websocketconnection.Its value should have changed to “HelloWorld”.14. On the command prompt window onyour host Windows computer, type thefollowing (on right): port.ReadLine()15. You should receive a response similarto the screenshot at right. Thisconfirms the device’s connectivity.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 3-14

4. Troubleshooting1.ProblemSolution(s)Can’t assign an IP address to the Dell WYSE1.3000 from a connected host computer.On the Dell device, navigate to “Network and Sharing Center”, and click“Change adapter Settings”. Here, right click on your Local AreaConnection, click “Properties”, and then select Internet Protocol Version4. Choose “Obtain an IP address automatically.2.Repeat the above on the host computer, but ensure that instead theoption for obtaining an IP address is a manual IP address within thedomain of the local network you’re establishing with DHCP server, suchas 192.168.137.1.3.Verify that a connection is established via LAN cable and that bothcomputers have appropriate drivers installed.2.Cannot ping the Dell device from the hostcomputer / Cannot open a command line on theDell Device3.Can’t set up a WebSocket connection by1.Ensure the Dell Device’s Windows Firewall is turned off.2.Verify you are logged into the device as the Adminstrator.1.Try to type “wget YourLaptopIPAddress” to see if you can obtain datarunning the “wsems” application.form the server. If not, make sure all Firewalls are disabled on bothcomputers.2.Try changing the system clock on the Dell Device to make it match thatof the host computer’s.4.Using the Windows names()”command, I am unable to see any available1.Verify that the computer is connected to the Dell Device via serial cable.2.You may need to manually install or re-install Device Drivers for theWindows Serial Port.port names.5.Receive an error when running“luaScriptResource. Error says “rserial is “nil””a. Open Device Manager from Control Panel in Windows.b. Click on “Ports (COM & LPT)”, and click “Action Add Hardware /Add Legacy Hardware”c. Follow the steps in the wizard to manually add serial port (COM)drivers.1.Restart your computer and attempt to get port names again.2.Make sure you have modified the port number in “testSample.lua” inboth places in this file so that it matches your Dell device’s port number.This may or may not be the same number as your connected hostcomputer’s.ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 4-15

6.Can’t update the value of “testScriptDemo” (or1.Try manually opening the serial port: a) Close “wsems” andtestValue) on the ThingWorx platform after“luaScriptResource”. b) Open a command line window and open thesending port.WriteLine from the hostserial port, following the steps earlier in this guide to connect via serialcomputer.port. c) restart “wsems” and “luaScriptResource”. If theluaScriptResource runs, then type port.Close() on the command linewindow on the Dell Device to avoid two programs “fighting” to use theport.7.Cannot locate updated files on the Dell Device1.The device may automatically wipe all new installed software and addedfiles or folders each time you restart. Backup the files before shuttingafter restarting.down the machine.8.Error while attempting to open a websocketconnection.1.Confirm that the Dell device has access to the internet.2.Confirm the accuracy of the IP address and port numbers in thesettings.json file.3.Confirm the appKey authenticity in the settings.json file.4.Confirm that the ThingWorx platform at the IP address specified in thesettings.json file is up and running.This guide has been tested for compatibility with the Dell WYSE 3000 and the following ThingWorxplatform and operating system:ThingWorx Platform VersionOSThingWorx 6.0.1Windows 7, Service Pack 1ThingWorx EMS Setup Guidefor the Dell WYSE 3000Page 4-16

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 with the Dell WYSE 3000. About the Dell WYSE 3000