Difference between revisions of "Wifi"
Line 1: | Line 1: | ||
− | {{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 }} | + | {{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+);(10.27.2015-15:30->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }} |
{{#seo: | {{#seo: | ||
|title=Wireless Networking | |title=Wireless Networking | ||
Line 6: | Line 6: | ||
|description=How to access a wireless network | |description=How to access a wireless network | ||
}} | }} | ||
− | |||
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. | 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. | ||
__TOC__ | __TOC__ | ||
+ | |||
<!--Background Information--> | <!--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 | + | While some machines from EMAC are not natively designed to connect to wireless networks, 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. |
− | <!-- | + | <!-- {{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--> | <!-- 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 Instructions --> | ||
===Set Up=== | ===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.}} --> |
− | {{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. |
− | 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> | <br clear=all> | ||
− | 1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. | + | <cl>1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. |
− | + | {{clo|indent=2}} | |
− | + | {{clio | mount -o remount,rw / | hostname=ipac9x25 }} | |
− | + | {{clos}} | |
− | + | * A check for any updates is typically a good practice before installing new software. Us the <code>opkg</code> manager to install any updated software from the package list. | |
− | + | {{clo|indent=2}} | |
− | + | {{clio | opkg update | hostname=ipac9x25 }} | |
− | + | {{clos}} | |
− | + | * One of the best tools to establish the connection to wireless networks is the <code>wpa-supplicant</code> package. This supplicant will allow the system to make connections to WPA and WPA2 protected networks. Install this package with the <code>opkg manager</code>. | |
+ | {{clo|indent=2}} | ||
+ | {{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} | ||
+ | {{clos}} | ||
+ | * If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the linux-firmware-ath9k package. | ||
+ | {{clo|indent=2}} | ||
+ | {{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} | ||
+ | {{clos}} | ||
+ | * If using built-in Wi-Fi, the marvel license and <code>linux-firmware-sd8787</code> packages will need to be installed. | ||
{{clo | indent=2}} | {{clo | indent=2}} | ||
− | {{clio | opkg install linux-firmware-marvel-license | + | {{clio | opkg install linux-firmware-marvel-license| hostname=som9g45 }} |
− | {{clio | opkg install linux-firmware-sd8787 | + | {{clio | opkg install linux-firmware-sd8787 | hostname=som9g45}} |
− | {{clos}} | + | {{clos}} |
− | + | * Independent of using built-in Wi-Fi or an adapter, the <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. | |
{{clo | indent=2}} | {{clo | indent=2}} | ||
− | {{clio | opgk install iw | + | {{clio | opgk install iw | hostname=ipac9x25}} |
− | {{clio | opkg install wireless-tools | + | {{clio | opkg install wireless-tools | hostname=ipac9x25 }} |
{{clos}} | {{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]]. |
<br /> | <br /> | ||
− | 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.}} --> |
− | + | * Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. | |
+ | {{clo|indent=2}} | ||
+ | {{clio| reboot |hostname=ipac9x25}} | ||
+ | {{clos}} | ||
+ | </cl> | ||
+ | <!-- {{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--> | ||
{{: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. Changes to some configuration files will be necessary, so mount the filesystem to read and write | + | Using the packages that have just been installed, the system can be connected to the wireless network.<br/> |
− | + | 1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permissions. | |
+ | {{clo|indent=2}} | ||
+ | {{clio | mount -o remount,rw / | hostname=ipac9x25}} | ||
+ | {{clos}} | ||
2. Wireless networks can be found using the can option of iw. | 2. Wireless networks can be found using the can option of iw. | ||
− | + | {{clo|indent=2}} | |
− | : A detailed list of the nearby networks will be printed out to the terminal. To identify | + | {{clio | iw dev wlan0 scan | hostname=ipac9x25}} |
− | : | + | {{clos}} |
+ | : A detailed list of the nearby networks will be printed out to the terminal. To identify the 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. | ||
+ | {{clo|indent=2}} | ||
+ | {{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep SSID|hostname=ipac9x25}} | ||
+ | :SSID: EMAC-A | ||
+ | {{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep signal|hostname=ipac9x25}} | ||
+ | :signal: -78.00dBm | ||
+ | {{clio||hostname=ipac9x25}} | ||
+ | {{clos}} | ||
<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. | + | :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. |
+ | <br/> | ||
+ | |||
3. For an open network, you'll just need to uncomment the lines in <code>/etc/wpa_supplicant.conf</code> <br /> | 3. For an open network, you'll just need to uncomment the lines in <code>/etc/wpa_supplicant.conf</code> <br /> | ||
− | < | + | <syntaxhighlight lang=bash> |
###open network | ###open network | ||
#network={ | #network={ | ||
Line 78: | Line 104: | ||
# key_mgmt=NONE | # key_mgmt=NONE | ||
#} | #} | ||
− | </ | + | </syntaxhighlight> |
− | {{warning | Instead of using the <code><nowiki><pre></nowiki></code> tag, you should use the <code><nowiki><syntaxhighlight></nowiki></code> 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. | + | <!-- {{warning | Instead of using the <code><nowiki><pre></nowiki></code> tag, you should use the <code><nowiki><syntaxhighlight></nowiki></code> 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. |
<br /> | <br /> | ||
− | 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. Networks protected by either WEP or WPA2 encryption will need a private shared key (psk) generated for the specific network and its password. To get the psk, use <code>wpa_passphrase</code> with the SSID and password for the desired network as arguments. | |
+ | {{clo|indent=2}} | ||
+ | {{clio|wpa_passphrase SSID Password|hostname=ipac9x25}} | ||
+ | network={ | ||
+ | :ssid="SSID" | ||
+ | :<nowiki>#psk</nowiki>="Password" | ||
+ | :psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7 | ||
+ | }<br /> | ||
+ | {{clio||hostname=ipac9x25}} | ||
+ | {{clos}} | ||
+ | <!-- {{warning | These should not be screenshots. You should copy and paste the text, and use the <code>cli</code> 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><nowiki><code></code></nowiki></code> tags.}} --> | ||
<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. | + | :<code>SSID</code> is the SSID of the preferred network found when scanning with <code>iw</code>. <code>Password</code> is the password to connect to the network. |
− | 5. | + | |
− | 6. | + | |
− | + | 5. The psk that <code>wpa_passphrase</code> creates is long and complicated so highlight and copy it. Remember the name of the SSID | |
+ | <br /> | ||
+ | |||
+ | 6. Use <code>vim</code> or another command line editor to write the SSID and paste the psk in the appropriate lines within <code>/etc/wpa_supplicant.conf</code><br /> | ||
+ | {{clo|indent=2}} | ||
+ | network={ | ||
+ | :ssid="SSID" | ||
+ | :proto=WPA | ||
+ | :key_mgmt=WPA-PSK | ||
+ | :psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7 | ||
+ | }<br/> | ||
+ | ~<br/> | ||
+ | ~<br/> | ||
+ | ~<br/> | ||
+ | ~<br/> | ||
+ | ~<br/> | ||
+ | -- '''INSERT''' -- | ||
+ | {{clos}} | ||
<br clear=all> | <br clear=all> | ||
− | + | 7. The path /etc/init.d/wpa_supplicant with the argument <code>start</code> will attempt to establish a connection with the network. | |
− | 7. | + | {{clo|indent=2}} |
− | + | {{clio | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} | |
− | : | + | {{clos}} |
+ | : As the command is running, watch the terminal output for the status of the connection. A connection has been established when output stops and the last line reads: | ||
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}} | {{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}} | ||
− | A connection has failed if the following is seen repeatedly | + | A connection has failed if output to the terminal continues and the following line is seen repeatedly: |
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}} | {{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}} | ||
<br /> | <br /> | ||
− | :'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> | + | :'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> |
− | :'''Failed connection''' (waiting more than a minute as output continues to print to the terminal). The | + | {{clo|indent=2}} |
− | : | + | {{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}} |
+ | Successfully initialized wpa_supplicant<br/> | ||
+ | rfkill: Cannot open RFKILL control device<br/> | ||
+ | {{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}} | ||
+ | wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/> | ||
+ | wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/> | ||
+ | wlan0: authenticated<br/> | ||
+ | wlan0: associating with AP with corrupt beacon<br/> | ||
+ | wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/> | ||
+ | wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/> | ||
+ | wlan0: associated<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready | ||
+ | {{clos}} | ||
+ | :'''Failed connection''' (waiting more than a minute as output continues to print to the terminal). The repeated lines indicate an issue establishing the connection. <br /> | ||
+ | {{clo|indent=2}} | ||
+ | {{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}} | ||
+ | Successfully initialized wpa_supplicant | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready | ||
+ | {{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> | ||
+ | cfg80211: Calling CRDA to update world regulatory domain<br/> | ||
+ | IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> | ||
+ | {{clos}} | ||
+ | ::A failed connection is likely the result of an improper password. Use <code>wpa_passphrase</code> to make sure you have the right psk for the password. | ||
− | {{warning | Again, none of these should be screenshots. Change them all to multiline output using the <code><nowiki>{{clo}} {{clos}} {{clio}} {{cli}} {{icli}}</nowiki></code> 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.}} | + | <!-- {{warning | Again, none of these should be screenshots. Change them all to multiline output using the <code><nowiki>{{clo}} {{clos}} {{clio}} {{cli}} {{icli}}</nowiki></code> 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.}} --> |
+ | <br clear=all> | ||
+ | 8. The <code>ifconfig</code> command will be used to determine that the device is wirelessly connected to the network. Look to see that <code>wlan0</code> has an IP address.<br /> | ||
+ | {{clo|indent=2}} | ||
+ | wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D | ||
+ | ::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/> | ||
+ | ::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/> | ||
+ | ::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/> | ||
+ | ::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/> | ||
+ | ::collisions:0 txqueuelen:1000<br/> | ||
+ | ::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/> | ||
+ | {{clos}} | ||
<br clear=all> | <br clear=all> | ||
− | + | ||
− | + | 9. Disconnect any physical connections from the system and ping to [http://www.emacinc.com www.emacinc.com] to verify that the system can wirelessly connect to the Internet. <br /> | |
− | 9. Disconnect any | + | {{clo|indent=2}} |
− | : | + | {{clio| ping -c www.emacinc.com | hostname=ipac9x25}} |
+ | PING www.emacinc.com (172.16.0.10): 56 data bytes <br/> | ||
+ | 64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/> | ||
+ | 64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/> | ||
+ | 64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/> | ||
+ | <br/> | ||
+ | --- www.emacinc.com ping statistics ---<br/> | ||
+ | 3 packets transmitted, 3 packets received, 0% packet loss<br/> | ||
+ | round-trip min/avg/max = 1.748/1.906/2.061 ms | ||
+ | {{clio||hostname=ipac9x25}} | ||
+ | {{clos}} | ||
<br clear=all> | <br clear=all> | ||
Line 120: | Line 232: | ||
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | {{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} | ||
− | This page walks through the procedure to connect a module to a wireless network via a | + | This page walks through the procedure to connect a module to a wireless network via a Wi-Fi adapter or built-in wireless, as well as acquiring the necessary software tools to make the connection for the first time. While there are plenty of USB wireless adapters available for sale, we used an adapter intended for use on Linux machines with a driver supported by the EMAC OE SDK. Other USB wireless adapters may be attempted to connect EMAC devices to wireless networks, but may face issues with driver support or other compatibility issues. We recommend using the USB adapter from [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin]. |
+ | |||
+ | After connecting to a network the first time, the system will be able to connect to the same network when rebooted or powered on. Connecting to a new network will require going through the procedures set out under the [[#Wireless Networking|Wireless Networking]] section. | ||
<br clear=all> | <br clear=all> | ||
− | {{warning | Strengthen the conclusion. Don't be afraid to make the conclusion long. Describe things the reader should do next. | + | <!-- {{warning | Strengthen the conclusion. Don't be afraid to make the conclusion long. Describe things the reader should do next. |
<br /> | <br /> | ||
You should have left in the comment blocks indicating the sections of the wiki text. Next time, leave them in. They allow us to quickly scroll through to find sections we need to review/edit, and make our lives much easier. | You should have left in the comment blocks indicating the sections of the wiki text. Next time, leave them in. They allow us to quickly scroll through to find sections we need to review/edit, and make our lives much easier. | ||
<br /> | <br /> | ||
− | Follow the changes I made (you can use "View History" to see the changes) and make the same type of changes through. Also follow what you learned from my reviews of your Getting Started document and make those same types of changes where appropriate. When you've addressed every issue, delete all of the warning blocks I've added and make the status as Review again.}} | + | Follow the changes I made (you can use "View History" to see the changes) and make the same type of changes through. Also follow what you learned from my reviews of your Getting Started document and make those same types of changes where appropriate. When you've addressed every issue, delete all of the warning blocks I've added and make the status as Review again.}} --> |
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --> | <!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --> |
Revision as of 14:32, 27 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 networks, 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.
General Information
Set Up
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.
-
This process requires modifying some system files so start by enabling read and write permissions to the filesystem.
root
@
ipac9x25
:
~
#
mount -o remount,rw /
-
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
-
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 theopkg manager
.root
@
ipac9x25
:
~
#
opkg install wpa-supplicant
-
If using the USB adapter, the appropriate 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
-
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
-
Independent of using built-in Wi-Fi or an adapter, the
iw
andwireless-tools
packages will complete the needed software to get a connection started.root
@
ipac9x25
:
~
#
opgk install iw
root
@
ipac9x25
:
~
#
opkg install wireless-tools
-
Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages.
root
@
ipac9x25
:
~
#
reboot
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 permissions.
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 the 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.
root
@
ipac9x25
:
~
#
iw dev wlan0 scan | grep SSID
- SSID: EMAC-A
root
@
ipac9x25
:
~
#
iw dev wlan0 scan | grep signal
- signal: -78.00dBm
root
@
ipac9x25
:
~
#
- 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
#}
4. Networks protected by either WEP or WPA2 encryption will need a private shared key (psk) generated for the specific network and its password. To get the psk, use wpa_passphrase
with the SSID and password for the desired network as arguments.
root
@
ipac9x25
:
~
#
wpa_passphrase SSID Password
network={
- ssid="SSID"
- #psk="Password"
- psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7
}
root
@
ipac9x25
:
~
#
SSID
is the SSID of the preferred network found when scanning withiw
.Password
is the password to connect to the network.
5. The psk that wpa_passphrase
creates is long and complicated so highlight and copy it. Remember the name of the SSID
6. Use vim
or another command line editor to write the SSID and paste the psk in the appropriate lines within /etc/wpa_supplicant.conf
network={
- ssid="SSID"
- proto=WPA
- key_mgmt=WPA-PSK
- psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7
}
~
~
~
~
~
-- INSERT --
7. The path /etc/init.d/wpa_supplicant with the argument start
will attempt to establish a connection with the network.
root
@
ipac9x25
:
~
#
/etc/init.d/wpa_supplicant start
- As the command is running, watch the terminal output for the status of the connection. A connection has been established when output stops and the last line reads:
A connection has failed if output to the terminal continues and the following line is seen repeatedly:
- Successful connection (waiting a full minute to ensure output to the terminal stopped);
root
@
ipac9x25
:
~
#
/etc/init.d/wpa-supplicant start
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
root
@
ipac9x25
:
~
#
wlan0: authenticate with 1c:7e:e5:40:10:fd
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)
wlan0: authenticated
wlan0: associating with AP with corrupt beacon
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)
wlan0: associated
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
- Failed connection (waiting more than a minute as output continues to print to the terminal). The repeated lines indicate an issue establishing the connection.
root
@
ipac9x25
:
~
#
/etc/init.d/wpa-supplicant start
Successfully initialized wpa_supplicant IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root
@
ipac9x25
:
~
#
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
- A failed connection is likely the result of an improper password. Use
wpa_passphrase
to make sure you have the right psk for the password.
- A failed connection is likely the result of an improper password. Use
8. The ifconfig
command will be used to determine that the device is wirelessly connected to the network. Look to see that wlan0
has an IP address.
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D
- inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0
- UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1
- RX packets:3395 errors:0 dropped:6 overruns:0 frame:0
- TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)
- inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0
9. Disconnect any physical connections from the system and ping to www.emacinc.com to verify that the system can wirelessly connect to the Internet.
root
@
ipac9x25
:
~
#
ping -c www.emacinc.com
PING www.emacinc.com (172.16.0.10): 56 data bytes
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms
--- www.emacinc.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 1.748/1.906/2.061 ms
root
@
ipac9x25
:
~
#
Conclusion
This page walks through the procedure to connect a module to a wireless network via a Wi-Fi adapter or built-in wireless, as well as acquiring the necessary software tools to make the connection for the first time. While there are plenty of USB wireless adapters available for sale, we used an adapter intended for use on Linux machines with a driver supported by the EMAC OE SDK. Other USB wireless adapters may be attempted to connect EMAC devices to wireless networks, but may face issues with driver support or other compatibility issues. We recommend using the USB adapter from ThinkPenguin.
After connecting to a network the first time, the system will be able to connect to the same network when rebooted or powered on. Connecting to a new network will require going through the procedures set out under the Wireless Networking section.