5 Gould Road, PO Box 2155 New London, NH 03257 USA Voice: (603) 526-9800 info@canarysystems.com www.canarysystems.com Using the Lantronix WiBox with the CR800 or CR1000 Application Note #23 Revision 02/03/2017 Overview The CR800 and CR1000 dataloggers from Campbell Scientific have a RS- 232 serial interface to communicate with a PC to retrieve data. The Lantronix WiBox is a WiFi device that provides RS-232 serial communication over a wireless TCP/IP network. MultiLogger supports communication with a CR800 or CR1000 datalogger over TCP/IP socket. This application note will detail the steps necessary to configure the Lantronix WiBox and add a device to MultiLogger to retrieve data. Appendix A will detail the steps required to change the IP address once configured. Definitions Ad-Hock Network: An ad-hock network is one of the two types of wireless networks (the other is "Infrastructure") and is not very common. Ad-hoc networks do not require a wireless network access point and are considered "de-centralized". Ad-hoc networks are convenient to allow devices and/or PC's to communicate with each other in the absence of a centralized network. DHCP: Dynamic Host Configuration Protocol (DHCP) is a mechanism used in computer networks to assign IP addresses automatically. Infrastructure Network: An infrastructure network is one of the two types of wireless networks (the other is "Ad-Hoc") and is the most common. Infrastructure networks require a wireless network access point to manage and forward traffic to and from the wireless network. Lantronix WiBox: The Lantronix WiBox is a WiFi enabled device that will forward TCP/IP traffic to and from a wireless network to its two RS-232 serial ports. This allows serial communication to a device over a wireless network. The WiBox is a WiFi client only, meaning it is not a wireless network access point. SSID: Service Set Identifier (SSID) is the unique identifier for a wireless network, either infrastructure or adhoc. The SSID is used to configure each device or PC to select the wireless network that you want it to communicate on. Wireless Network Access Point (AP): A wireless network access point is a WiFi router that is used to setup a wireless network. Access Points support "Infrastructure" networks as opposed to "Ad-Hoc" networks. The AP is responsible for forwarding network to and from connected wireless devices and PC's. Required Equipment and Software To configure your WiBox and test its operation you will need: 1) WiBox 2) Serial null-modem cable (supplied with the WiBox) 3) Computer with a WiFi network adapter (most laptops have built in WiFi. USB WiFi adapters are readily available to add WiFi capability to a desktop) 4) CR800 or CR1000 DataLogger 5) Lantronix DeviceInstaller (optional; only for remote WiBox configuration) 6) Terminal emulation software, such as a HyperTerminal, PuTTy, etc. Note Versions of Microsoft Windows prior to Windows Vista came with HyperTerminal installed. Windows Vista and Windows do not include HyperTerminal, but you can download and install a trial version from the internet (http://www.hilgraeve.com/hyperterminal/). PuTTy is an open source terminal utility and also can be downloaded from the Internet. Using the Lantronix WiBox with the CR800 or CR1000 1
Configuring the WiBox This Application Note describes how to configure your WiBox to operate in an infrastructure network. It does not cover configuring for an ad-hoc network. Step 1: Gather information about your wireless network Before you can configure the WiBox you will need to understand the wireless network that you will install the WiBox onto. Work with your systems administrator to obtain this information, specifically: 1) The SSID of the network 2) Static IP Address range of the router Note Most wireless networks are setup to automatically assign IP addresses to client computers and devices when they initially connect, rather than requiring static IP addresses that must be set manually. This is called DHCP. MultiLogger requires that the WiBox's have static IP addresses. You may need to work with your wireless network administrator to assign a block of addresses in the router as static IP addresses. Assign each WiBox in your configuration one of the static IP addresses in this range. If you have many WiBox's in your setup, it may be helpful to map out these addresses prior to setting up the WiBox. 3) Security settings a) Security Mode: There are four types of security mode, WEP, WPA, WPA2-Personal, WPA2- Enterprise. The WiBox does not support WPA2-Enterprise. b) Encryption setting for WEP Mode: i) Encryption Level (64-bit or 128-bit) ii) WEP Key and Key Number (i.e. Key #1: 2627f68597) c) Encryption for WPA and WPA2 i) Encryption Type (AES or TKIP+AES) Note The WiBox uses the term CCMP for AES. CCMP and AES are synonymous. ii) Passphrase Using the Lantronix WiBox with the CR800 or CR1000 2
Example Wireless Network: (Figure 1) Step 2: Connect the WiBox to a PC with null-modem serial cable In order to do the initial setup of the WiBox, it must be connected directly to a PC with the null-modem serial cable provided with the device. If WiBox configuration changes are needed after the initial setup, it is recommended to again directly connect the device to a PC with a null-modem cable. If a null-modem cable is unavailable or the device is physically inaccessible, continue to Appendix A Changing the IP Address Remotely. Note It is critically important to use a null-modem cable for this step; regular serial cables will not work. We recommended you use the cable supplied with the WiBox. Connect one end of the null-modem cable to an available serial port on the computer and connect the other to port 1 on the WiBox (Labeled RS232 Serial 1 ). Using the Lantronix WiBox with the CR800 or CR1000 3
Step 3: Configure the WiBox Launch your terminal emulation software. This example uses HyperTerminal. You may use any terminal emulation application, but the screens will look different than those shown here. The first dialog that will appear will prompt you to create a new connection. Type "WiBox" in the name field (you can type whatever you'd like, but "WiBox" will make it easier to find later). Click on the OK button. The Connect To dialog box will appear. (Figure 2) (Figure 3) Using the Connect using: drop down, select the appropriate COM Port from the list. Using the Lantronix WiBox with the CR800 or CR1000 4
Click on the Configure button to bring up the Properties dialog. (Figure 4) Set the serial configuration as follows: Bits per second: 9600 Data bits: 8 Parity: None Stop bits: 1 Flow control: None Click the OK button to return the Connect To dialog. Using the Lantronix WiBox with the CR800 or CR1000 5
Click the OK button on the Connect To dialog to bring up the communications window. While holding the 'x' key down (lower case), connect power to the WiBox. After a few seconds you should see the configuration screen as shown in Figure 5. If the configuration screen doesn't show up after 15 seconds, disconnect power and repeat the sequence. Press <ENTER> to go into Setup Mode. (Figure 5) Note You only have about 5 seconds to press <ENTER> otherwise the WiBox will time out of configuration mode. If this happens repeat the process of connecting power while holding down the x key. Enter 0<ENTER> for Server Configuration. You will be prompted to enter the following: Network Mode: type 1<ENTER> Static IP Address: type 192<ENTER>168<ENTER>0<ENTER>100<ENTER> Set Gateway IP Address: Accept the default of "N" for no by pressing <ENTER> Netmask: Accept the default of "0" by pressing <ENTER> Set DNS Server IP: Accept the default of "N" by pressing <ENTER> Change telnet config password: Accept the default of "N" by pressing <ENTER> You will be back at the main menu. Type 4<ENTER> for WLAN Configuration. You will be prompted to enter the following: Topology: type 0<ENTER> for "Infrastructure" Network name (SSID): type CanaryLoggerNet<ENTER> Security suite: type 3<ENTER> for "WPA2/802.11i" Change Key: type Y to change the encryption passphrase Display Key: type Y Note This just allows you to see the passphrase while you're entering it. Using the Lantronix WiBox with the CR800 or CR1000 6
Key type: type 1<ENTER> for passphrase Enter Key: type Abcdefg12345<ENTER> Encryption: type 1<ENTER> for "CCMP+TKIP" Note This is the same as AES+TKIP. Your access point may use AES terminology instead of CCMP. Accept the default for all remaining prompts You will be back at the main menu. Type 1<ENTER> for Channel 1 setup. You will be prompted to enter the following: Baud rate: type 115200<ENTER> Accept the default for all remaining settings You will be back at the main menu. Type 9<ENTER> to save and exit. Note If you do not do "save and exit" and cycle power on the WiBox, all settings will be lost and you will need to repeat these steps. After you save the parameters, the WiBox will attempt to access the wireless network. This may take several seconds. You can watch the LED on the WiBox labeled Wireless Link. If everything has been set correctly, the LED will blink rapidly several times and then turn off. This indicates that the WiBox has successfully accessed the wireless network. The complete text of a setup is shown below: Change Setup: 0 Server 1 Channel 1 2 Channel 2 4 WLAN 5 Expert 6 Security 7 Defaults 8 Exit without save 9 Save and exit Your choice? 0 Network mode: 0=Wired Only, 1=Wireless Only, 2=Bridging(One Host) (1)? 1 IP Address : (000) 192.(000) 168.(000) 0.(000) 100 Set Gateway IP Address (N)? Netmask: Number of Bits for Host Part (0=default) (0) Set DNS Server IP addr (N)? Change telnet config password (N)? Change Setup: 0 Server 1 Channel 1 2 Channel 2 4 WLAN 5 Expert 6 Security 7 Defaults 8 Exit without save 9 Save and exit Your choice? 4 Topology: 0=Infrastructure, 1=Ad-Hoc (1)? 0 Network name (SSID) (LTRX_IBSS)? CanaryLoggerNet Security suite: 0=none, 1=WEP, 2=WPA, 3=WPA2/802.11i (0)? 3 Change Key (N)? Y Using the Lantronix WiBox with the CR800 or CR1000 7
Display key (N)? Y Key type 0=hex, 1=passphrase (0)? 1 Enter Key: Abcdefg12345 It is strongly recommended to use a passphrase of 20 chars or more! Encryption: 0=CCMP, 1=CCMP+TKIP, 2=CCMP+WEP, 3=TKIP, 4=TKIP+WEP (3)? 1 TX Data rate: 0=fixed, 1=auto fallback (1)? TX Data rate: 0=1, 1=2, 2=5.5, 3=11, 4=18, 5=24, 6=36, 7=54 Mbps (7)? Minimum TX Data rate: 0=1, 1=2, 2=5.5, 3=11, 4=18, 5=24, 6=36, 7=54 Mbps (0)? Enable power management (N)? Enable Soft AP Roaming (N)? Max failed packets (6-64; 255=disable): (6)? Change Setup: 0 Server 1 Channel 1 2 Channel 2 4 WLAN 5 Expert 6 Security 7 Defaults 8 Exit without save 9 Save and exit Your choice? 1 Baudrate (9600)? 115200 I/F Mode (4C)? Flow (00)? Port No (10001)? ConnectMode (C0)? Send '+++' in Modem Mode (Y)? Show IP addr after 'RING' (Y)? Auto increment source port (N)? Remote IP Address : (000).(000).(000).(000) Remote Port (0)? DisConnMode (00)? FlushMode (00)? DisConnTime (00:00)?: SendChar 1 (00)? SendChar 2 (00)? Change Setup: 0 Server 1 Channel 1 2 Channel 2 4 WLAN 5 Expert 6 Security 7 Defaults 8 Exit without save 9 Save and exit Your choice? 9 Parameters stored... Using the Lantronix WiBox with the CR800 or CR1000 8
Step 4: Test the wireless connection At this point the WiBox should be configured for your wireless network. You can test this by opening a web browser and typing the WiBox IP address in the address bar. You will be prompted for a user name and password. Leave both blank and click OK. If you see the WiBox Home page (shown below), you have correctly configured your WiBox. (Figure 6) Note It was noticed that the majority of modern web browsers (e.g. IE11, Chrome 35) are not compatible with WiBox web interface. For working with WiBox web interface we recommend using the Lantronix DeviceInstaller utility. The utility contains an embedded compatible web browser. DeviceInstaller can be downloaded from the Lantronix website: (http://www.lantronix.com/ftp/deviceinstaller/lantronix/4.4/4.4.0.1/installers/download_web/setup.exe). Using the Lantronix WiBox with the CR800 or CR1000 9
Step 5: Connect the WiBox to the CR800/CR1000 (Figure 7) Remove the null-modem serial cable from the WiBox. Connect one end of a regular serial cable to the WiBox and the other end to the RS-232 port on the CR800 or CR1000. Using the Lantronix WiBox with the CR800 or CR1000 10
Step 6: Configure MultiLogger Launch MultiLogger and add a socket to a gateway. Then add a CR800 or CR1000 to that socket. In the Settings tab, change the IP Address and port to 192.168.0.100:10001 as shown in Figure 8: (Figure 8) Using the Lantronix WiBox with the CR800 or CR1000 11
Appendix A Changing the IP Address Remotely To change the IP Address of the WiBox remotely, follow the steps below: 1) Open Lantronix DeviceInstaller. You may need to download this software. Contact your IT department. 2) Click on the warning shown below, if present. If the warning does not appear, proceed to the next step. 3) When asked to check for updates, click No. (Figure 9) (Figure 10) Using the Lantronix WiBox with the CR800 or CR1000 12
4) The system will perform a search for any devices connected to the network shown in the left-hand pane. Any devices found will be listed in the right-hand pane. It is okay if "No Devices Were Found!" appears in the right-hand pane. If the devices you are wanting to modify are found, skip steps 5 through 7 and proceed to step 8. If the device you wish to modify is not found proceed to step 5. (Figure 11) 5) Click on Tools Options. Verify that the correct network adaptor if more than one is present is selected. If not, click the check box for the correct adaptor/network. Then click OK. (Figure 12) 6) Click on Search in the main panel to refresh the adaptor that was changed in the previous step. If devices are found on the network they will be shown on the right-hand pane, and step 7 can be skipped. If "No Devices Were Found!" still is shown on the right-hand pane, continue to step 7. Using the Lantronix WiBox with the CR800 or CR1000 13
7) Click on Device Add Device. Type the device's IP address into the dialog box, then click OK. (Figure 13) 8) An Error dialog box will appear, click OK. If any other errors pop-up, click OK. (Figure 14) Using the Lantronix WiBox with the CR800 or CR1000 14
9) First, click on the device IP address you would like to change in the left-hand pane. Then, click on the Web Configuration tab to launch the embedded web browser. Once active, click on the green arrow to the right of the Address edit to launch the Device's web page. This system will ask you for a username and password. Both of these fields can be left blank. Click OK. If a username and password are required, contact your IT department. (Figure 15) 10) Once connected to the Device, the following screen will display. Write down the MAC Address listed in the header for later. (Figure 16) Using the Lantronix WiBox with the CR800 or CR1000 15
11) Click on Network. The following screen will be presented. Make the desired IP Address and Subnet Mask changes, then click on OK at the bottom of the screen. Finally, click on Apply Settings. This will store the changes and then reboot the device. During the reboot sequence you will lose connection. (Figure 17) 12) Once the device has completed its reboot sequence, a test of the new IP settings will be needed. 13) Follow steps 7 through 10 above but using the new IP address. If the WiBox main screen appears you have made connection to the device. Compare the MAC address that you noted during prior to changing the IP address, during step 10. If they match, you know that you have connected back to the same device and that the new IP address is working properly. 14) Next, MultiLogger will need to be changed to match the new IP address. Open MultiLogger on the server. Using the Lantronix WiBox with the CR800 or CR1000 16
15) Highlight the node in the network tree that you would like to change. Then change the IP address. Leave the port and the colon that separates the IP address and the port as is. Click Save. 16) Repeat these steps for each IP address/node. (Figure 18) Using the Lantronix WiBox with the CR800 or CR1000 17