WPA Manual Setting: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
(→‎Option 3: Use the hexadecimal version of your WPA key: don't repeat over and over how to start activities!)
 
(37 intermediate revisions by 22 users not shown)
Line 1: Line 1:
{{G1G1 Support FAQ}}
'''WPA is not working from the User Interface in build 650'''. If you can turn off WPA from your router, you should be able to connect by choosing the access point from the neighborhood view.
{{cleanup}}


Some builds of the XO software (including early in the original G1G1 program) cannot connect to wireless routers protected with the WPA protocol. Although the networks are visible from the OLPC, they stall when user enters a password.


In order to get around this problem, you've got a few options:
If you are having trouble connecting to an specific access point and you want to try it manually, you can try using this script: http://wiki.laptop.org/images/4/44/Wpa.sh. Once this procedure is successful, you will not have to do it again as the settings will be remembered when you reboot.


== Option 1: Upgrade your XO ==
Instructions:

# Copy http://wiki.laptop.org/images/4/44/Wpa.sh to a USB stick. (from a computer other than your XO)
Advanced users should consider [[Upgrading_the_XO|upgrading their XO]] to build 653 or higher, where WPA support is much better. Of course, to be able to do this, you need to be connected to the internet. You could either connect to a public [[hotspot]], or try one of the options listed here that will allow you connect to a WPA-protected access point without upgrading your XO.
# '''CAUTION''' - if your SSID and/or passphrase contain spaces, the original script is not written to handle these. See the [[Talk:WPA_Manual_Setting|Discussion page]] for details regardin what needs to be changed. --[[User:Vlb|Vlb]] 11:09, 21 December 2007 (PST)

# On your XO, open the terminal activity from the taskbar on the home page.
== Option 2: Turn off WPA ==
# Determine the name of your USB stick (if you do not know it), by typing:

If you can turn off WPA from your router, you should be able to connect by choosing the access point from the neighborhood view.

== Option 3: Use the hexadecimal version of your WPA key ==

Instead of typing your passphrase as a human-readable (e.g. english) word or phrase, you need to enter the key as a hexadecimal value. Here's how to figure out the hexadecimal equivalent of your passphrase:

1. Start the [[Terminal activity]].

2. Type the following, substituting the values for ssid and passphrase (and then press the "Enter" key):

/usr/sbin/wpa_passphrase <ssid> <passphrase> > ~/passkey

If your SSID or passphrase contains spaces, surround the entire thing in quotation marks. e.g.:

/usr/sbin/wpa_passphrase "My Access Point" "This is my passphrase"

3. In the [[Browse]] Activity, press Ctrl-L and enter "file:///home/olpc/passkey". Find the line that starts with "psk=" and use the mouse to select all of the text that comes after the "=" (The easiest way to do this is to double-click in the middle of the long string of hexadecimal digits). Press Ctrl-C to copy the key to the clipboard.

4. Now try to connect to your WPA-protected access point in the neighborhood view. When it asks for the key, paste in the hexadecimal version of the key by typing Ctrl-V.

If you plan to use the same WPA key frequently, there is a script available at [[WPA Manual Setting]] with discussion [[Talk:Support_FAQ#Apple_Access_Point_Connection|here]] and [[Talk:WPA_Manual_Setting|here]]; not needed since build 656.

== Option 4: Manual Script ==

*If you are having trouble connecting to a specific access point and you want to try it manually, you can try using this script: http://wiki.laptop.org/images/4/44/Wpa.sh. Once this procedure is successful, you will not have to do it again as the settings will be remembered when you reboot.

=== Instructions ===
* Copy http://wiki.laptop.org/images/4/44/Wpa.sh to a USB stick. (from a computer other than your XO)
* Connect the USB stick to your XO.
* On your XO, open the [[Terminal Activity]] from the taskbar on the home page.
* Determine the name of your USB stick (if you do not know it), by typing:
$ df
$ df
# Look for the line that starts with /dev/sda1 and read across to get the name of your USB stick. In this example the name is USBNAME.
* Look for the line that starts with /dev/sda1 and read across to get the name of your USB stick. In this example the name is USBNAME.


mtd0 1048576 375772 672804 36% /
mtd0 1048576 375772 672804 36% /
tmpfs 35676 0 35676 0% /dev/shm
tmpfs 35676 0 35676 0% /dev/shm
/dev/sda1 990432 331024 659408 34% /media/USBNAME
'''/dev/sda1 990432 331024 659408 34% /media/USBNAME'''


# Copy the Wpa.sh file from the USB stick by substituting your USBNAME when typing this command. Note the period at the end of the command:
* Copy the Wpa.sh file from the USB stick by substituting your USBNAME when typing this command. Note the period at the end of the command:
$ cp /media/USBNAME/Wpa.sh .
$ cp /media/USBNAME/Wpa.sh .


* Execute the script as root by typing:
# Edit Wpa.sh to fix a bug. Replace $pass with "$pass" on the key= line. Replace $ssid with "$ssid" on the same line. (someone please upload a fixed version and remove this instruction)
$ nano Wpa.sh
$ su -
# cd /home/olpc/
# ./Wpa.sh

* If you get a "Permission denied" error, then use chmod, and try again


$ chmod 777 Wpa.sh
# Execute the script by typing:
$ ./Wpa.sh
# ./Wpa.sh


# Follow the instructions on screen, providing the SSID, passphrase and WPA version of your Access Point. If you don't know try '2'.
# Reboot the XO by typing:
$ reboot


* Follow the instructions on screen, providing the SSID, passphrase and WPA version of your Access Point. If you don't know the WPA version, try '1' first.
# When it boots back up, go to the mesh neighborhood view and click on the circle of your AP, that should be showing as open now (no lock attached to the circle)
* Reboot the XO by typing:
# reboot


* When it boots back up, go to the mesh neighborhood view and click on the circle of your AP, that should be showing as open now (no lock attached to the circle)


[[category:documentation]]
[[category:documentation]]
[[Category:Network]]

Latest revision as of 20:14, 8 April 2012

This page is part of the XO Support FAQ.     Support Index | Print This Page
<imagemap>

Image:Support-banner-square.png|173px|community support pages rect 0 0 135 204 [1] rect 135 0 345 204 Support FAQ rect 0 205 135 408 [2]

  1. Comment : there's some whitespace here:

rect 135 205 345 408 Other support

  1. maybe desc none is better. testing.

desc none

</imagemap>


Some builds of the XO software (including early in the original G1G1 program) cannot connect to wireless routers protected with the WPA protocol. Although the networks are visible from the OLPC, they stall when user enters a password.

In order to get around this problem, you've got a few options:

Option 1: Upgrade your XO

Advanced users should consider upgrading their XO to build 653 or higher, where WPA support is much better. Of course, to be able to do this, you need to be connected to the internet. You could either connect to a public hotspot, or try one of the options listed here that will allow you connect to a WPA-protected access point without upgrading your XO.

Option 2: Turn off WPA

If you can turn off WPA from your router, you should be able to connect by choosing the access point from the neighborhood view.

Option 3: Use the hexadecimal version of your WPA key

Instead of typing your passphrase as a human-readable (e.g. english) word or phrase, you need to enter the key as a hexadecimal value. Here's how to figure out the hexadecimal equivalent of your passphrase:

1. Start the Terminal activity.

2. Type the following, substituting the values for ssid and passphrase (and then press the "Enter" key):

/usr/sbin/wpa_passphrase <ssid> <passphrase> > ~/passkey

If your SSID or passphrase contains spaces, surround the entire thing in quotation marks. e.g.:

/usr/sbin/wpa_passphrase "My Access Point" "This is my passphrase"

3. In the Browse Activity, press Ctrl-L and enter "file:///home/olpc/passkey". Find the line that starts with "psk=" and use the mouse to select all of the text that comes after the "=" (The easiest way to do this is to double-click in the middle of the long string of hexadecimal digits). Press Ctrl-C to copy the key to the clipboard.

4. Now try to connect to your WPA-protected access point in the neighborhood view. When it asks for the key, paste in the hexadecimal version of the key by typing Ctrl-V.

If you plan to use the same WPA key frequently, there is a script available at WPA Manual Setting with discussion here and here; not needed since build 656.

Option 4: Manual Script

  • If you are having trouble connecting to a specific access point and you want to try it manually, you can try using this script: http://wiki.laptop.org/images/4/44/Wpa.sh. Once this procedure is successful, you will not have to do it again as the settings will be remembered when you reboot.

Instructions

  $ df
  • Look for the line that starts with /dev/sda1 and read across to get the name of your USB stick. In this example the name is USBNAME.
  mtd0       1048576       375772  672804    36%  /
  tmpfs        35676            0   35676     0%  /dev/shm
  /dev/sda1   990432       331024   659408   34%  /media/USBNAME
  • Copy the Wpa.sh file from the USB stick by substituting your USBNAME when typing this command. Note the period at the end of the command:
  $ cp /media/USBNAME/Wpa.sh .
  • Execute the script as root by typing:
  $ su -
  # cd /home/olpc/
  # ./Wpa.sh
  • If you get a "Permission denied" error, then use chmod, and try again
  $ chmod 777 Wpa.sh
  # ./Wpa.sh


  • Follow the instructions on screen, providing the SSID, passphrase and WPA version of your Access Point. If you don't know the WPA version, try '1' first.
  • Reboot the XO by typing:
  # reboot
  • When it boots back up, go to the mesh neighborhood view and click on the circle of your AP, that should be showing as open now (no lock attached to the circle)