5 Gould Road, PO Box 2155 New London, NH 03257 USA Voice: (603) 526-9800 info@canarysystems.com www.canarysystems.com Overview Using the Lantronix WiBox with the CR800 or CR1000 Application Note #23 The CR800 and C-1000 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 communicating with a CR800 or CR1000 datalogger over TCP/IP socket. This application note will detail the steps necessary to configure the Lantronix WiBox and adding a device to Multilogger to retrieve data. Definitions Ad-Hoc Network: An ad-hoc 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 ) available 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 ad-hoc. The SSID is used to configure each device or PC to select the wireless network that you want it 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 Datalogger 5.) Terminal emulation software, such as HyperTerminal 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/) Using the Lantronix WiBox with the CR-800 or CR-1000 Page 1 of 10
Configuring the WiBox This application note will describe how to configure your WiBox to operate in an infrastructure network. It will not cover configuring for an ad-hoc network. Step 1: Gather information about your wireless network: Before you can configure the WiBox you will to understand the wireless network that you will install the WiBox into, work with your systems administrator to obtain this information, specially: 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. This is called DHCP, is opposed to static IP addresses that you must set manually. Multilogger requires 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 static IP addresses in this range. If you have many WiBox s in your setup, it may be help 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 Page 2 of 10
Example Wireless Network: The diagram below shows an example wireless network with the WiBox and CR-800. The network is setup with WPA2-Personal security mode. The PC is setup to receive its IP address from the access point via DHCP and the WiBox is assigned a static IP address of 192.168.0.100. The instructions in this application note will use the settings for this example network. Step 2: Connect the WiBox to PC with null-modem serial cable In order to do initial setup of the WiBox it must be connected directly to a PC with the null-modem serial cable provided with the WiBox. 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. Connected 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 Page 3 of 10
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 (can be anything but this make it easier to find later). Click on the ok button. The Connect To dialog box will appear. Using the Connect Using: drop down; select the appropriate COM port from the list. Click on the Configure button to bring up the Properties dialog. Using the Lantronix WiBox with the CR800 or CR1000 Page 4 of 10
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. Click the OK button on the Connect To dialog to bring up the communications window. Using the Lantronix WiBox with the CR800 or CR1000 Page 5 of 10
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 below. If the configuration screen doesn t show up after 15 seconds, disconnect power and repeat the sequence. Press <ENTER> to go into Setup Mode. 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> 1 for Wireless Only 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> Using the Lantronix WiBox with the CR800 or CR1000 Page 6 of 10
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 see the passphrase while you re entering it. 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 the save and exit and cycle power on the WiBox, all setting 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 the WiBox has successfully accessed with 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)? Using the Lantronix WiBox with the CR800 or CR1000 Page 7 of 10
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 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 Page 8 of 10
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 in below), you have correctly configured your WiBox. Using the Lantronix WiBox with the CR800 or CR1000 Page 9 of 10
Step 5: Connect the WiBox to the CR800/CR1000 Remove the null-modem serial cable from the WiBox. Connect one end of a regular serial cable to WiBox the other end to RS-232 port on the CR800 or CR1000. Step 6: Configure MultiLogger Launch MultiLogger and add a socket to a gateway. Then add a CR800 or CR1000 to that socket. On settings tab, change the IP Address and port to 192.168.0.100:10001 as shown below. Using the Lantronix WiBox with the CR800 or CR1000 Page 10 of 10