================================================================================
WIRELESS CONNECTION INSTRUCTIONS FOR TS-WIFIBOX
Documentation from September 2009

This document gives step by step instructions for how to connect to wireless
Access Points (AP) from within TS-Linux (On-Board Flash) and Debian Lenny (SD).
It was tested using a Linksys WRT54GC Wireless Router as an AP.  As a note, 
WPA is disabled by default on startup, but can be enabled (see 
/etc/init.d/wpasupplicant).  Also, the Debian SD card is not included, but is
available for download at ftp://ftp.embeddedarm.com. 

================================================================================
* Wireless connections tested:
   - Unencrypted; WEP; WPA Personal (TKIP); WPA2 Personal (AES)
   
* Useful Commands:
   - iwconfig -- use to check status of connection such as associations
   - ifconfig -- use to check IP address of connection
   - iwlist scan -- gives wireless networks available


================================================================================
TS-Linux (On-Board Flash)
================================================================================
   =============================================================================
   Unencrypted
   =============================================================================
   1) ifconfig wlan0 up                               // Bring interface up
   2) iwconfig wlan0 essid TS                         // Associate with AP
   3) udhcpc -i wlan0                                 // Dynamically assign IP

   =============================================================================
   WEP Encryption
   =============================================================================
   1) ifconfig wlan0 up                               // Bring interface up
   2) iwconfig wlan0 essid TS key 1b9dda483d          // Associate with AP
   3) udhcpc -i wlan0                                 // Dynamically assign IP

   =============================================================================
   WPA Personal - TKIP
   =============================================================================
   1) ifconfig wlan0 up
   2) wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
   3) wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant_custom.conf -B
   4) udhcpc -i wlan0

   =============================================================================
   WPA2 Personal - AES
   =============================================================================
   1) ifconfig wlan0 up
   2) wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
   3) insert "proto=RSN" into "network" block in /etc/wpa_supplicant_custom.conf
   4) wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant_custom.conf -B
   5) udhcpc -i wlan0


================================================================================
Debian (SD Card)
================================================================================
   =============================================================================
   Unencrypted
   =============================================================================
   1) ifconfig wlan1 up                               // Bring interface up
   2) iwconfig wlan1 essid TS                         // Associate with AP
   3) dhclient wlan1                                  // Dynamically assign IP

   =============================================================================
   WEP Encryption
   =============================================================================
   1) ifconfig wlan1 up                               // Bring interface up
   2) iwconfig wlan1 essid TS key 1b9dda483d          // Associate with AP
   3) dhclient wlan1                                  // Dynamically assign IP

   =============================================================================
   WPA Personal - TKIP
   =============================================================================
   PRE: You will need wpasupplicant package (apt-get install wpasupplicant)

   1) ifconfig wlan1 up
   2) wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
   3) wpa_supplicant -iwlan1 -Dwext -c/etc/wpa_supplicant_custom.conf -B
   4) dhclient wlan1

   =============================================================================
   WPA2 Personal - AES
   =============================================================================
   PRE: You will need wpasupplicant package (apt-get install wpasupplicant)

   1) ifconfig wlan1 up
   2) wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
   3) insert "proto=RSN" into "network" block in /etc/wpa_supplicant_custom.conf
   4) wpa_supplicant -iwlan1 -Dwext -c/etc/wpa_supplicant_custom.conf -B
   5) dhclient wlan1


================================================================================
TROUBLESHOOTING INSTALLATION OF wpasupplicant:
================================================================================
   1) apt-get install wpasupplicant

      The following packages have unmet dependencies:
        libreadline5: Depends: readline-common but it is not going to be installed
        wpasupplicant: Depends: libdbus-1-3 (>= 1.1.1) but it is not going to be instd
                       Depends: libpcsclite1 (>= 1.4.102) but it is not going to be id
      E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a .

   2) cp /var/lib/dpkg/status-old /var/lib/dpkg/status
   3) apt-get install -f
   4) apt-get install wpasupplicant

      The following extra packages will be installed:
        dbus dbus-x11 libdbus-1-3 libpcsclite1
      Suggested packages:
        pcscd wpagui libengine-pkcs11-openssl
      The following NEW packages will be installed:
        dbus dbus-x11 libdbus-1-3 libpcsclite1 wpasupplicant
      0 upgraded, 5 newly installed, 0 to remove and 35 not upgraded.
      Need to get 775kB of archives.
      After this operation, 1942kB of additional disk space will be used.
      
      
================================================================================
MISCELLANEOUS: 
================================================================================
   =============================================================================
   Setting Transmission Power
   =============================================================================
   $ iwconfig wlan0 txpower 20  #Sets Tx-Power to 20dBm
