Difference between revisions of "Wifi"
m (Added review notes and marked status as Buggy.) |
|||
Line 1: | Line 1: | ||
− | {{todo| | + | {{todo|InProgress (10.20.2015-14:23->JJ+);(10.20.2015-13:43->JJ+);(10.23.2015-11:50->MD-);(10.26.2015-16:50->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }} |
{{#seo: | {{#seo: | ||
|title=Wireless Networking | |title=Wireless Networking | ||
Line 10: | Line 10: | ||
__TOC__ | __TOC__ | ||
+ | <!--Background Information--> | ||
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | {{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | ||
− | + | While some machines from EMAC are not natively designed to connect to wireless networds, a large amount of these systems do have USB ports. Using a wireless network USB adapter, like one found here at [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin], the system can be modified to establish wireless network connections. This page describes the actions needed to take to connect to a wireless network either using a wireless network USB adapter or built-in Wi-Fi found on EMAC products like the SoM-200GS carrier. We chose to use the ThinkPenguin USB adapter for this page because it is targeted to work with most, if not all, Linux distributions. | |
+ | <!-- DELETE THIS WARNING BEFORE SUBMITTING IT TO REVIEW --> | ||
{{warning | A bit more background info would be nice. Why USB dongles? Why ThinkPenguin? etc}} | {{warning | A bit more background info would be nice. Why USB dongles? Why ThinkPenguin? etc}} | ||
+ | |||
+ | <!-- General Information--> | ||
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | {{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | ||
− | === | + | |
+ | <!-- Set Up Instructions --> | ||
+ | ===Set Up=== | ||
+ | <!-- DELETE THIS WARNING BEFORE SUBMITTING IT TO REVIEW --> | ||
{{warning|These descriptions need to be fleshed out the same way you fleshed out sentences in the Getting Started document I just reviewed.}} | {{warning|These descriptions need to be fleshed out the same way you fleshed out sentences in the Getting Started document I just reviewed.}} | ||
− | + | Before the device can be connected to the network, some additional software will need to be installed. In order to obtain the new packages, connect the system to a physical network. If your are going to be using the USB adapter for the connection, it may be plugged in at this time, although it may not have the proper drivers installed to the system yet. | |
− | + | <br clear=all> | |
− | + | 1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. | |
− | + | :{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} | |
− | + | 2. A check for any updates is typically a good practice before installing new software. Us the opkg manager to install any updated software from the package list. | |
− | + | :{{cli | username=root | hostname=ipac9x25 | opkg update }} | |
− | + | 3. One of the best tools to establish the connection to wireless networks is the wpa-supplicant package. This supplicant will allow the system to make connections to WPA and WPA2 protected networks. Install this package with the opkg manager. | |
− | + | :{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} | |
− | + | 4. If using the USB adapter, the appropriat drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the linux-firmware-ath9k package. | |
− | + | :{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} | |
− | + | 5. If using built-in Wi-Fi, the marvel license and linux-firmware-sd8787 packages will need to be installed. | |
− | + | {{clo | indent=2}} | |
+ | {{clio | opkg install linux-firmware-marvel-license | username=root | hostname=som9g45 }} | ||
+ | {{clio | opkg install linux-firmware-sd8787 | username=root | hostname=som9g45}} | ||
+ | {{clos}} | ||
+ | 6. Independent of using buiilt-in Wi-Fi or an adapter, the iw and wireless-tools packages will complete the needed software to get a connection started. | ||
+ | {{clo | indent=2}} | ||
+ | {{clio | opgk install iw | username=root | hostname=ipac9x25}} | ||
+ | {{clio | opkg install wireless-tools | username=root | hostname=ipac9x25 }} | ||
+ | {{clos}} | ||
{{warning | The above should be in just one continuous cli output box, so that it looks like it does in real life. Hit edit to look at the wiki markup to see how I did this on this page: [[Installing_LILO]]. | {{warning | The above should be in just one continuous cli output box, so that it looks like it does in real life. Hit edit to look at the wiki markup to see how I did this on this page: [[Installing_LILO]]. | ||
Line 36: | Line 51: | ||
Also note the use of the <code><nowiki><cl></nowiki></code> tag in the above referenced page. This is for the Continuous Lists extension. You need to make use of this for your lists. There should be documentation on it if you use google.}} | Also note the use of the <code><nowiki><cl></nowiki></code> tag in the above referenced page. This is for the Continuous Lists extension. You need to make use of this for your lists. There should be documentation on it if you use google.}} | ||
− | + | 7. Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. | |
{{warning | Why do they have to plug this in upon log in? Why can't they keep it plugged in? It's not going to be usable for our customers if they have to manually plug it in after logging in.}} | {{warning | Why do they have to plug this in upon log in? Why can't they keep it plugged in? It's not going to be usable for our customers if they have to manually plug it in after logging in.}} | ||
− | |||
− | |||
− | |||
{{warning | This step ^^ logically belongs in the next section, since sections should stand alone.}} | {{warning | This step ^^ logically belongs in the next section, since sections should stand alone.}} | ||
Line 47: | Line 59: | ||
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | {{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | ||
− | + | Using the packages that have just been installed, the system can be connected to the wireless network.<br /> | |
− | 1. | + | 1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permisions. |
+ | :{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} | ||
+ | |||
+ | 2. Wireless networks can be found using the can option of iw. | ||
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} | :{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} | ||
− | : | + | : A detailed list of the nearby networks will be printed out to the terminal. To identify teh SSIDs and respective signal strengths of the network(s) easier, pipe the iw command with the scan option into grep using keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection. |
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] | :[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] | ||
<br clear=all> | <br clear=all> | ||
− | + | ||
+ | The <code>/etc/wpa_supplicant.conf</code> file will need to be modified in a specific manner depending on the protection type of the network. | ||
+ | 3. For an open network, you'll just need to uncomment the lines in <code>/etc/wpa_supplicant.conf</code> <br /> | ||
<pre> | <pre> | ||
###open network | ###open network | ||
Line 67: | Line 84: | ||
See [[LILO_Overview]] for a page where this extension is used. Documentation on this plugin is available from MediaWiki: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Note that the version that we have installed still uses GeSHi as its engine. }} | See [[LILO_Overview]] for a page where this extension is used. Documentation on this plugin is available from MediaWiki: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Note that the version that we have installed still uses GeSHi as its engine. }} | ||
− | + | 4. For a WEP password protected network, use <code>wpa_passphrase</code> to generate the private shared key(psk). | |
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]] | :[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]] | ||
Line 74: | Line 91: | ||
<br clear=all> | <br clear=all> | ||
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. | : SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. | ||
− | + | 5. Highlight the psk and copy it.<br /> | |
− | + | 6. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /> | |
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] | :[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] | ||
<br clear=all> | <br clear=all> | ||
− | + | 7. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument <code>start</code>. | |
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} | :{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} | ||
: Give the command some time to establish the connection and watch the terminal output. A connection has been established when output stops and the last line reads: | : Give the command some time to establish the connection and watch the terminal output. A connection has been established when output stops and the last line reads: | ||
Line 94: | Line 111: | ||
<br clear=all> | <br clear=all> | ||
− | + | 8. Confirm there is an IP address under wlan0 with the ifconfig command <br /> | |
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all> | :[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all> | ||
− | + | 9. Disconnect any Ethernet connections and ping to [http://www.emacinc.com www.emacinc.com] to verify that the system can wirelessly connect to the Internet. <br /> | |
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] | :[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] | ||
<br clear=all> | <br clear=all> |
Revision as of 17:02, 26 October 2015
This guide will illustrate how to set up and connect to a wireless network using the ThinkPenguin Wireless N USB Adapter for GNU/Linux and the built-in WiFi on the SoM-200GS.
Contents
Background
While some machines from EMAC are not natively designed to connect to wireless networds, a large amount of these systems do have USB ports. Using a wireless network USB adapter, like one found here at ThinkPenguin, the system can be modified to establish wireless network connections. This page describes the actions needed to take to connect to a wireless network either using a wireless network USB adapter or built-in Wi-Fi found on EMAC products like the SoM-200GS carrier. We chose to use the ThinkPenguin USB adapter for this page because it is targeted to work with most, if not all, Linux distributions.
WARNING! |
A bit more background info would be nice. Why USB dongles? Why ThinkPenguin? etc |
General Information
Set Up
WARNING! |
These descriptions need to be fleshed out the same way you fleshed out sentences in the Getting Started document I just reviewed. |
Before the device can be connected to the network, some additional software will need to be installed. In order to obtain the new packages, connect the system to a physical network. If your are going to be using the USB adapter for the connection, it may be plugged in at this time, although it may not have the proper drivers installed to the system yet.
1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem.
root
@
ipac9x25
:
~
#
mount -o remount,rw /
2. A check for any updates is typically a good practice before installing new software. Us the opkg manager to install any updated software from the package list.
root
@
ipac9x25
:
~
#
opkg update
3. One of the best tools to establish the connection to wireless networks is the wpa-supplicant package. This supplicant will allow the system to make connections to WPA and WPA2 protected networks. Install this package with the opkg manager.
root
@
ipac9x25
:
~
#
opkg install wpa-supplicant
4. If using the USB adapter, the appropriat drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the linux-firmware-ath9k package.
root
@
ipac9x25
:
~
#
opkg install linux-firmware-ath9k
5. If using built-in Wi-Fi, the marvel license and linux-firmware-sd8787 packages will need to be installed.
root
@
som9g45
:
~
#
opkg install linux-firmware-marvel-license
root
@
som9g45
:
~
#
opkg install linux-firmware-sd8787
6. Independent of using buiilt-in Wi-Fi or an adapter, the iw and wireless-tools packages will complete the needed software to get a connection started.
root
@
ipac9x25
:
~
#
opgk install iw
root
@
ipac9x25
:
~
#
opkg install wireless-tools
WARNING! |
The above should be in just one continuous cli output box, so that it looks like it does in real life. Hit edit to look at the wiki markup to see how I did this on this page: Installing_LILO.
<cl> tag in the above referenced page. This is for the Continuous Lists extension. You need to make use of this for your lists. There should be documentation on it if you use google. |
7. Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages.
WARNING! |
Why do they have to plug this in upon log in? Why can't they keep it plugged in? It's not going to be usable for our customers if they have to manually plug it in after logging in. |
WARNING! |
This step ^^ logically belongs in the next section, since sections should stand alone. |
Wireless Networking
Using the packages that have just been installed, the system can be connected to the wireless network.
1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permisions.
root
@
ipac9x25
:
~
#
mount -o remount,rw /
2. Wireless networks can be found using the can option of iw.
root
@
ipac9x25
:
~
#
iw dev wlan0 scan
- A detailed list of the nearby networks will be printed out to the terminal. To identify teh SSIDs and respective signal strengths of the network(s) easier, pipe the iw command with the scan option into grep using keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.
The /etc/wpa_supplicant.conf
file will need to be modified in a specific manner depending on the protection type of the network.
3. For an open network, you'll just need to uncomment the lines in /etc/wpa_supplicant.conf
###open network #network={ # ssid="your-ssid" (optional) # scan_ssid=1 # key_mgmt=NONE #}
WARNING! |
Instead of using the <pre> tag, you should use the <syntaxhighlight> tag. We use this tag consistently to ensure all such text looks alike. It will provide syntax highlighting for a variety of scripting languages, and may work to provide syntax highlighting for this config file using the shell/bash language.
|
4. For a WEP password protected network, use wpa_passphrase
to generate the private shared key(psk).
WARNING! |
These should not be screenshots. You should copy and paste the text, and use the cli template set to display multi-line output, as can be seen in the LILO page I linked in this page earlier. Also, look at what I've enclosed in code tags. You need to check through the document for any command or filename, and enclose it within <code></code> tags. |
- SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network.
5. Highlight the psk and copy it.
6. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk
7. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument start
.
root
@
ipac9x25
:
~
#
/etc/init.d/wpa_supplicant start
- Give the command some time to establish the connection and watch the terminal output. A connection has been established when output stops and the last line reads:
A connection has failed if the following is seen repeatedly and output to the terminal continues:
- Successful connection (waiting a full minute to ensure output to the terminal stopped);
- Failed connection (waiting more than a minute as output continues to print to the terminal). The highlighted line and the repeated lines indicate an issue establishing the connection.
WARNING! |
Again, none of these should be screenshots. Change them all to multiline output using the {{clo}} {{clos}} {{clio}} {{cli}} {{icli}} etc. templates, as described in EMACTemplatesInternalPg. Note that you can click on any of the template links in that page to get more info and some examples. |
8. Confirm there is an IP address under wlan0 with the ifconfig command
9. Disconnect any Ethernet connections and ping to www.emacinc.com to verify that the system can wirelessly connect to the Internet.
Conclusion
This page walks through the procedure to connect a module to a wireless network via a WiFi adapter or built-in wireless, as well as acquiring the necessary software tools to make the connection for the first time.
WARNING! |
Strengthen the conclusion. Don't be afraid to make the conclusion long. Describe things the reader should do next.
|