Difference between revisions of "Configuring USB Wireless Devices"

From Yantrr Wiki
Jump to: navigation, search
Line 10: Line 10:
 
</pre>
 
</pre>
 
*Idetify USB WiFi Device listed above supported by Debian
 
*Idetify USB WiFi Device listed above supported by Debian
 +
<p>
 
Search your WiFi module is listed on page https://wiki.debian.org/WiFi#USB_Devices
 
Search your WiFi module is listed on page https://wiki.debian.org/WiFi#USB_Devices
 +
<br />
 
For example,
 
For example,
 
The WiFi module RTL8188CUS is supported under module name rtl8192cu.
 
The WiFi module RTL8188CUS is supported under module name rtl8192cu.
 
+
<br />
 
If its not supported, Please contact Yantrr Support team.
 
If its not supported, Please contact Yantrr Support team.
 +
</p>
 +
 +
*Installing wireless tools and wpasupplicant
 +
<pre>
 +
#apt-get install wireless-tools
 +
</pre>
 +
<pre>
 +
#apt-get install wpasupplicant
 +
</pre>
 +
 +
*List available wireless interface on system
 +
<pre>
 +
# iwconfig
 +
wlan0    IEEE 802.11bgn  ESSID:"YES"  Nickname:"<WIFI@REALTEK>"
 +
          Mode:Managed  Frequency:2.412 GHz  Access Point: 0C:D2:B5:3B:A5:48 
 +
          Bit Rate:72.2 Mb/s  Sensitivity:0/0 
 +
          Retry:off  RTS thr:off  Fragment thr:off
 +
          Encryption key:****-****-****-****-****-****-****-****  Security mode:open
 +
          Power Management:off
 +
          Link Quality=100/100  Signal level=-52 dBm  Noise level=0 dBm
 +
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
 +
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0
 +
 +
lo        no wireless extensions.
 +
 +
eth0      no wireless extensions.
 +
</pre>
 +
 +
* List names of available access points nearby
 +
<pre>
 +
# iwlist scan
 +
wlan0    Scan completed :
 +
          Cell 01 - Address: 0C:D2:B5:3B:A5:48
 +
                    ESSID:"YES"
 +
                    Protocol:IEEE 802.11bgn
 +
                    Mode:Master
 +
                    Frequency:2.412 GHz (Channel 1)
 +
                    Encryption key:on
 +
                    Bit Rates:150 Mb/s
 +
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
 +
                    IE: IEEE 802.11i/WPA2 Version 1
 +
                        Group Cipher : CCMP
 +
                        Pairwise Ciphers (1) : CCMP
 +
                        Authentication Suites (1) : PSK
 +
                    Quality=100/100  Signal level=-53 dBm 
 +
 +
lo        Interface doesn't support scanning.
 +
 +
eth0      Interface doesn't support scanning.
 +
</pre>
 +
 +
*Calculate the WPA PSK hash for SSID
 +
<pre>
 +
# wpa_passphrase ssid_name wifi_password
 +
network={
 +
        ssid="myssid"
 +
        #psk="my_very_secret_passphrase"
 +
        psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
 +
}
 +
</pre>
 +
 +
* Add configuration of wlan0 in /etc/network/interfaces, (copy psk value from above step and assign it to wpa-psk)
 +
<pre>
 +
# nano /etc/network/interfaces
 +
auto wlan0
 +
iface wlan0 inet dhcp
 +
    wpa-ssid ssid_name
 +
    wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
 +
</pre>
 +
 +
*Bring wlan0 interface up
 +
<pre>
 +
ifup wlan0
 +
</pre>
 +
Now WiFi connection is up
 +
 +
* To route all traffic through WiFi connection
 +
<pre>
 +
ip route replace default via IP_ADDRESS_OF_WiFi_ROUTER dev wlan0
 +
</pre>
 +
For example,
 +
<pre>
 +
ip route replace default via 192.168.1.1 dev wlan0
 +
</pre>

Revision as of 02:04, 19 September 2015

Note : Ensure the USB WiFi is connected to Beaglebone Black/VIBE before device bootup

Instructions

  • Check that USB WiFi is visible on the USB bus by:
# lsusb
Bus 001 Device 002: ID 0424:2412 Standard Microsystems Corp. 
Bus 002 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Idetify USB WiFi Device listed above supported by Debian

Search your WiFi module is listed on page https://wiki.debian.org/WiFi#USB_Devices
For example, The WiFi module RTL8188CUS is supported under module name rtl8192cu.
If its not supported, Please contact Yantrr Support team.

  • Installing wireless tools and wpasupplicant
#apt-get install wireless-tools
#apt-get install wpasupplicant
  • List available wireless interface on system
# iwconfig
wlan0     IEEE 802.11bgn  ESSID:"YES"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 0C:D2:B5:3B:A5:48   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=-52 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.
  • List names of available access points nearby
# iwlist scan
wlan0     Scan completed :
          Cell 01 - Address: 0C:D2:B5:3B:A5:48
                    ESSID:"YES"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=-53 dBm  

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.
  • Calculate the WPA PSK hash for SSID
# wpa_passphrase ssid_name wifi_password
network={
        ssid="myssid"
        #psk="my_very_secret_passphrase"
        psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
}
  • Add configuration of wlan0 in /etc/network/interfaces, (copy psk value from above step and assign it to wpa-psk)
# nano /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid ssid_name
    wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
  • Bring wlan0 interface up
ifup wlan0

Now WiFi connection is up

  • To route all traffic through WiFi connection
ip route replace default via IP_ADDRESS_OF_WiFi_ROUTER dev wlan0

For example,

ip route replace default via 192.168.1.1 dev wlan0