Smart Walker III Networking User Guide

Smart Walker III Networking User Guide

Smart Walker III Networking User Guide

1.Establishing Wireless Connection

2.Wireless Transfer Using WinSCP

3.Starting VPN connection

4.Networking Files

a.Networking Interfaces File

  1. WPA Supplicant File
  2. WinSCP Script for Automated Retrieval
  3. Batch File for Automated Retrieval

5.Future Work

This networking user guide was created by Jeremy Rossi. Any questions can be directed to .

  1. Establishing Wireless Connection

The Smartwalker III utilizes a Pandaboard-ES as the main control unit of the system, which does not contain a CMOS battery to keep the board in a constant ‘ON’ state. Due to this, the Pandaboard will automatically boot believing that the date is approximately December 14th 2014 upon every power down and or power cycle. With this reset, the networking interface automatically scans the Ethernet port “eth0” by default. As the system is set to wireless configuration however, the networking interfaces will need to be manually reset in order to correctly route to the WPA supplicant file that allows users access to the WPA2 security system employed by RIT. Once connected to the wireless network, the time and date will automatically be established to the correct time and date. The steps to create this wireless connection are as follows:

  1. From Applications on the desktop, open the Terminal.
  2. Type in ‘sudo /etc/init.d/networking restart’ to reset the network interface file
  3. Type in password for Smartwalker
  4. Open ‘Firefox’ from the Desktop to verify wireless connection established
  5. Type in ‘ifconfig’ to find the IP address allocated for ‘wlan0’
  6. Log the IP address for ‘wlan0’ for Remote Desktop/SSH/WinSCP needs

At this point, Smartwalker III should be connected to the RIT network to ‘ritwpa2’.

  1. Wireless Transfer Using WinSCP

As the Smartwalker III is now connected to the RIT network, it is possible to wirelessly transfer files from the Smartwalker to a remote PC. The way in which this wireless transfer works is by remotely accessing the Pandaboard-ES via WinSCP and having the user navigate to the designated file location on the Panda and copy it back to the remote PC. The steps below will begin the same for a system reboot requiring a networking reset. If a wireless connection is established already, skip to step 7.

  1. 1.From Applications on the desktop, open the Terminal.
  2. Type in ‘sudo /etc/init.d/networking restart’ to reset the network interface file
  3. Type in password for Smartwalker
  4. Open ‘Firefox’ from the Desktop to verify wireless connection established
  5. Type in ‘ifconfig’ to find the IP address allocated for ‘wlan0’
  6. Log the IP address for ‘wlan0’ for Remote Desktop/SSH/WinSCP needs
  7. Open WinSCP on remote PC.
  8. For hostname of remote connection, type in ‘[email protected]<IP address recorded for wlan0>’
  9. When prompted, type in password for Smartwalker.
  10. Navigate in the Smartwalker Pane to ‘smartwalker3’ file directory.
  11. The vitals file generated by DataCommunications.cpp is ‘MyData.txt’ which will be inside of the ‘smartwalker3’ directory.
  12. Copy ‘MyData.txt’ to desired location on remote PC via the navigation pane.
  13. Data will now be transferred from Smartwalker III to the remote PC.

At this point, Smartwalker III should be connected to the RIT network to ‘ritwpa2’ and have successfully transferred ‘MyData.txt’ to remote PC for evaluation.

  1. Starting VPN Connection

This step is not necessary for normal functionality of Smartwalker III during data acquisition, navigation, or course mapping as it effectively connects to the RIT network and waits to be accessed remotely. This VPN connection is created to connect to the RIT network with relatively similar IP addresses that should port to ‘smartwalkeriii.rit.edu’ as a hostname, but was not verified due to the VPN taking up too many system resources while running. Once again these instructions assume a complete networking reset is required, but if a wireless connection is established then skip to step 7.

  1. From Applications on the desktop, open the Terminal.
  2. Type in ‘sudo /etc/init.d/networking restart’ to reset the network interface file
  3. Type in password for Smartwalker
  4. Open ‘Firefox’ from the Desktop to verify wireless connection established
  5. Type in ‘ifconfig’ to find the IP address allocated for ‘wlan0’
  6. Log the IP address for ‘wlan0’ for Remote Desktop/SSH/WinSCP needs
  7. Type in ‘sudoopenconnect -s /etc/vpnc/vpnc-script vpn.rit.edu’ to open the VPN client.
  8. Accept the security certificate required for connection to the network by entering ‘yes’.
  9. Record the IP address generated on the Terminal as it is the VPN IP address.

At this point, Smartwalker III should be connected to the RIT network to ‘ritwpa2’ and have successfully established a VPN tunnel to the RIT VPN.

  1. Networking Files

The following files are currently established on either the Pandaboard (Networking Interfaces File, and WPA Supplicant File) or the remote PC (WinSCP Script, and Batch File). The WinSCP Script and Batch file need to be updated to the DHCP IP Address designated at each connection to the wireless network.

A.Networking Interfaces File:

The networking interfaces file tells the Pandaboard-ES which network connections are available, and where to look for network credentials in the case of WPA2-EAP security. This is the file that effectively tells the Pandaboard-ES how to connect to the internet, and needs to be reset after every networking reset. The code is as follows:

‘auto wlan0

iface wlan0 inetdhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf’

B.WPA Supplicant File:

The file indicated by /etc/wpa-supplicant/wpa_supplicant.conf tells the Pandaboard how to log into the RIT network ‘ritwpa2’ and will have to be modified to valid RIT credentials. The code is as follows:

‘network={

ssid="ritwpa2"

scan_ssid=1

key_mgmt=WPA-EAP

identity="<RITuser"

password="RITpassword"

phase1="peaplabel=0"

phase2="auth=MSCHAPV2"

}’

This file will need to be modified in either nano or gedit and saved prior to resetting networking interfaces in the terminal.

C.WinSCP Script for Automated Retrieval

As previously noted in the document, WinSCP is used to transfer files from the Pandaboard to the remote PC, however it is possible to automate the transfer as well as make it occur every day at the same time via use of scripts and batch files. The following file is the script file that will open WinSCP as well as transfer MyData.txt to the Documents folder of the logged in user. Note, the RSA hostkeys will need to be regenerated once the Pandaboard is connected to the wireless network due to DHCP. The script file is as follows:

‘# Automatically abort script on errors

option batch abort

# Disable overwrite confirmations that conflict with the previousoption confirm off

# Connect

open sftp://smartwalker:[email protected]<wlan0IPaddress>/ -hostkey="ssh-rsa2048 Public Hostkey"

# Change remote directory

cd data

# Force binary mode transfer

option transfer binary

# Puts ASCII characters in the document such as New Line and Carriage Return

ascii

# Download file to the local directory C:\Users\<RITuser>\Documents

get vitals.txt C:\Users\<RITuser>\Documents\myData.txt

# Disconnect

Close’

Record the location where this script file is to be saved as the batch file will call upon it to use WinSCP. In the case of this example it is also saved in the Documents folder of the logged in user.

D.Batch File for Automated Retrieval

Batch files are files that Windows machines recognize as an administrative task, and will execute the task listed in the first location of the file and then create a log file if designated. The batch file can be added to the System Event calendar of Administrative Tools on a Windows PC to be run at predetermined times daily, weekly, monthly, etc. For the sake of this guide the file is not placed in the System Event calendar. The batch file is as follows:

‘ "C:\Program Files\WinSCP\WinSCP.exe" /script="c:\Users\<RITuser>\Documents\script.txt" ^

/log="c:\Users\<RITuser>\Documents\example.log" ‘

The batch file requires double quotes (“) for file names, so the single quote (‘) used as in previous entries as the entered code will have a space between the three quotations in order to avoid possible confusion. The first entered code of the batch file starts with the double quotes and ends with the double quotes (“).

  1. Future Work

As the current state of the networking heavily relies on the user to manually reset the networking interfaces file as well as log IP addresses, the future code will need to be modified in order to fix shortfalls in the current design. A list of the items to be fixed is as follows:

  1. Establish a static wireless IP address.
  2. The RIT network assigns the Pandaboard-ES a new IP address during each reconnection due to DHCP. By assigning the Pandaboard-ES a static IP address, the user will no longer need to log the IP address generated after all wireless reconnections.
  3. Generate Host Keys on Static IP address.
  4. By generating host keys on the Pandaboard-ES after a static IP address is obtained, the ability to automate wireless data transfer through SSH is available. With DHCP connections these host keys are not current as the IP address changes resulting in a different set of host keys with every new connection to the network.
  5. Modify WinSCP Script and batch file with updated public host key, script location, and static IP address.
  6. This seems pretty self-explanatory, but once all the new information is created it will need to be updated in the script file and batch file in order for the code to function correctly.