https://wiki.emacinc.com/api.php?action=feedcontributions&user=Jjung&feedformat=atomwiki.emacinc.com - User contributions [en]2024-03-28T21:56:52ZUser contributionsMediaWiki 1.31.6https://wiki.emacinc.com/index.php?title=OE_info_Script&diff=5246OE info Script2015-12-08T21:30:13Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (12.08.2015-12:26->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,MD,MG, Review }}<br />
{{#seo:<br />
|title=OE Info Script<br />
|titlemode=append<br />
|keywords=<br />
|description=Description of Procedures and Features of The Script<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span> --><br />
This page will explain the standard operations of the <code>/usr/bin/oe_info.sh</code> script, as well as its other capabilities. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
Provided in all EMAC systems is a executable <code>/usr/bin/oe_info.sh</code> that will display various amounts of information ranging from the version of the filesystem to presenting real-time memory utilization.<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
The default operation of the script is to provide information about the system. This includes:<br />
* Name of the device<br />
* Device serial number<br />
* Bootstrap<br />
* Bootloader Version<br />
* Kernel version<br />
* Filesystem version<br />
<br />
The output of the script will be saved to the text file <code>/etc/oe_info</code>, but only if the file system has been mounted with write permissions. To do this, simply run {{icli|mount -o remount,rw /}} before invoking the <code>oe_info</code> script. <br />
<br />
The contents of the <code>/etc/oe_info</code> file will be written in, line-by-line, to <code>/www/pages/oe_info.html</code>. This html document is part of the web server provided on all EMAC devices. To access the page, connect the device to a network and determine its IP address. Enter the IP address to a web browser on the same network and you'll be brought to the homepage of the web server. Go to the OE_INFO tab to view the content of <code>/etc/oe_info</code> within the web browser. If there was an error reading from <code>/etc/oe_info</code>, then the webpage will display an empty box.<br />
<br/><br />
Here is an example of what the default, no options passed, output of the script looks like:<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh | hostname=ipac9x25}}<br />
<br />
<nowiki>####################################################<br />
####################################################</nowiki><br/><br />
Gathering build information...<br/><br />
Product: ipac9x25<br />
Serial Number: R078000001<br/><br />
Bootstrap: AT91Bootstrap 3.5.3<br/><br />
Bootloader Part# U-Boot 2014.07emac-standard<br />
Bootloader Ver#: U-Boot 2014.07emac-standard<br/><br />
Kernel Part#: 3.10.0-emac-standard+c0218784c0<br />
Kernel Ver#: 3.10.0-emac-standard+c0218784c0<br/><br />
Filesystem Part#: Standard image<br />
Filesystem Ver#: 5.0.3<br />
<br />
<nowiki>####################################################<br />
####################################################</nowiki><br/><br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
Usage of the script is as follows:<br />
<pre><br />
/usr/bin/oe_info.sh [option]<br />
</pre><br />
Only one option will be evaluated and there are no parameters for these options. For example, running {{icli| /usr/bin/oe_info.sh -cn}} will only evaluate <code>c</code> as the option. Similarly, {{icli| /usr/bin/oe_info.sh -c 123}} will not account for <code>123</code> as a parameter and just execute with the <code>c</code> option. These options are explained in the following section.<br />
<br />
== Options ==<br />
The script allows for <code>-c, -f, -h, -m, -n, -v</code> as options and to be only identified by a single dash ('-'). An invalid option or improper amount of dashes will yield an error and display the proper usage with a list of valid options. When an option is given, the script will perform the desired task and then exit. The system information presented when no option given will not be shown and the <code>/www/pages/oe_info.html</code> will not be updated.<br />
<br />
=== -c, CPU Infomation ===<br />
This will display the number of CPU cores and threads, the chip architecture with the model name, real-time CPU utilization, and CPU clock speed. <br />
<br />
{{clop | indent=2}} <br />
{{cliop| /usr/bin/oe_info.sh -c | hostname=ipac9x25}}<br />
CPU info:<br />
<br /><br />
BogoMIPS : 198.76<br />
Architecture: ARM, Atmel AT91SAM (Device Tree)<br />
Number of CPUs: 1 core(s)<br />
CPU Utilization: 0.5%<br />
Clock speed: 400 MHz<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br /><br />
<br />
=== -f, Flash Information ===<br />
The <code>-f</code> option will show how much space is used and available on the filesystem and display a list of partitions on the system.<br />
<br />
{{clop|indent=2}}<br />
{{cliop| /usr/bin/oe_info.sh -f| hostname=ipac9x25}}<br />
Flash Info:<br />
<br/><br />
Filesystem Size Used Available Use% Mounted on<br />
/dev/root 922.7M 71.6M 787.4M 8% /<br />
devtmpfs 60.9M 4.0K 60.9M 0% /dev<br />
/dev/mmcblk0p2 2.5G 4.0M 2.3G 0% /home<br />
<br />
tmpfs 61.0M 172.0K 60.9K 0% /run<br />
tmpfs 61.0M 28.0K 61.0M 0% /var/volatile<br />
<br/><br />
Partitions:<br />
major minor #blocks name<br />
<nowiki> </nowiki>31 0 16384 mtdblock0<br />
179 0 3694592 mmcblk0<br />
179 1 976600 mmcklk0p1<br />
179 2 2717984 mmcblk0p2<br />
179 16 16384 mmcblk0boot1<br />
179 8 16384 mmcblk0boot0<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -m, Memory Information ===<br />
Show the total, used, and free memory of the system. <br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -m|hostname=ipac9x25}}<br />
Memory Info:<br />
<br/><br />
Total: 122M<br />
Used: 15M<br />
Free: 82M<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -n, Network Information ===<br />
For every site connected to a network, its IP address, netmask, gateway, hostname and MAC address will be displayed.<br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -n|hostname=ipac9x25}}<br />
Network Info:<br />
<br/><br />
Connection at eth0<br />
IP address: 10.03.146<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: 40:D8:55:19:DC:C4<br />
<br /><br />
Connection at wlan0<br />
IP address: 10.0.4.148<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: A8:54:B2:42:89:8D<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br />
=== -v, Invoke All Options ===<br />
The <code>-v</code> option will act as if repeatedly running the script with <code>c, f, m, n</code> options.<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -v|hostename=ipac9x25}}<br />
CPU info<br />
<br /><br />
BogoMIPS : 198.76<br />
Architecture: ARM, Atmel AT91SAM (Device Tree)<br />
Number of CPUs: 1 core(s)<br />
CPU Utilization: 0.4 %<br />
Clock speed: error reading cpuinfo and dmesg for clock speed<br /><br />
Flash Info:<br />
<br /><br />
Filesystem Size Used Available Use% Mounted on<br />
/dev/root 922.7M 71.6M 787.4M 8% /<br />
devtmpfs 60.9M 4.0K 60.9M 0% /dev<br />
/dev/mmcblk0p2 2.5G 4.0M 2.3G 0% /home<br />
tmpfs 61.0M 172.0K 60.9M 0% /run<br />
tmpfs 61.0M 28.0K 61.0M 0% /var/volatile<br />
<br /><br />
Partitions:<br />
major minor #blocks name<br /><br />
<nowiki> </nowiki>31 0 16384 mtdblock0<br />
179 0 3694592 mmcblk0<br />
179 1 976600 mmcblk0p1<br />
179 2 2717984 mmcblk0p2<br />
179 16 16384 mmcblk0boot1<br />
179 8 16384 mmcblk0boot0<br />
<br /><br />
Memory Info: <br />
<br /><br />
Total: 122M<br />
Used: 15M<br />
Free: 82M<br />
<br/><br />
Network Info:<br />
<br/>Connection at eth0<br />
IP address: 10.0.3.146<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: 40:D8:55:19:DC:C4<br />
<br /><br />
Connection at wlan0<br />
IP address: 10.0.4.148<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: A8:54:B2:42:89:8D<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -h, Help ===<br />
Display the usage of the script and list the options and their descriptions.<br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -h|hostname=ipac9x25}}<br />
USAGE:<br />
::oe_info.sh [option]<br />
OPTIONS:<br />
::-c show cpu info<br />
:: Display number of CPUs, BogoMIPS, chip arhitecture, CPU utilization, and CPU clock speed<br />
::-f flash info<br />
:: Shows how much space is used and available on the filesystem and provides a list of<br />
:: partitions found int /proc/partitions<br />
::-m show memory info<br />
:: Display space used and available in main memory<br />
::-n network info<br />
::-v invoke all options above<br />
::-h display usage and options list<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }} --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
This script is a very useful tool when wanting to know specific information quickly. Instead of looking within the print out of <code>ifconfig</code> to determine the IP address, <code>oe_info.sh</code> can present this information in an easier to read mannor<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* Not really sure what would be good to include here.<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* Not really sure what would be good to include here.</div>Jjunghttps://wiki.emacinc.com/index.php?title=OE_info_Script&diff=5245OE info Script2015-12-08T21:28:07Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (12.08.2015-12:26->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,MD,MG, InProgress }}<br />
{{#seo:<br />
|title=OE Info Script<br />
|titlemode=append<br />
|keywords=<br />
|description=Description of Procedures and Features of The Script<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span> --><br />
This page will explain the standard operations of the <code>/usr/bin/oe_info.sh</code> script, as well as its other capabilities. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
Provided in all EMAC systems is a executable <code>/usr/bin/oe_info.sh</code> that will display various amounts of information ranging from the version of the filesystem to presenting real-time memory utilization.<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
The default operation of the script is to provide information about the system. This includes:<br />
* Name of the device<br />
* Device serial number<br />
* Bootstrap<br />
* Bootloader Version<br />
* Kernel version<br />
* Filesystem version<br />
<br />
The output of the script will be saved to the text file <code>/etc/oe_info</code>, but only if the file system has been mounted with write permissions. To do this, simply run {{icli|mount -o remount,rw /}} before invoking the <code>oe_info</code> script. <br />
<br />
The contents of the <code>/etc/oe_info</code> file will be written in, line-by-line, to <code>/www/pages/oe_info.html</code>. This html document is part of the web server provided on all EMAC devices. To access the page, connect the device to a network and determine its IP address. Enter the IP address to a web browser on the same network and you'll be brought to the homepage of the web server. Go to the OE_INFO tab to view the content of <code>/etc/oe_info</code> within the web browser. If there was an error reading from <code>/etc/oe_info</code>, then the webpage will display an empty box.<br />
<br/><br />
Here is an example of what the default, no options passed, output of the script looks like:<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh | hostname=ipac9x25}}<br />
<br />
<nowiki>####################################################<br />
####################################################</nowiki><br/><br />
Gathering build information...<br/><br />
Product: ipac9x25<br />
Serial Number: R078000001<br/><br />
Bootstrap: AT91Bootstrap 3.5.3<br/><br />
Bootloader Part# U-Boot 2014.07emac-standard<br />
Bootloader Ver#: U-Boot 2014.07emac-standard<br/><br />
Kernel Part#: 3.10.0-emac-standard+c0218784c0<br />
Kernel Ver#: 3.10.0-emac-standard+c0218784c0<br/><br />
Filesystem Part#: Standard image<br />
Filesystem Ver#: 5.0.3<br />
<br />
<nowiki>####################################################<br />
####################################################</nowiki><br/><br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
Usage of the script is as follows:<br />
<pre><br />
/usr/bin/oe_info.sh [option]<br />
</pre><br />
Only one option will be evaluated and there are no parameters for these options. For example, running {{icli| /usr/bin/oe_info.sh -cn}} will only evaluate <code>c</code> as the option. Similarly, {{icli| /usr/bin/oe_info.sh -c 123}} will not account for <code>123</code> as a parameter and just execute with the <code>c</code> option. These options are explained in the following section.<br />
<br />
== Options ==<br />
The script allows for <code>-c, -f, -h, -m, -n, -v</code> as options and to be only identified by a single dash ('-'). An invalid option or improper amount of dashes will yield an error and display the proper usage with a list of valid options. When an option is given, the script will perform the desired task and then exit. The system information presented when no option given will not be shown and the <code>/www/pages/oe_info.html</code> will not be updated.<br />
<br />
=== -c, CPU Infomation ===<br />
This will display the number of CPU cores and threads, the chip architecture with the model name, real-time CPU utilization, and CPU clock speed. <br />
<br />
{{clop | indent=2}} <br />
{{cliop| /usr/bin/oe_info.sh -c | hostname=ipac9x25}}<br />
CPU info:<br />
<br /><br />
BogoMIPS : 198.76<br />
Architecture: ARM, Atmel AT91SAM (Device Tree)<br />
Number of CPUs: 1 core(s)<br />
CPU Utilization: 0.5%<br />
Clock speed: 400 MHz<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br /><br />
<br />
=== -f, Flash Information ===<br />
The <code>-f</code> option will show how much space is used and available on the filesystem and display a list of partitions on the system.<br />
<br />
{{clop|indent=2}}<br />
{{cliop| /usr/bin/oe_info.sh -f| hostname=ipac9x25}}<br />
Flash Info:<br />
<br/><br />
Filesystem Size Used Available Use% Mounted on<br />
/dev/root 922.7M 71.6M 787.4M 8% /<br />
devtmpfs 60.9M 4.0K 60.9M 0% /dev<br />
/dev/mmcblk0p2 2.5G 4.0M 2.3G 0% /home<br />
<br />
tmpfs 61.0M 172.0K 60.9K 0% /run<br />
tmpfs 61.0M 28.0K 61.0M 0% /var/volatile<br />
<br/><br />
Partitions:<br />
major minor #blocks name<br />
<nowiki> </nowiki>31 0 16384 mtdblock0<br />
179 0 3694592 mmcblk0<br />
179 1 976600 mmcklk0p1<br />
179 2 2717984 mmcblk0p2<br />
179 16 16384 mmcblk0boot1<br />
179 8 16384 mmcblk0boot0<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -m, Memory Information ===<br />
Show the total, used, and free memory of the system. <br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -m|hostname=ipac9x25}}<br />
Memory Info:<br />
<br/><br />
Total: 122M<br />
Used: 15M<br />
Free: 82M<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -n, Network Information ===<br />
For every site connected to a network, its IP address, netmask, gateway, hostname and MAC address will be displayed.<br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -n|hostname=ipac9x25}}<br />
Network Info:<br />
<br/><br />
Connection at eth0<br />
IP address: 10.03.146<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: 40:D8:55:19:DC:C4<br />
<br /><br />
Connection at wlan0<br />
IP address: 10.0.4.148<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: A8:54:B2:42:89:8D<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<br />
=== -v, Invoke All Options ===<br />
The <code>-v</code> option will act as if repeatedly running the script with <code>c, f, m, n</code> options.<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -v|hostename=ipac9x25}}<br />
CPU info<br />
<br /><br />
BogoMIPS : 198.76<br />
Architecture: ARM, Atmel AT91SAM (Device Tree)<br />
Number of CPUs: 1 core(s)<br />
CPU Utilization: 0.4 %<br />
Clock speed: error reading cpuinfo and dmesg for clock speed<br /><br />
Flash Info:<br />
<br /><br />
Filesystem Size Used Available Use% Mounted on<br />
/dev/root 922.7M 71.6M 787.4M 8% /<br />
devtmpfs 60.9M 4.0K 60.9M 0% /dev<br />
/dev/mmcblk0p2 2.5G 4.0M 2.3G 0% /home<br />
tmpfs 61.0M 172.0K 60.9M 0% /run<br />
tmpfs 61.0M 28.0K 61.0M 0% /var/volatile<br />
<br /><br />
Partitions:<br />
major minor #blocks name<br /><br />
<nowiki> </nowiki>31 0 16384 mtdblock0<br />
179 0 3694592 mmcblk0<br />
179 1 976600 mmcblk0p1<br />
179 2 2717984 mmcblk0p2<br />
179 16 16384 mmcblk0boot1<br />
179 8 16384 mmcblk0boot0<br />
<br /><br />
Memory Info: <br />
<br /><br />
Total: 122M<br />
Used: 15M<br />
Free: 82M<br />
<br/><br />
Network Info:<br />
<br/>Connection at eth0<br />
IP address: 10.0.3.146<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: 40:D8:55:19:DC:C4<br />
<br /><br />
Connection at wlan0<br />
IP address: 10.0.4.148<br />
Netmask: 255.255.0.0<br />
Gateway: 10.0.2.1<br />
Hostname: ipac9x25<br />
MAC address: A8:54:B2:42:89:8D<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
=== -h, Help ===<br />
Display the usage of the script and list the options and their descriptions.<br />
<br />
{{clop|indent=2}}<br />
{{cliop|/usr/bin/oe_info.sh -h|hostname=ipac9x25}}<br />
USAGE:<br />
::oe_info.sh [option]<br />
OPTIONS:<br />
::-c show cpu info<br />
:: Display number of CPUs, BogoMIPS, chip arhitecture, CPU utilization, and CPU clock speed<br />
::-f flash info<br />
:: Shows how much space is used and available on the filesystem and provides a list of<br />
:: partitions found int /proc/partitions<br />
::-m show memory info<br />
:: Display space used and available in main memory<br />
::-n network info<br />
::-v invoke all options above<br />
::-h display usage and options list<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }} --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
This script is a very useful tool when wanting to know specific information quickly. Instead of looking within the print out of <code>ifconfig</code> to determine the IP address, <code>oe_info.sh</code> can present this information in an easier to read mannor<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* Not really sure what would be good to include here.<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* Not really sure what would be good to include here.</div>Jjunghttps://wiki.emacinc.com/index.php?title=OE_info_Script&diff=5244OE info Script2015-12-08T18:29:19Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (12.08.2015-12:26->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,InProgress }}<br />
{{#seo:<br />
|title=OE Info Script<br />
|titlemode=append<br />
|keywords=<br />
|description=Description of Procedures and Features of The Script<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=OE_info_Script&diff=5243OE info Script2015-12-08T18:26:52Z<p>Jjung: Created page with "{{ subst:Pgtempl | initials={{subst::Templateimpl:getinitials}} | project=OE 5.0 | title=OE Info Script | desc=Description of Procedures and Features of The Script}}"</p>
<hr />
<div>{{todo| NotStarted (12.08.2015-12:26->JJ+)| Jjung | project=OE 5.0,JJ,NotStarted }}<br />
{{#seo:<br />
|title=OE Info Script<br />
|titlemode=append<br />
|keywords=<br />
|description=Description of Procedures and Features of The Script<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=OE Info Script | desc=Description of Procedures and Features of The Script | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Creating_a_New_EMAC_OE_SDK_Project_with_qmake_in_Qt_Creator&diff=5092Creating a New EMAC OE SDK Project with qmake in Qt Creator2015-11-12T20:53:58Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (11.10.2015-12:42->JJ+);(11.11.2015-16:05->JJ+);(11.12.2015-12:30->JJ+);(11.12.2015-14:30->MG+);(11.12.2015-14:50->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,Review }}<br />
{{#seo:<br />
|title=Creating the Project<br />
|titlemode=append<br />
|keywords=qmake, Qt Creator, Qt applications<br />
|description=Creating a New EMAC OE SDK Project with qmake in Qt Creator<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>--><br />
Alongside the EMAC OE 5.0 SDK, EMAC provides the Qt Creator IDE(Interactive Development Environment). A great feature of this IDE is its UI design tool that will allow developers to produce applications with a GUI for EMAC devices equipped with LCD displays. The UI is constructed by dragging and dropping objects to the application UI. Using slots and signals, developers can easily program a functional, interactive, and visually pleasing interface. These project requires Qt Creator's tool <code>qmake</code> to build these applications. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
The user interface (UI) designer tool in Qt Creator can be used to develop applications reliant on a UI. Written in C++, these applications built using the EMAC OE SDK and the <code>qmake</code> tool can be deployed to EMAC carriers equipped with touch screen displays. Developers will be able to create software that is much more interactive with the user. For more information about Qt Creator, go to the [http://wiki.qt.io/Qt_Creator_Guidance Qt Creator Guidance] page.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
This page will present a guide to create a basic application using Qt Creator. You'll not only write the source code, but also design a UI for the application. Once that is done, you'll compile the project and deploy it to run on a remote target machine. A "Hello World" project is used as an example to demonstrate how to use the UI designer and receive output form the IDE.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<cl>1. Launch the EMAC Qt Creator. <br /><br /><br />
[[File:EMAC_Qt_Creator_Icon.png]]<br />
<br /><br /><br />
<br />
* Click on "New Project".<br /><br /><br />
[[File:Qtcreator_gui.png|800px]]<br />
<br /><br /><br />
<br />
* A new window will pop up to specify the type of project you will be coding for. Select '''Application''' under the Projects column.<br />
<br />
* Select '''Qt Widgets Application'''. <br /> <br /><br />
[[File:SelectQtWidgetApplication.png|800px]]<br />
<br /><br /><br />
<br />
* Click '''Choose'''. You'll be brought to another page requesting you to give the project a name and choose the location of the project. <br ><br /> [[File:QtAppName_Location.png| 800px]]<br />
<br /><br /><br />
<br />
* Once you've given your project a name and have determined the path to store the project, click '''Next'''.<br />
<br />
* Select the kit required for the device(s) on which you wish to run the application. In this example, all kits are selected, but this project will be deployed to an OE 5.0 ARM device. Click '''Next'''. <br /> <br /><br />
[[File:QtKitSelection.png|800px]]<br />
<br /><br /><br />
<br />
* Give the class a name and leave the base class as '''QMainWindow'''. The header, source, and form files will have the same name as the class name, but different extensions. These files may be modified if desired. Click '''Next''' to continue to the project summary.<br /> <br />[[File:ClassInfo.png|800px]]<br />
<br /><br /><br />
<br />
* In the summary window, click '''Finish''' to be begin developing the project.<br />
</cl><br />
<br />
<br />
For this example application, Qt will open <code>helloworld.cpp</code> in the editor. This is where the functionality of the application is implemented. Within <code>main.cpp</code>, a new object of the class will be created and launched. Almost all of the C++ code will be written in the class definition. The class definition is also capable of creating an managing UI elements, such as a push button. This example is designed to provide a quick start and won't demonstrate management of UI elements. More information on management of UI elements can be found at http://doc.qt.io/qtcreator/creator-using-qt-designer.html. <br />
<br />
===Modify deployment configurations===<br />
Before developing the project, you will need to make some modifications to allow the project to be displayed and run on the desired device.<br />
<br />
<cl>1. Start by double clicking on <code>HelloWorld.pro</code>.<br />
<br />
* Add the lines "<code>target.path = /tmp</code>" and "<code>INSTALLS += target</code>" at the bottom of the file. This will set the location of the object file of the project to the "<code>/tmp</code>" directory. The full path to the project will be "<code>/tmp/HelloWorld</code>" on the target device. <br /><br /><br />
[[File:DotProPathConfig.png|800px]]<br />
<br /><br /><br />
<br />
* Use <code>'''Ctrl + S'''</code> to save the file.<br />
<br />
* The run configurations can be modified in the '''Project''' tab at the left of the window. At the top of the '''Project''' page, click on '''Run''' under the desired kit.<br />
<br />
* Click on '''Details''' for '''Upload files via SFTP''' and make sure the '''Incremental deployment''' box is unchecked. <br />
<br />
* The <code>'''-qws'''</code> argument is required under the '''Run''' configuration to run the application as a Qt server application. <br /> <br /><br />
[[File:QtProjectRunConfig.png|800px]]<br />
</cl><br />
<br />
===Create a Device Profile===<br />
A profile will need to be created for your device in order for Qt Creator to deploy the application to it. <br />
<br />
<cl>1. Under the '''Tools''' drop down box, select '''Options'''.<br />
<br />
* Select '''Devices''' from the scroll area to the left of the '''Options''' window. <br /><br /><br />
[[File:Options_devices.png|800px]]<br />
<br /><br /> <br />
<br />
* Look to the top right of the window and click '''Add'''.<br />
<br />
* You'll be brought to the '''Wizard Selection''' window to identify the type of device your target is. Select '''Generic Linux Device'''. <br /> <br /><br />
[[File:Generic_linux.png]]<br />
<br /><br /><br />
<br />
* Click '''Start Wizard''' and set up the configuration for the device profile. Give the profile a name, set the device's IP Address, enter the username, and specify the authentication type. Provide a password if the authentication type requires it.<br /><br /><br />
[[File:9G45NewDeviceConnection.png]]<br />
<br /><br /><br />
<br />
* Click '''Next''' when all the proper information of the device is provided. <br />
<br />
* At the summary window, click '''Finish''' and a connection be tween the target device and the developer's desktop will be tested. <br /><br /> [[File:Device_test.png]].<br />
<br /><br /><br />
<br />
* When the test has completed successfully, click '''Close'''.<br />
* Click '''Apply''' in the '''Options''' window to save the profile.<br />
* Click on the '''Build & Run''' section from the list box. Go to the '''Kits''' tab and click on the kit for the device. Under the '''Devices''' drop down menu, select the device profile that was just created. <br /><br /><br />
[[File:SelectDeviceToRun.png|800px]]<br />
<br /><br /><br />
<br />
* Save the device profile by clicking '''Apply'''. The profile has been completed and the options can be closed by clicking '''Ok''' at the bottom right of the window.<br />
</cl><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
===Coding Hello World and Designing the User Interface===<br />
Qt Creator is now able to deploy the project to the target device. The application definition needs to be completed.<br />
<br />
<cl>1. Double click the class <code>cpp</code> file in the '''Edit''' tab.<br />
<br />
* In the constructor, use the <code>qDebug()</code> function to print the string "<code>Hello World</code>". <br />
<br />
* In the destructor, use the <code>qDebug()</code> function to print the string "<code>Goodbye World</code>". <br />
Here's what your <code>helloworld.cpp</code> should look like:<br />
<syntaxhighlight lang="cpp-qt"><br />
#include "helloworld.h"<br />
#include "ui_helloworld.h"<br />
<br />
HelloWorld::HelloWorld(QWidget *parent) :<br />
QMainWindow(parent),<br />
ui(new Ui::HelloWorld)<br />
{<br />
ui->setupUi(this);<br />
qDebug("Hello World");<br />
}<br />
<br />
HelloWorld::~HelloWorld()<br />
{<br />
qDebug("Goodbye World");<br />
delete ui;<br />
}<br />
</syntaxhighlight><br />
<br />
* Double click <code>helloworld.ui</code> under the '''Forms''' folder in the '''Edit''' tabe to the left of the screen. This displays an interface that will allow objects to be dragged on to the UI of the application. <br /><br /><br />
[[File:QtUIDesign.png|800px]]<br />
<br /><br /><br />
<br />
* Drag and drop a label to the UI.<br />
<br />
* Double click on the label to change the text to "<code>Hello World</code>". You may need to resize the label so the text can be seen. <br /><br /> [[File:HelloUI.png|800px]]<br />
</cl><br />
<br />
===Building and Running the Project===<br />
<cl>1. Click on the icon of a monitor at the bottom left of the window. <br />
<br />
* Select the proper kit for your device, '''Build->Debug''', and the project name under '''Run'''. <br /><br /><br />
[[File:BuildDebugRun.png| 800px]]<br />
<br /><br /><br />
<br />
* Build the project by clicking the hammer icon at the bottom left of the window. A little window will momentarily pop up at the bottom right of the screen. The project has been successfully built if the green progress bar is full and now error messages have appeared. <br />
<br />
* Once the project has successfully built, the project may be run. Click the green triangle icon at the bottom left of the window, below the monitor icon. <br /><br /><br />
[[File:HelloWorldRun.png| 800px]]<br />
<br /><br /><br />
</cl><br />
<br />
The Application Output terminal will pop up and display any error messages, the termination message, and any string output by <code>qDebug()</code>.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
Although very similar to [[Getting_Started_With_Qt_Creator | Getting Started with Qt Creator]], this guide differs by introducing the reader to the process of developing a Qt application with a graphical user interface using Qt's qmake build system. Developing a new application generally follows these steps: create a new project, configure a new device profile if needed, modify the build and run conditions to allow deployment on the remote device, drag and drop the visual elements to the GUI using the UI designer, write the code needed to respond to interactions with the UI, build the application, and run the application upon a successful build.<br />
<br />
More information about running Qt applications on EMAC systems (Open Embedded Linux modules) can be found at http://doc.qt.io/qt-4.8/qt-embedded-running.html. While the UI designer is a great way to visually plan out how the GUI will turn out, the entire application may be coded within the project C++ class file, including the UI elements. Qt provides a couple of example applications with a GUI for Linux Embedded systems coded in such a way. These example can be viewed at http://doc.qt.io/qt-4.8/examples-embeddedlinux.html. A larger set of Qt example applications can be found at http://doc.qt.io/qt-4.8/all-examples.html; not all of these examples will work for Embedded Linux or the EMAC OE SDK. Qt pre-compiled examples and source code can also be found on EMAC systems with Qt in <code>/usr/bin/qtopia</code> and in the EMAC OE SDK in <code>/opt/emac/5.0/sysroots/target_arch/usr/bin/qtopia </code>. These examples are applicable to Qt version 4.8 which is the newest version supported by EMAC OE 5.0. <br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* [[Getting_Started_With_Qt_Creator | Getting Started With Qt Creator]]<br />
* [[Getting_Started_with_the_EMAC_OE_SDK| Getting Started with the EMAC OE SDK]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Creating_a_New_EMAC_OE_SDK_Project_with_qmake_in_Qt_Creator&diff=5079Creating a New EMAC OE SDK Project with qmake in Qt Creator2015-11-12T18:53:38Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (11.10.2015-12:42->JJ+);(11.11.2015-16:05->JJ+);(11.12.2015-12:30->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,Review }}<br />
{{#seo:<br />
|title=Creating the Project<br />
|titlemode=append<br />
|keywords=qmake, Qt Creator, Qt applications<br />
|description=Creating a New EMAC OE SDK Project with qmake in Qt Creator<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>--><br />
Alongside the EMAC OE 5.0 SDK, EMAC provides the Qt Creator IDE(Interactive Development Environment). A great feature of this IDE is its UI design tool that will allow developers to produce applications with a GUI for EMAC devices equipped with LCD displays. The UI is constructed by dragging and dropping objects to the application UI. Using slots and signals, developers can easily program a functional, interactive, and visually pleasing interface. These project requires Qt Creator's tool <code>qmake</code> to build these applications. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
The user interface (UI) designer tool in Qt Creator can be used to develop applications reliant on a UI. Written in C++, these applications built using the EMAC OE SDK and the <code>qmake</code> tool can be deployed to EMAC carriers equipped with touch screen displays. Developers will be able to create software that is much more interactive with the user. For more information about Qt Creator, go to http://wiki.qt.io/Main_Page.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
This page will present a guide to create a basic application using Qt Creator. You'll not only write the source code, but also design a UI for the application. Once that is done, you'll compile the project and deploy it to run on a remote target machine. A "Hello World" project is used as an example to demonstrate how to use the UI designer and receive output form the IDE.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<cl>1. Launch the EMAC Qt Creator.<br />[[File:EMAC_Qt_Creator_Icon.png]]<br />
<br />
* Click on "New Project".<br />[[File:Qtcreator_gui.png|800px]]<br />
<br />
* A new window will pop up to specify the type of project you will be coding for. Select '''Application''' under the Projects column.<br />
<br />
* Select '''Qt Widgets Application'''. <br /> [[File:SelectQtWidgetApplication.png|800px]]<br />
<br />
* Click '''Choose'''. You'll be brought to another page requesting you to give the project a name and choose the location of the project. <br > [[File:QtAppName_Location.png| 800px]]<br />
<br />
* Once you've given your project a name and have determined the path to store the project, click '''Next'''.<br />
<br />
* Select the kit required for the device(s) on which you wish to run the application. In this example, all kits are selected, but this project will be deployed to an OE 5.0 ARM device. Click '''Next'''. <br /> [[File:QtKitSelection.png|800px]]<br />
<br />
* Give the class a name and leave the base class as '''QMainWindow'''. The header, source, and form files will have the same name as the class name, but different extensions. These files may be modified if desired. Click '''Next''' to continue to the project summary.<br /> [[File:ClassInfo.png|800px]]<br />
<br />
* In the summary window, click '''Finish''' to be begin developing the project.<br />
</cl><br />
<br />
<br />
For this example application, Qt will open <code>helloworld.cpp</code> in the editor. This is where the functionality of the application is implemented. Within <code>main.cpp</code>, a new object of the class will be created and launched. Almost all of the C++ code will be written in the class definition. The class definition is also capable of creating an managing UI elements, such as a push button. This example is designed to provide a quick start and won't demonstrate management of UI elements. More information on management of UI elements can be found at http://doc.qt.io/qtcreator/creator-using-qt-designer.html. <br />
<br />
===Modify deployment configurations===<br />
Before developing the project, you will need to make some modifications to allow the project to be displayed and run on the desired device.<br />
<br />
<cl>1. Start by double clicking on <code>HelloWorld.pro</code>.<br />
<br />
* Add the lines "<code>target.path = /tmp</code>" and "<code>INSTALLS += target</code>" at the bottom of the file. This will set the location of the object file of the project to the "<code>/tmp</code>" directory. The full path to the project will be "<code>/tmp/HelloWorld</code>". <br />[[File:DotProPathConfig.png|800px]]<br />
<br />
* Use <code>'''Ctrl + S'''</code> to save the file.<br />
<br />
* The run configurations can be modified in the '''Project''' tab at the left of the window. At the top of the '''Project''' page, click on '''Run''' under the desired kit.<br />
<br />
* Click on '''Details''' for '''Upload files via SFTP''' and make sure the '''Incremental deployment''' box is unchecked. <br />
<br />
* Since the applicaton will have a GUI and be run on an Embedded Linux system, the argument <code>'''-qws'''</code> is required under the '''Run''' configuration. <br /> [[File:QtProjectRunConfig.png|800px]]<br />
</cl><br />
<br />
===Create a Device Profile===<br />
A profile will need to be created for your device in order for Qt Creator to deploy the application to it. <br />
<br />
<cl>1. Under the '''Tools''' drop down box, select '''Options'''.<br />
<br />
* Select '''Devices''' from the scroll area to the left of the '''Options''' window. <br /> [[File:Options_devices.png|800px]]<br />
<br />
* Look to the top right of the window and click '''Add'''.<br />
<br />
* You'll be brought to the '''Wizard Selection''' window to identify the type of device your target is. Select '''Generic Linux Device'''. <br /> [[File:Generic_linux.png]]<br />
<br />
* Click '''Start Wizard''' and set up the configuration for the device profile. Give the profile a name, set the device's IP Address, enter the username, and specify the authentication type. Provide a password if the authentication type requires it.<br /> [[File:9G45NewDeviceConnection.png]]<br />
<br />
* Click '''Next''' when all the proper information of the device is provided. <br />
<br />
* At the summary window, click '''Finish''' and a connection be tween the target device and the developer's desktop will be tested. <br /> [[File:Device_test.png]].<br />
<br />
* When the test has completed successfully, click '''Close'''. <br /><br />
<br />
* Click '''Apply''' in the '''Options''' window to save the profile.<br />
<br />
* Click on the '''Build & Run''' section from the list box. Go to the '''Kits''' tab and click on the kit for the device. Under the '''Devices''' drop down menu, select the device profile that was just created. <br /> [[File:SelectDeviceToRun.png|800px]]<br />
<br />
* Save the device profile by clicking '''Apply'''. The profile has been completed and the options can be closed by clicking '''Ok''' at the bottom right of the window.<br />
<br />
</cl><br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
===Coding Hello World and Designing the User Interface===<br />
Qt Creator is now able to deploy the project to the target device. The application definition needs to be completed.<br />
<br />
<cl>1. Double click the class <code>cpp</code> file in the '''Edit''' tab.<br />
<br />
* In the constructor, use the <code>qDebug()</code> function to print the string "<code>Hello World</code>". <br />
<br />
* In the destructor, use the <code>qDebug()</code> function to print the string "<code>Goodbye World</code>". <br /> [[File:HelloGoodbye.png|800px]]<br />
<br />
* Double click <code>helloworld.ui</code> under the '''Forms''' folder in the '''Edit''' tabe to the left of the screen. This displays an interface that will allow objects to be dragged on to the UI of the application. <br /> [[File:QtUIDesign.png|800px]]<br />
<br />
* Drag and drop a label to the UI.<br />
<br />
* Double click on the label to change the text to "<code>Hello World</code>". You may need to resize the label so the text can be seen. <br /> [[File:HelloUI.png|800px]]<br />
</cl><br />
<br />
===Building and Running the Project===<br />
<cl>1. Click on the icon of a monitor at the bottom left of the window. <br />
<br />
* Select the proper kit for your device, '''Build->Debug''', and the project name under '''Run'''. <br /> [[File:BuildDebugRun.png| 800px]]<br />
<br />
* Build the project by clicking the hammer icon at the bottom left of the window. A little window will momentarily pop up at the bottom right of the screen. The project has been successfully built if the green progress bar is full and now error messages have appeared. <br />
<br />
* Once the project has successfully built, the project may be run. Click the green triangle icon at the bottom left of the window, below the monitor icon. <br /> [[File:HelloWorldRun.png| 800px]]<br />
</cl><br />
<br />
The Application Output terminal will pop up and display any error messages, the termination message, and any string output by <code>qDebug()</code>.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
Although very similar to [[Getting_Started_With_Qt_Creator | Getting Started with Qt Creator]], this guide differes by introducing the reader to the process of developing a Qt application with a graphical user interface. Developing a new application generally follows these steps: create a new project, configure a new device profile if needed, modify the build and run conditions to allow deployment on the remote device, drag and drop the visual elements to the GUI using the UI designer, write the code needed to respond to interactions with the UI, build the application, and run the application upon a successful build.<br />
<br />
More information about running Qt applications on EMAC systems (Open Embedded Linux modules) can be found at http://doc.qt.io/qt-4.8/qt-embedded-running.html. While the UI designer is a great way to visually plan out how the GUI will turn out, the entire application may be coded within the project C++ class file, including the UI elements. Qt provides a couple of example applications with a GUI for Linux Embedded systems coded in such a way. These example can be viewed at http://doc.qt.io/qt-4.8/examples-embeddedlinux.html. A larger set of Qt example applicaitons can be found at http://doc.qt.io/qt-4.8/all-examples.html; not all of these examples will work for Embedded Linux or the EMAC OE SDK. Furthermore, these examples are form Qt version 4.8 which is the newest version supported by OE 5.0. <br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* [[Getting_Started_With_Qt_Creator | Getting Started With Qt Creator]]<br />
* [[Getting_Started_with_the_EMAC_OE_SDK| Getting Started with the EMAC OE SDK]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Creating_a_New_EMAC_OE_SDK_Project_with_qmake_in_Qt_Creator&diff=5072Creating a New EMAC OE SDK Project with qmake in Qt Creator2015-11-11T22:06:31Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (11.10.2015-12:42->JJ+);(11.11.2015-16:05->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,InProgress }}<br />
{{#seo:<br />
|title=Creating the Project<br />
|titlemode=append<br />
|keywords=qmake, Qt Creator<br />
|description=Creating a New EMAC OE SDK Project with qmake in Qt Creator<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>--><br />
Alongside the EMAC OE 5.0 SDK, EMAC provides the Qt Creator IDE(Interactive Development Environment). A great feature of this IDE is its UI design tool that will allow developers to produce applications with a GUI for EMAC devices equipped with LCD displays. The UI is constructed by dragging and dropping objects to the application UI. Using slots and signals, developers can easily program a functional, interactive, and visually pleasing interface. These project requires Qt Creator's tool <code>qmake</code> to build these applications. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
The user interface (UI) designer tool in Qt Creator can be used to develop applications reliant on a UI. Written in C++, these applications built using the EMAC OE SDK and the <code>qmake</code> tool can be deployed to EMAC carriers equipped with touch screen displays. Developers will be able to create software that is much more interactive with the user. For more information about Qt Creator, go to http://wiki.qt.io/Main_Page.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
This page will present a guide to create a basic application using Qt Creator. You'll not only write the source code, but also design a UI for the application. Once that is done, you'll compile the project and deploy it to run on a remote target machine. A "Hello World" project is used as an example to demonstrate how to use the UI designer and receive output form the IDE.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<cl>1. Launch the EMAC Qt Creator.<br />[[File:EMAC_Qt_Creator_Icon.png]]<br />
<br />
* Click on "New Project".<br />[[File:Qtcreator_gui.png|800px]]<br />
<br />
* A new window will pop up to specify the type of project you will be coding for. Select '''Application''' under the Projects column.<br />
<br />
* Select '''Qt Widgets Application'''. <br /> [[File:SelectQtWidgetApplication.png|800px]]<br />
<br />
* Click '''Choose'''. You'll be brought to another page requesting you to give the project a name and choose the location of the project. <br > [[File:QtAppName_Location.png| 800px]]<br />
<br />
* Once you've given your project a name and have determined the path to store the project, click '''Next'''.<br />
<br />
* Select the kit required for the device(s) on which you wish to run the application. In this example, all kits are selected, but this project will be deployed to an OE 5.0 ARM device. Click '''Next'''. <br /> [[File:QtKitSelection.png|800px]]<br />
<br />
* Give the class a name and leave the base class as '''QMainWindow'''. The header, source, and form files will have the same name as the class name, but different extensions. These files may be modified if desired. Click '''Next''' to continue to the project summary.<br /> [[File:ClassInfo.png|800px]]<br />
<br />
* In the summary window, click '''Finish''' to be begin developing the project.<br />
</cl><br />
<br />
<br />
For this example application, Qt will open <code>helloworld.cpp</code> in the editor. This is where the functionality of the application is implemented. Within <code>main.cpp</code>, a new object of the class will be created and launched. Almost all of the C++ code will be written in the class definition. The class definition is also capable of creating an managing UI elements, such as a push button. This example is designed to provide a quick start and won't demonstrate management of UI elements. More information on management of UI elements can be found at http://doc.qt.io/qtcreator/creator-using-qt-designer.html. <br /> [screenshot?]<br />
<br />
===Modify deployment configurations===<br />
Before developing the project, you will need to make some modifications to allow the project to be displayed and run on the desired device.<br />
<br />
<cl>1. Start by double clicking on <code>HelloWorld.pro</code>.<br />
<br />
* Add the lines "<code>target.path = /tmp</code>" and "<code>INSTALLS += target</code>" at the bottom of the file. This will set the location of the object file of the project to the "<code>/tmp</code>" directory. The full path to the project will be "<code>/tmp/HelloWorld</code>". <br />[[File:DotProPathConfig.png|800px]]<br />
<br />
* Use <code>'''Ctrl + S'''</code> to save the file.<br />
<br />
* The run configurations can be modified in the '''Project''' tab at the left of the window. At the top of the '''Project''' page, click on '''Run''' under the desired kit. <br /> [screenshot?]<br />
<br />
* Click on '''Details''' for '''Upload files via SFTP''' and make sure the '''Incremental deployment''' box is unchecked. <br />
<br />
* Since the applicaton will have a GUI and be run on an Embedded Linux system, the argument <code>'''-qws'''</code> is required under the '''Run''' configuration. <br /> [[File:QtProjectRunConfig.png|800px]]<br />
</cl><br />
<br />
===Create a Device Profile===<br />
A profile will need to be created for your device in order for Qt Creator to deploy the application to it. <br />
<br />
<cl>1. Under the '''Tools''' drop down box, select '''Options'''.<br />
<br />
* Select '''Devices''' from the scroll area to the left of the '''Options''' window. <br /> [[File:Options_devices.png|800px]]<br />
<br />
* Look to the top right of the window and click '''Add'''.<br />
<br />
* You'll be brought to the '''Wizard Selection''' window to identify the type of device your target is. Select '''Generic Linux Device'''. <br /> [[File:Generic_linux.png]]<br />
<br />
* Click '''Start Wizard''' and set up the configuration for the device profile. Give the profile a name, set the device's IP Address, enter the username, and specify the authentication type. Provide a password if the authentication type requires it.<br /> [[File:9G45NewDeviceConnection.png]]<br />
<br />
* Click '''Next''' when all the proper information of the device is provided. <br />
<br />
* At the summary window, click '''Finish''' and a connection be tween the target device and the developer's desktop will be tested. <br /> [[File:Device_test.png]].<br />
<br />
* When the test has completed successfully, click '''Close'''. <br /><br />
<br />
* Click '''Apply''' in the '''Options''' window to save the profile.<br />
<br />
* Click on the '''Build & Run''' section from the list box. Go to the '''Kits''' tab and click on the kit for the device. Under the '''Devices''' drop down menu, select the device profile that was just created. <br /> [[File:SelectDeviceToRun.png|800px]]<br />
<br />
* Save the device profile by clicking '''Apply'''. The profile has been completed and the options can be closed by clicking '''Ok''' at the bottom right of the window.<br />
<br />
</cl><br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
===Coding Hello World and Building the User Interface===<br />
Qt Creator is now able to deploy the project to the target device. The application definition needs to be completed.<br />
<br />
<cl>1. Double click the class <code>cpp</code> file in the '''Edit''' tab.<br />
<br />
* In the constructor, use the <code>qDebug()</code> function to print the string "<code>Hello World</code>". <br />
<br />
* In the destructor, use the <code>qDebug()</code> function to print the string "<code>Goodbye World</code>". <br /> [[File:HelloGoodbye.png|800px]]<br />
<br />
* Double click <code>helloworld.ui</code> under the '''Forms''' folder in the '''Edit''' tabe to the left of the screen. This displays an interface that will allow objects to be dragged on to the UI of the application. <br /> [[File:QtUIDesign.png|800px]]<br />
<br />
* Drag and drop a label to the UI.<br />
<br />
* Double click on the label to change the text to "<code>Hello World</code>". You may need to resize the label so the text can be seen. <br /> [[File:HelloUI.png|800px]]<br />
</cl><br />
<br />
===Building and Running the Project===<br />
<cl>1. Click on the icon of a monitor at the bottom left of the window. <br />
<br />
* Select the proper kit for your device, '''Build->Debug''', and the project name under '''Run'''. <br /> [[File:BuildDebugRun.png| 800px]]<br />
<br />
* Build the project by clicking the hammer icon at the bottom left of the window. <br /> [screenshot?]<br />
:A little window will momentarily pop up at the bottom right of the screen. The project has been successfully built if the green progress bar is full and now error messages have appeared. <br />
<br />
* Once the project has successfully built, the project may be run. Click the green triangle icon at the bottom left of the window, below the monitor icon. <br /> [[File:HelloWorldRun.png| 800px]]<br />
</cl><br />
<br />
The Application Output terminal will pop up and display any error messages, the termination message, and any string output by <code>qDebug()</code>.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
Although very similar to [[Getting_Started_With_Qt_Creator | Getting Started with Qt Creator]], this guide differes by introducing the reader to the process of developing a Qt application with a graphical user interface. Developing a new application generally follows these steps: create a new project, configure a new device profile if needed, modify the build and run conditions to allow deployment on the remote device, drag and drop the visual elements to the GUI using the UI designer, write the code needed to respond to interactions with the UI, build the application, and run the application upon a successful build.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* [[Getting_Started_With_Qt_Creator | Getting Started With Qt Creator]]<br />
* [[Getting_Started_with_the_EMAC_OE_SDK| Getting Started with the EMAC OE SDK]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=File:HelloWorldRun.png&diff=5071File:HelloWorldRun.png2015-11-11T21:44:36Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:BuildDebugRun.png&diff=5070File:BuildDebugRun.png2015-11-11T21:41:40Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:HelloUI.png&diff=5069File:HelloUI.png2015-11-11T21:40:12Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:QtUIDesign.png&diff=5068File:QtUIDesign.png2015-11-11T21:38:24Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:HelloGoodbye.png&diff=5067File:HelloGoodbye.png2015-11-11T21:35:38Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:SelectDeviceToRun.png&diff=5064File:SelectDeviceToRun.png2015-11-11T21:31:17Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:9G45NewDeviceConnection.png&diff=5063File:9G45NewDeviceConnection.png2015-11-11T21:25:39Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:QtProjectRunConfig.png&diff=5062File:QtProjectRunConfig.png2015-11-11T21:18:46Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:DotProPathConfig.png&diff=5061File:DotProPathConfig.png2015-11-11T21:14:49Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:ClassInfo.png&diff=5060File:ClassInfo.png2015-11-11T21:03:37Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:QtKitSelection.png&diff=5059File:QtKitSelection.png2015-11-11T20:58:50Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:QtAppName_Location.png&diff=5058File:QtAppName Location.png2015-11-11T20:57:07Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:SelectQtWidgetApplication.png&diff=5057File:SelectQtWidgetApplication.png2015-11-11T20:54:33Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=Creating_a_New_EMAC_OE_SDK_Project_with_qmake_in_Qt_Creator&diff=5049Creating a New EMAC OE SDK Project with qmake in Qt Creator2015-11-10T21:32:01Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (11.10.2015-12:42->JJ+)|Jeffrey Jung| project=OE 5.0,JJ,InProgress }}<br />
{{#seo:<br />
|title=Creating the Project<br />
|titlemode=append<br />
|keywords=qmake, Qt Creator<br />
|description=Creating a New EMAC OE SDK Project with qmake in Qt Creator<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!--<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>--><br />
Alongside the EMAC OE 5.0 SDK, EMAC provides the Qt Creator IDE(Interactive Development Environment). A great feature of this IDE is its UI design tool that will allow developers to produce applications with a GUI for EMAC devices equipped with LCD displays. The UI is gnerated by draggin and dropping objects to the application UI. Using slots and signals, developers can easily program a functional, interactive, and visually pleasing interface. These project requires Qt Creator's tool <code>qmake</code> to build these applications. <br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
The user interface (UI) designer tool in Qt Creator can be used to develop applications reliant on a UI. Written in C++, these applications built using the EMAC OE SDK can be deployed to EMAC carriers equipped with touch screen displays. Developers will be able to create software that is much more interactive with the user. For more information about Qt Creator, go to http://wiki.qt.io/Main_Page.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
This page will present a guide to create a basic application using Qt Creator. You'll not only write the source code, but also design a UI for the application. Once that is done, you'll compile the project and deploy it to run on a remote target machine. A "Hello World" project is used as an example to demonstrate how to use the UI designer and receive output form the IDE.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<cl>1. Launch the EMAC Qt Creator.<br />[screenshot]<br />
<br />
* Click on "New Project".<br />[screenshot]<br />
<br />
* A new window will pop up to specify the type of project you will be coding for. Select '''Application''' under the Projects column.<br />
<br />
* Select '''Qt Widgets Application'''. <br /> [screenshot]<br />
<br />
* Click '''Choose'''. You'll be brought to another page requesting you to give the project a name and choose the location of the project. <br > [screenshot]<br />
<br />
* Once you've given your project a name and have determined the path to store the project, click '''Next'''.<br />
<br />
* Select the kit required for the device(s) on which you wish to run the application. In this example, all kits are selected, bu the project is targeted for an OE 5.0 ARM device. Click '''Next'''. <br /> [screenshot]<br />
<br />
* Give the class a name and leave the base class as '''QMainWindow'''. The header, source, and form files will have the same name as the class name, but different extensions. These files may be modified if desired. Click '''Next''' to continue to the project summary.<br /> [screenshot]<br />
<br />
* In the summary window, click '''Finish''' to be begin developing the project.<br />
</cl><br />
<br />
<br />
For this example application, Qt will open <code>helloworld.cpp</code> in the editor. This is where the functionality of the application is implemented. Within <code>main.cpp</code>, a new object of the class will be created and launched. Almost all of the C++ code will be written in the class definition. The class definition is also capable of creating an managing UI elements, such as a push button. This example is designed to provide a quick start and won't demonstrate management of UI elements. More information on management of UI elements can be found at http://doc.qt.io/qtcreator/creator-using-qt-designer.html. <br /> [screenshot]<br />
<br />
===Modify deployment configurations===<br />
Before developing the project, you will need to make some modifications to allow th eproject to be displayed and run on the desired device.<br />
<br />
<cl>1. Start by double clicking on <code>HelloWorld.pro</code>.<br />
<br />
* Add the lines "<code>target.path = /tmp</code>" and "<code>INSTALLS += target</code>" at the bottom of the file. This will set the location of the object file of the project to the "<code>/tmp</code>" directory. The full path to the project will be "<code>/tmp/HelloWorld</code>". <br />[screenshot]<br />
<br />
* Use <code>'''Ctrl + S'''</code> to save the file.<br />
<br />
* The run configurations can be modified in the '''Project''' tab at the left of the window. At the top of the '''Project''' page, click on '''Run''' under the desired kit. <br /> [screenshot]<br />
<br />
* Click on '''Details''' for '''Upload files via SFTP''' and make sure the '''Incremental deployment''' box is unchecked. <br />
<br />
* Since the applicaton will have a GUI and be run on an Embedded Linux system, the argument <code>'''-qws'''</code> is required under the '''Run''' configuration. <br /> [screenshot]<br />
</cl><br />
<br />
===Create a Device Profile===<br />
A profile will need to be created for your device in order for Qt Creator to deploy the application to it. <br />
<br />
<cl>1. Under the '''Tools''' drop down box, select '''Options'''.<br />
<br />
* Select '''Devices''' from the scroll area to the left of the '''Options''' window. <br /> [screenshot]<br />
<br />
* Look to the top right of the window and click '''Add'''.<br />
<br />
* You'll be brought to the '''Wizard Selection''' window to identify the type of device your target is. Select '''Generic Linux Device'''. <br /> [screenshot]<br />
<br />
* Click '''Start Wizard''' and set up the configuration for the device profile. Give the profile a name, set the device's IP Address, enter the username, and specify the authentication type. Provide a password if the authentication type requires it.<br /> [screenshot]<br />
<br />
* Click '''Next''' when all the proper information of the device is provided. <br />
<br />
* At the summary window, click '''Finish''' and a connection be tween the target device and the developer's desktop will be tested. <br /> [screenshot].<br />
<br />
* When the test has completed successfully, click '''Close'''. <br /><br />
<br />
* Click '''Apply''' in the '''Options''' window to save the profile.<br />
<br />
* Click on the '''Build & Run''' section from the list box. Go to the '''Kits''' tab and click on the kit for the device. Under the '''Devices''' drop down menu, select the device profile that was just created. <br /> [screenshot]<br />
<br />
* Save the device profile by clicking '''Apply'''. The profile has been completed and the options can be closed by clicking '''Ok''' at the bottom right of the window.<br />
<br />
</cl><br />
<br />
===Coding Hello World===<br />
Qt Creator is now able to deploy the project to the target device. The application definition needs to be completed.<br />
<br />
<cl>1. Double click the class <code>cpp</code> file in the '''Edit''' tab.<br />
<br />
* In the constructor, use the <code>qDebug()</code> function to print the string "<code>Hello World</code>". <br />
<br />
* In the destructor, use the <code>qDebug()</code> function to print the string "<code>Goodbye World</code>". <br /> [screenshot]<br />
<br />
* Double click <code>helloworld.ui</code> under the '''Forms''' folder in the '''Edit''' tabe to the left of the screen. This displays an interface that will allow objects to be dragged on to the UI of the application. <br /> [screenshot]<br />
<br />
* Drag and drop a label to the UI.<br />
<br />
* Double click on the label to change the text to "<code>Hello World</code>". You may need to resize the label so the text can be seen. <br /> [screenshot]<br />
</cl><br />
<br />
===Building and Running the Project===<br />
<cl>1. Click on the icon of a monitor at the bottom left of the window. <br />
<br />
* Select the proper kit for your device, '''Build->Debug''', and the project name under '''Run'''. <br /> [screenshot]<br />
<br />
* Build the project by clicking the hammer icon at the bottom left of the window.<br />
:A little window will momentarily pop up at the bottom right of the screen. The project has been successfully built if the green progress bar is full and now error messages have appeared. <br /> [screenshot]<br />
<br />
* Once the project has successfully built, the project may be run. Click the green triangle icon at the bottom left of the window, below the monitor icon. <br /> [screenshot]<br />
</cl><br />
<br />
The Application Output terminal will pop up and display any error messages, the termination message, and any string output by <code>qDebug()</code>.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }} --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
Although very similar to [[Getting_Started_With_Qt_Creator | Getting Started with Qt Creator]], this guide differes by introducing the reader to the process of developing a Qt application with a graphical user interface. Developing a new application generally follows these steps: create a new project, configure a new device profile if needed, modify the build and run conditions to allow deployment on the remote device, drag and drop the visual elements to the GUI using the UI designer, write the code needed to respond to interactions with the UI, build the application, and run the application upon a successful build.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=5048Wifi2015-11-10T21:31:43Z<p>Jjung: </p>
<hr />
<div>{{todo|Review (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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-); (11.2.2015-14:45->JJ+); (11.3.2015-19:35->MD-); (11.4.2015-14:40->JJ+);(11.05.2015-15:40->MD+); (11.10.2015-15:05->JJ-)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=Linux wifi,embedded wifi<br />
|description=How to access a wireless network<br />
}}<br />
<br />
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 carrier.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many boards from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, a system can be equipped with wireless networking capability. Such a USB adapter can be ordered by contacting the [mailto:sales@emacinc.com sales team] here at EMAC. Request the product by its part number, PER-USB-00005-R.<br />
<br />
<br />
This page describes the actions needed to connect to a wireless network using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in should already have the proper software and drivers to support connecting to a wireless network. Pipping <code>opkg list-installed</code> through <code>grep</code> with the driver name name be used to determine if the drivers you need are in fact installed. If your board with built-in Wi-Fi has the proper drivers, skip to the [[#Wireless Networking|Wireless Networking]] section.<br />
<br />
<cl>1. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
* This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{cli | indent=2 | mount -o remount,rw / | hostname=ipac9x25 }} <br />
<br />
* A check for any updates to the package list is typically a good practice before installing new software. Use the <code>opkg</code> manager to update the package list. <br />
{{cli | indent=2 | opkg update | hostname=ipac9x25 }}<br />
<br />
* 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</code> tool. <br />
{{cli | indent=2 | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installation of the <code>linux-firmware-ath9k</code> package. <br />
{{cli | indent=2 | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
<br />
* The driver for the built-in Wi-Fi will depend on the carrier. For the 200GS boards, the <code>linux-firmware-sd8787</code> package will be required while the other boards will need the <code>linux-firmware-marvell-license</code> package to allow the device to take advantage of the technology. <br />
{{cli|indent=2 | opkg install linux-firmware-marvell-license}}<br />
{{cli | indent=2 | opkg install linux-firmware-sd8787}}<br />
<br />
* Independent of whether you're connecting with an adapter or using built-in capabilities, the <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. <br />
{{cli | indent=2 | opgk install iw | hostname=ipac9x25}}<br />
{{cli | indent=2 | opkg install wireless-tools | hostname=ipac9x25 }} <br />
</cl><br />
<br />
All the necessary software required to make the wireless connection has now been obtained.<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{cli | indent=2 | mount -o remount,rw / | hostname=ipac9x25}} <br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{cli | indent=2 | iw dev wlan0 scan | hostname=ipac9x25}} <br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo | indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{cli | indent=2 | wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{cli | indent=2 ||hostname=ipac9x25}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br /><br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{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 /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
* 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 />
{{clop|indent=2}}wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
:::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){{closp}} <br />
<br />
* 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 /><br />
{{clop|indent=2}}<br />
{{cliop| ping -c 3 www.emacinc.com | hostname=ipac9x25}}<br />
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<br />
{{cliop||hostname=ipac9x25}}{{closp}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
== Troubleshooting ==<br />
If your come across any issues communicating though the network, try these suggestions as starting points to resolve the problem(s).<br />
* View the <code>/etc/resolv.conf</code> file to view the DNS servers provided from the DHCP server.<br />
* Inspect the routing table using the <code>route</code> command, as shown here:<br />
{{clop | indent=2}}<br />
{{cliop|hostname=ipac9x25|user=root|route -n}}<br />
Kernel IP routing table<br />
Destination Gateway Genmask Flags Metric Ref Use Iface<br />
0.0.0.0 10.0.2.1 0.0.0.0 UG 0 0 0 eth0<br />
10.0.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0<br />
{{cliop|hostname=ipac9x25|user=root|}} {{closp}}<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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 to revise the network settings.<br />
<br />
<br />
This page walked the reader through the procedure to connect a machine to a wireless network via a USB Wifi adapter or built-in wireless, and the process to acquire 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 EMAC OE Linux. Other USB wireless adapters may be used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. Requests to purchase the adapter should be sent to [mailto:sales@emacinc.com sales@emacinc.com]; please include a reference to the EPN, PER-USB-00005-R, when sending a request to purchase this adapter.<br />
<br />
<br clear=all><br />
<br />
{{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]<br />
* [[Network_Connections | Network Connections]]<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[OE50:Packages | EMAC OE 5.X Release Information]]<br />
* [[EMAC_OE_50_Add-on_Packages | EMAC OE 50 Add-on Packages]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Creating_a_New_EMAC_OE_SDK_Project_with_qmake_in_Qt_Creator&diff=5039Creating a New EMAC OE SDK Project with qmake in Qt Creator2015-11-10T18:42:15Z<p>Jjung: Created page with "{{ subst:Pgtempl | initials={{subst::Templateimpl:getinitials}} | project=OE 5.0 | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator}}"</p>
<hr />
<div>{{todo| NotStarted (11.10.2015-12:42->JJ+)| Jjung | project=OE 5.0,JJ,NotStarted }}<br />
{{#seo:<br />
|title=Creating the Project<br />
|titlemode=append<br />
|keywords=<br />
|description=Creating a New EMAC OE SDK Project with qmake in Qt Creator<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Creating the Project | desc=Creating a New EMAC OE SDK Project with qmake in Qt Creator | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=5023Getting Started With Minicom2015-11-09T21:17:18Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+);(11.04.2015-13:00->MD-);(11.04.2015-17:15->JJ+);(11.05.2015-18:55->MD-);(11.09.2015-15:14->JJ+) |Jeffrey Jung| project=OE 5.0,Review,JJ,MD}}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
__TOC__<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using Windows, PuTTY is a viable application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY. <br />
<br />
Please note that while PuTTY will work, it is missing a number of features relative to a real Linux terminal. In particular, a number of keystroke shortcuts will not work with PuTTY, and not all output will be displayed correctly in PuTTY (although it does manage to display most output correctly). For serious work with Linux, a real Linux terminal (such as minicom, described here) is strongly recommended.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of a terminal emulator, such as <code>minicom</code>, is required when connecting to an EMAC board via a serial console. This page sets out to provide general information about using <code>minicom</code> to communicate between EMAC machines and a development PC.<br />
<br />
The following list of arguments can be used to alter its behavior from the command line.<br />
<br />
;-b <baudrate><br />
:The serial port baud rate used by the external device–typically a SOM.<br />
;-D <device_name><br />
:The device name for the serial port being used.<br />
;-h<br />
:Show a list of arguments that minicom accepts.<br />
<br />
For a more comprehensive list of options and their descriptions, read the manpage for minicom:<br />
{{cli|man minicom|hostname=developerpc|username=user}}<br />
<br />
The calling convention for minicom is as follows:<br />
<code>minicom [OPTIONS] [configuration]</code><br />
<br />
Where <code>[OPTIONS]</code> is a space-delimited list of options from among those listed above.<br />
<code>[configuration]</code> is a configuration file that can be found in <code>/etc/minicom/</code>. <br />
<br />
Note that most configurations are named <code>minirc.<some_name></code> where <code><some_name></code> is what should be specified in place of <code>[configuration]</code> above.<br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{cli|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{cli|sudo minicom -s|hostname=developerpc|username=user}}<br />
<br />
This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to '''Exit from Minicom'''. Run the <code>minicom</code> command with the option <code>-con</code>. The <code>c</code> specifies the color display and <code>on</code> tells <code>minicom</code> to display the interface in color. <code>minicom</code> can be made to always run in color by modifying the <code>~/.bashrc</code> file, setting an alias for <code>minicom</code> to <code>minicom -con</code>, and restarting your terminal session (or sourcing your <code>.bashrc</code>) to make the change take effect.:<br />
<pre><br />
alias minicom='minicom -con'<br />
</pre><br />
<br />
Another method to set <code>minicom</code> to always display in color is to set the <code>MINICOM</code> environment variable. This variable will be used to store any default options you wish to have always run when launching <code>minicom</code>. Set the variable to '<code>-con</code>', then export the variable:<br />
{{cli|MINICOM&#x3d;'-con'|hostname=developerpc|username=user}}<br />
{{cli| export MINICOM|hostname=developerpc|username=user}}<br />
<br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the 'Enter' key.<br />
<br /><br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the path to the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The settings for specific EMAC devices can be found at the [[Serial_Connections | Serial Connections]] page. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br /><br />
In this screenshot, the "115200 8N1" for the '''Bps/Par/Bits''' setting indicates the baud rate is set to 115200, data bits set to 8 (the '8' in 8N1), parity is set to none (the 'N' in 8N1), and stop bits is set to 1 (the '1' in 8N1).<br />
<br />
* You will most likely wish to modify the '''Serial Device''' setting to have the path to the serial port you normally use. This way, you'll be able to run the command without any options or commands. The <code>scanserial</code> tool provided in the <code>emac-tool-util</code> package can display a list of serial ports using the <code>-l</code> option.<br />
{{cli|scanserial -l| hostname=developerpc|username=user}}<br />
<br />
More information about the <code>scanserial</code> program can be found at the [[Scanserial | scanserial page]].<br />
Press the 'Esc' key to be be brought back to the configurations page.<br />
<br />
* The next setting that needs to be configured is the '''Modem and dialing'''. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Also do this for B through K, and for H. Hit the 'Esc' key when finished deleting the content of these settings.<br />
* That's all the modifications that need to be done to get <code>minicom</code> set up. You'll need to save the configuations in one of two was:<br />
:*You may want to save the configuration as the default whenever <code>minicom</code> is launched. Arrow down to '''Save setup as dfl''' and press 'Enter'.<br />
<br />
:*You may also save the modifications as its own configuration. This is advantageous if you have many serial ports or if you have multiple systems with varying serial connection configurations. Arrow down to '''Save setup as..''' and press 'Enter'. Name the configuration as something unique, like <code>ttyS11</code> to identify that the path to the serial device is <code>/dev/ttyS11</code>. The new file created for your configuration will be <code>/etc/minicom/mini.ttyS11</code>. You may pass the configuration as an argument to use that configuration when launching <code>minicom</code>:<br />
:{{cli|minicom ttyS11|hostname=developerpc|username=user}}<br />
<br />
<br />
:If a "<code>cannot write to"</code> message pops up, you likely aren't running the command as root. Re-run "<code>minicom -s</code>" with <code>sudo</code>.<br />
<br />
* Once you have saved the configuration, arrow down to '''Exit from Minicom'''.<br />
</cl><br />
<br />
<br />
== Running Minicom ==<br />
Now that everything is configured, you are ready to open the serial connection.<br />
<cl>1. Run the <code>minicom</code> command to start <code>minicom</code> with the serial port setting you configured above. If you wish to use <code>minicom</code> on a different serial port, see the note below.<br />
<br />
* Log in with the appropriate username and password for the device. Login information can be found [[System_Log_In | here]].<br />
You're now able to communicate to the device and use <code>minicom</code> in the same way as using the terminal for the device. <br />
</cl><br />
{{ note | When opening a connection to a different serial port than what has been saved from the <code>minicom</code> configurations, use the <code>-D</code> option to specify the path to the desired serial port. For example, to use <code>/dev/ttyUSB0</code>, run <code>minicom</code> like this:<br />
<br />
<br />
{{cli|minicom -D /dev/ttyUSB0| hostname=developerpc| username=user}}<br />
<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- There's only one example, so we really don't need an entire section for it. Plus, the cli template looks nice inside the Note box.<br />
<br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }} <br />
Suppose the port <code>/dev/ttyS10</code> is specified as the default. If the desired path to a different port is at <code>/dev/ttyUSB0</code>, run <code>minicom</code> as follows:<br />
{{cli|minicom -D /dev/ttyUSB0| hostname=developerpc| username=user}} --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
This program is a very important tool for developers. The serial console is essential for working with the bootloader on ARM systems, since U-Boot cannot be accessed via ssh. Using the serial console, you will be able to configure the bootloader, to program new kernels via the bootloader, to program new filesystems, to make a copy of the filesystem on a board, and to perform memory checks using U-Boot. The serial console will also enable you to see startup and shutdown messages, to configure and debug the system when networking is not configured or is not working, and to debug the system when the machine is not booting up.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[System_Log_In | System Log In]]<br />
* [[Scanserial | scanserial]]<br />
<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[Serial_Connections | Serial Connections]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4976Getting Started With Minicom2015-11-04T23:17:53Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+);(11.04.2015-13:00->MD-);(11.04.2015-17:15->JJ+) |Jeffrey Jung| project=OE 5.0,Review,JJ,MD}}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
__TOC__<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using Windows, PuTTY is a viable application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY. <br />
<br />
Please note that while PuTTY will work, it is missing a number of features relative to a real Linux terminal. In particular, a number of keystroke shortcuts will not work with PuTTY, and not all output will be displayed correctly in PuTTY (although it does manage to display most output correctly). For serious work with Linux, a real Linux terminal (such as minicom, described here) is strongly recommended.<br />
<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of a terminal emulator, such as <code>minicom</code>, is required when connecting to an EMAC board via a serial console. This page sets out to provide general information about using <code>minicom</code> to communicate between EMAC machines and a development PC.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{cli|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{cli|sudo minicom -s|hostname=developerpc|username=user}}<br />
<br />
This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to '''Exit from Minicom'''. Run the <code>minicom</code> command with the option <code>-con</code>. The <code>c</code> specifies the color display and <code>on</code> tells <code>minicom</code> to display the interface in color. <code>minicom</code> can be made to always run in color by modifying the <code>~/.bashrc</code> file, setting an alias for <code>minicom</code> to <code>minicom -con</code>, and restarting your terminal session (or sourcing your <code>.bashrc</code>) to make the change take effect.:<br />
<pre><br />
alias minicom='minicom -con'<br />
</pre><br />
<br /><br />
<br />
<!-- I tried using adduser from my machine and it said I'm already in the group, yet still couldn't save unless I ran sudo. I talk to Michael G about it and after a while, we determined that it'll only work if we use sudo. --><br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the 'Enter' key.<br />
<br /><br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the path to the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The settings for specific EMAC devices can be found at the [[Serial_Connections | Serial Connections]] page. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br /><br />
In this screenshot, the "115200 8N1" for the '''Bps/Par/Bits''' setting indicates the baud rate is set to 115200, data bits set to 8 (the '8' in 8N1), parity is set to none (the 'N' in 8N1), and stop bits is set to 1 (the '1' in 8N1).<br />
<br />
* You will most likely wish to modify the '''Serial Device''' setting to have the path to the serial port you normally use. This way, you'll be able to run the command without any options or commands. The <code>scanserial</code> tool provided in the <code>emac-tool-util</code> package can display a list of serial ports using the <code>-l</code> option.<br />
{{cli|scanserial -l| hostname=developerpc|username=user}}<br />
<br />
More information about the <code>scanserial</code> program can be found at the [[Scanserial | scanserial page]].<br />
Press the 'Esc' key to be be brought back to the configurations page.<br />
<br />
* The next setting that needs to be configured is the '''Modem and dialing'''. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Also do this for B through K, and for H. Hit the 'Esc' key when finished deleting the content of these settings.<br />
* That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Save setup as dfl''' and press 'Enter'. <br />
If a message pops up saying "<code>cannot write to /etc/minicom/minirc.dfl</code>", you likely aren't running the command as root. Re-run the command with <code>sudo</code>.<br />
<br />
* Once you have saved the configuration, arrow down to '''Exit from Minicom'''.<br />
</cl><br />
<br />
== Running Minicom ==<br />
Now that everything is configured, you are ready to open the serial connection.<br />
<cl>1. Run the <code>minicom</code> command to start <code>minicom</code> with the serial port setting you configured above. If you wish to use <code>minicom</code> on a different serial port than the one you configured above, see the note below.<br />
<br />
* Log in with the appropriate username and password for the device. Login information can be found [[System_Log_In | here]].<br />
You're now able to communicate to the device and use <code>minicom</code> in the same way as using the terminal for the device. <br />
</cl><br />
<br />
{{ note | When opening a connection to a different serial port than what has been saved from the <code>minicom</code> configurations, use the <code>-D</code> option and specify the path to the desired serial port. See the example below.<br />
}}<br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }} <br />
Suppose the port <code>/dev/ttyS10</code> is specified as the default. If the desired path to a different port is at <code>/dev/ttyUSB0</code>, run <code>minicom</code> as follows:<br />
{{cli|minicom -D /dev/ttyUSB0| hostname=developerpc| username=user}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
This program is a very important tool for developers. The serial console is essential for working with the bootloader on ARM systems, since U-Boot cannot be accessed via ssh. Using the serial console, you will be able to configure the bootloader, to program new kernels via the bootloader, to program new filesystems, to make a copy of the filesystem on a board, and to perform memory checks using U-Boot. The serial console will also enable you to see startup and shutdown messages, to configure and debug the system when networking is not configured or is not working, and to debug the system when the machine is not booting up.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[System_Log_In | System Log In]]<br />
* [[Scanserial | scanserial]]<br />
<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[Serial_Connections | Serial Connections]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4971Getting Started With Minicom2015-11-04T20:56:12Z<p>Jjung: </p>
<hr />
<div>{{todo| Buggy (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+);(11.04.2015-13:00->MD-) |Jeffrey Jung| project=OE 5.0,Buggy,JJ,MD}}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
__TOC__<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using Windows, PuTTY is a viable application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY. <br />
<br />
Please note that while PuTTY will work, it is missing a number of features relative to a real Linux terminal. In particular, a number of keystroke shortcuts will not work with PuTTY, and not all output will be displayed correctly in PuTTY (although it does manage to display most output correctly). For serious work with Linux, a real Linux terminal (such as minicom, described here) is strongly recommended.<br />
<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of a terminal emulator, such as <code>minicom</code>, is required when connecting to an EMAC board via a serial console. This page sets out to provide general information about using <code>minicom</code> to communicate between EMAC machines and a development PC.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{cli|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{cli| minicom -s|hostname=developerpc|username=user}}<br />
<br />
This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to '''Exit from Minicom'''. Run the <code>minicom</code> command with the option <code>-con</code>. The <code>c</code> specifies the color display and <code>on</code> tells <code>minicom</code> to display the interface in color. <code>minicom</code> can be made to always run in color by modifying the <code>~/.bashrc</code> file, setting an alias for <code>minicom</code> to <code>minicom -con</code>, and restarting your terminal session (or sourcing your <code>.bashrc</code>) to make the change take effect.:<br />
<pre><br />
alias minicom='minicom -con'<br />
</pre><br />
<br /><br />
<br />
{{warning | You shouldn't need to run minicom with sudo. If you do, you have your permissions misconfigured. You'll need to add your user to the dialout group.<br />
<br />
I tried using adduser from my machine and it said I'm already in the }}<br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the 'Enter' key.<br />
<br /><br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the path to the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The settings for specific EMAC devices can be found at the [[Serial_Connections | Serial Connections]] page. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br /><br />
In this screenshot, the "115200 8N1" for the '''Bps/Par/Bits''' setting indicates the baud rate is set to 115200, data bits set to 8 (the '8' in 8N1), parity is set to none (the 'N' in 8N1), and stop bits is set to 1 (the '1' in 8N1).<br />
You will most likely wish to modify the '''Serial Device''' setting to have the path to the serial port you normally use. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to be be brought back to the configurations page.<br />
<br />
{{warning | You need to tell them how to find and configure their serial port as well. I wrote a program called scanserial, which is part of the emac-tools-util package, for just this purpose. It doesn't seem to have been documented on the wiki yet, though. You can provide a link to a stub article, which will be written soon. I'll create it here: http://wikidev.emacinc.com/wiki/Scanserial }}<br />
<br />
* The next setting that needs to be configured is the '''Modem and dialing'''. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Also do this for B through K, and for H. Hit the 'Esc' key when finished deleting the content of these settings.<br />
* That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Save setup as dfl''' and press 'Enter'. <br />
If a message pops up saying "<code>cannot write to /etc/minicom/minirc.dfl</code>", <strike>you likely aren't running the command as root. Re-run the command with <code>sudo</code>.</strike><br />
<br />
{{warning | Again, you shouldn't need to run as root. If you need sudo, your permissions are incorrect. They need to be fixed. The reason for getting this error would be because of running minicom with sudo to set the config the first time, because doing so would cause minicom to write a config file in your home directory that's owned by root instead of by you.}}<br />
<br />
* Once you have saved the configuration, arrow down to '''Exit from Minicom'''.<br />
</cl><br />
== Running Minicom ==<br />
Now that everything is configured, you are ready to open the serial connection.<br />
<cl>1. Run the <code>minicom</code> command to start <code>minicom</code> with the serial port setting you configured above. If you wish to use <code>minicom</code> on a different serial port than the one you configured above, see the note below.<br />
<br />
* Log in with the appropriate username and password for the device. Login information can be found [[System_Log_In | here]].<br />
You're now able to communicate to the device and use <code>minicom</code> in the same way as using the terminal for the device. <br />
</cl><br />
<br />
{{ note | The description of how to run minicom -D should be here. Remember, the customers reading this will usually only have one EMAC board, which they will keep attached to their computer for several months straight (if not 1+ years).<br />
<!--<br />
<cl>1. Run the <code>minicom</code> command with the option <code>-D</code> and the path to the device as an argument.<br />
{{cli|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}<br />
<br />
If the path to the device is what you have configured in the <code>minicom</code> settings, you won't need to use the <code>-D /dev/ttyS10</code> arguments and options. <code>/dev/ttyS10</code> is just an example of a path to a serial port; your path may be different. Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.<br />
--><br />
}}<br />
<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- Don't really need an example do we? It's rather straight forward --><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }} --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
This program is a very important tool for developers. The serial console is essential for working with the bootloader on ARM systems, since U-Boot cannot be accessed via ssh. Using the serial console, you will be able to configure the bootloader, to program new kernels via the bootloader, to program new filesystems, to make a copy of the filesystem on a board, and to perform memory checks using U-Boot. The serial console will also enable you to see startup and shutdown messages, to configure and debug the system when networking is not configured or is not working, and to debug the system when the machine is not booting up.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[System_Log_In | System Log In]]<br />
<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[Serial_Connections | Serial Connections]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4970Wifi2015-11-04T20:47:01Z<p>Jjung: </p>
<hr />
<div>{{todo|Review (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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-); (11.2.2015-14:45->JJ+); (11.3.2015-19:35->MD-); (11.4.2014-14:40-> JJ+)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<br />
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 carrier.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many boards from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, a system can be equipped with wireless networking capability. Such a USB adapter can be ordered by contacting the [mailto:sales@emacinc.com sales team] here at EMAC. Request the product by its part number, PER-USB-00005-R.<br />
<br />
<br />
This page describes the actions needed to connect to a wireless network either using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in will already have the proper software and drivers to support connecting to a wireless network. If you're using a board with built-in Wi-Fi, skip to the [[#Wireless Networking|Wireless Networking]] section.<br />
<br />
<cl>1. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
* This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{cli | indent=2 | mount -o remount,rw / | hostname=ipac9x25 }} <br />
<br />
* A check for any updates to the package list is typically a good practice before installing new software. Use the <code>opkg</code> manager to update the package list. <br />
{{cli | indent=2 | opkg update | hostname=ipac9x25 }}<br />
<br />
* 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</code> tool. <br />
{{cli | indent=2 | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installation of the <code>linux-firmware-ath9k</code> package. <br />
{{cli | indent=2 | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
<br />
* The <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. <br />
{{cli | indent=2 | opgk install iw | hostname=ipac9x25}}<br />
{{cli | indent=2 | opkg install wireless-tools | hostname=ipac9x25 }} <br />
</cl><br />
<br />
All the necessary software required to make the wireless connection has now been obtained.<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{cli | indent=2 | mount -o remount,rw / | hostname=ipac9x25}} <br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{cli | indent=2 | iw dev wlan0 scan | hostname=ipac9x25}} <br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo | indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{cli | indent=2 | wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{cli | indent=2 ||hostname=ipac9x25}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br /><br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{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 /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
* 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 />
{{clop|indent=2}}wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
:::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){{closp}} <br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c 3 www.emacinc.com | hostname=ipac9x25}}<br />
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<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
== Troubleshooting ==<br />
If your come across any issues communicating though the network, try these suggestions as starting points to resolve the problem(s).<br />
* View the <code>/etc/resolv.conf</code> file to view the DNS servers provided from the DHCP server.<br />
* Inspect the routing table using the <code>route</code> command, as shown here:<br />
{{clop | indent=2}}<br />
{{cliop|hostname=ipac9x25|user=root|route -n}}<br />
Kernel IP routing table<br />
Destination Gateway Genmask Flags Metric Ref Use Iface<br />
0.0.0.0 10.0.2.1 0.0.0.0 UG 0 0 0 eth0<br />
10.0.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0<br />
{{cliop|hostname=ipac9x25|user=root|}} {{closp}}<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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 to revise the network settings.<br />
<br />
<br />
This page walked the reader through the procedure to connect a machine to a wireless network via a USB Wifi adapter or built-in wireless, and the process to acquire 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 used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. Requests to purchase the adapter should be sent to [mailto:sales@emacinc.com sales@emacinc.com]; please include a reference to the EPN, PER-USB-00005-R, when sending a request to purchase this adapter.<br />
<br />
<br clear=all><br />
<br />
{{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]<br />
* [[Network_Connections | Network Connections]]<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[OE50:Packages | EMAC OE 5.X Release Information]]<br />
* [[EMAC_OE_50_Add-on_Packages | EMAC OE 50 Add-on Packages]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4929Getting Started With Minicom2015-11-03T20:36:15Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD}}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
__TOC__<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using a Windows, PuTTY is a great application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.<br />
<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of <code>minicom</code> is required when connecting an EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> to communicate between EMAC devices and your development PC.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{clo|indent=1}}<br />
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{clo|indent=1}}<br />
{{clio|sudo minicom -s|hostname=developerpc|username=user}}<br />
{{clos}}<br /><br />
This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to '''Exit from Minicom'''. Run the <code>minicom</code> command with the options <code>-scon</code>. The <code>c</code> specifies the color display and <code>on</code> tells <code>minicom</code> to display the interface in color. <code>minicom</code> can be made to always run in color by modifying the <code>~/.bashrc</code> file and setting <code>minicom</code> to alias to <code>minicom -con</code> .<br />
<br /><br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the 'Enter' key.<br />
<br /><br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the path to the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The settings for specific EMAC devices can be found at the [[Serial_Connections | Serial Connectoins]] page. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br /><br />
In this screenshot, the "115200 8N1" for the '''Bps/Par/Bits''' setting indicates the baud rate is set to 115200, data bits set to 8 (the '8' in 8N1), parity is set to none (the 'N' in 8N1), and stop bits is set to 1 (the '1' in 8N1).<br />
If you're likely to use the same serial port when connecting to your device with minicom, modify the '''Serial Device''' setting to have the path to the port. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to be be brought back to the configurations page.<br />
<br /><br />
* The next setting that needs to be configured is the '''Modem and dialing'''. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings.<br />
* That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Save setup as dfl''' and press 'Enter'. <br />
If a message pops up saying "<code> cannot write to /etc/minicom/minirc.dfl</code>", you likely aren't running the command as root. Re-run the command with <code>sudo</code>.<br />
* Once you're able to save the configurations, arrow down to '''Exit from Minicom'''.<br />
</cl><br />
== Running Minicom ==<br />
Now that everything is configured, let's make the connection to the device.<br />
<cl>1. Run the <code>minicom</code> command with the option <code>-D</code> and the path to the device as an argument.<br />
{{clo|indent=1}}<br />
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}<br />
{{clos}}<br />
If the path to the device is what you have configured in the <code>minicom</code> settings, you won't need to use the <code>-D /dev/ttyS10</code> arguments and options. <code>/dev/ttyS10</code> is just an example of a path to a serial port; your path may be different. Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.<br />
* Log in with the appropriate username and password for the device. Log in information can be found at [[System_Log_In | here]].<br />
You're now able to communicate to the device and use <code>minicom</code> in the same way as using the terminal for the device. <br />
</cl><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- Don't really need an example do we? It's rather straight forward --><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }} --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
This program is a very powerful tool for developers. While functioning largely as a terminal for the connected device, it also can be be used to view important output form other system functions like when the system starts up or reboots. <br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[System_Log_In | System Log In]]<br />
<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* [[Serial_Connections | Serial Connections]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4924Getting Started With Minicom2015-11-03T00:01:39Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using a Windows, PuTTY is a great application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of <code>minicom</code> is required when connecting to and EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> as well as a guide to demonstrate using it to connect with EMAC devices.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your development Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{clo|indent=1}}<br />
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{clo|indent=1}}<br />
{{clio|sudo minicom -s|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the Enter key.<br/>[Screenshot?]<br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The EMAC devices will require the '''Bps/Par/Bits''', and flow control settings. Set '''Bps/Par/Bits''' to 115200 baud, 8 data bits and no priority. Set both flow control settings to ''''No''''. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br />
If you're likely to use the same serial port when connecting to your device with minicom, modify the '''Serial Device''' setting to have the path to the port. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to save the settings and to be be brought back to the configurations page<br />
<br />
* The next setting that needs to be configure is the '''Modem and dialing'''. Press the 'A" key and delete its content. Hit the 'Enter' key to save the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings. That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Exit from Minicom''' and press 'Enter'.<br />
<br />
</cl><br />
<br />
== Running Minicom ==<br />
Now that everything is configured, let's make the connection to the device.<br />
<cl>1. Run the <code>minicom</code> command with the option <code>-D</code> and the path to the device as an argument.<br />
{{clo|indent=1}}<br />
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}<br />
{{clos}}<br />
Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.<br />
<br />
* Log in to the device as the root user<br />
{{clo}}<br />
{{clos}} <br />
</cl><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4923Getting Started With Minicom2015-11-03T00:01:03Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.28.2015-16:36->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using a Windows, PuTTY is a great application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of <code>minicom</code> is required when connecting to and EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> as well as a guide to demonstrate using it to connect with EMAC devices.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<cl>1. If <code>minicom</code> has yet to be installed on your development Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{clo|indent=1}}<br />
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{clo|indent=1}}<br />
{{clio|sudo minicom -s|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the Enter key.<br/>[Screenshot?]<br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The EMAC devices will require the '''Bps/Par/Bits''', and flow control settings. Set '''Bps/Par/Bits''' to 115200 baud, 8 data bits and no priority. Set both flow control settings to ''''No''''. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]<br />
<br />
If you're likely to use the same serial port when connecting to your device with minicom, modify the '''Serial Device''' setting to have the path to the port. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to save the settings and to be be brought back to the configurations page<br />
<br />
* The next setting that needs to be configure is the '''Modem and dialing'''. Press the 'A" key and delete its content. Hit the 'Enter' key to save the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings. That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Exit from Minicom''' and press 'Enter'.<br />
<br />
</cl><br />
<br />
== Running Minicom ==<br />
Now that everything is configured, let's make the connection to the device.<br />
<cl>1. Run the <code>minicom</code> command with the option <code>-D</code> and the path to the device as an argument.<br />
{{clo|indent=1}}<br />
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}<br />
{{clos}}<br />
Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.<br />
<br />
* Log in to the device as the root user<br />
{{clo}}<br />
{{clos}} <br />
</cl><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=File:Minicomserialport.png&diff=4922File:Minicomserialport.png2015-11-02T23:19:40Z<p>Jjung: Jjung uploaded a new version of &quot;File:Minicomserialport.png&quot;</p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=File:Minicomserialport.png&diff=4921File:Minicomserialport.png2015-11-02T22:47:54Z<p>Jjung: </p>
<hr />
<div></div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4920Wifi2015-11-02T20:46:26Z<p>Jjung: </p>
<hr />
<div>{{todo|Review (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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-); (11.2.2015-14:45->JJ+)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many machines from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, like the one found here at [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin], a system can equipped with wireless networking capability. <br />
<br />
This page describes the actions needed to connect to a wireless network either using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in will already have the proper software and drivers to support connecting to a wireless network. If you're using a board with built-in Wi-Fi, skip to the [[#Wireless Networking|Wireless Networking]] section. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
<cl>1. This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* A check for any updates is typically a good practice before installing new software. Use the <code>opkg</code> manager to install any updated software from the package list. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the <code>linux-firmware-ath9k</code> package. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* The <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<br />
<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br /><br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
<br clear=all><br />
<br />
* 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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
== Troubleshooting ==<br />
If your come across any issues communicating though the network, try these suggestions as starting points to resolve the problem(s).<br />
* View the <code>/etc/resolv.conf</code> file to view the DNS servers provided from the DHCP server.<br />
* Inspect the routing table.<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
This page walks through the procedure to connect a machine to a wireless network via a USB Wifi 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 used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. EMAC does resell the USB adapter. Request for purchase of the adpater should be sent to [mailto:sales@emacinc.com sales@emacinc.com], inquiring about a product with a EPN of PER-USB-00005-R.<br />
<br />
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 />
<br clear=all><br />
<br />
{{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]<br />
* [[Network_Connections | Network Connections]]<br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[OE50:Packages | EMAC OE 5.X Release Information]]<br />
* [[EMAC_OE_50_Add-on_Packages | EMAC OE 50 Add-on Packages]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4891Getting Started With Minicom2015-10-29T20:31:03Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.28.2015-16:36->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span> --?<br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run my calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using a Windows, PuTTY is a great application to make such connections. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of <code>minicom</code> is required when connecting to and EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> as well as a guide to demonstrate using <code>minicom</code> to connect with EMAC devices.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
Hey!!! Create a nice intro type thing for the procedure.<br />
<cl>1. If <code>minicom</code> has yet to be installed on your development Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{clo|indent=1}}<br />
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{clo|indent=1}}<br />
{{clio|minicom -s|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the Enter key.<br/>[Screenshot?]<br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The EMAC devices will require the '''Bps/Par/Bits''', and flow control settings. Set '''Bps/Par/Bits''' to 115200 baud, 8 data bits and no priority. Set both flow control settings to ''''No''''. Press the 'Esc' key to save the settings and to be be brought back to the configurations page.<br /> [definitely use a screenshot here]<br />
<br />
* The next setting that needs to be configure is the '''Modem and dialing'''. Press the 'A" key and delete its content. Hit the 'Enter' key to save the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings. That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Exit from Minicom''' and press 'Enter'.<br />
<br />
</cl><br />
<br />
== Running Minicom ==<br />
Now that everything is configured, let's make the connection to the device. Run the <code>minicom</code> command with the option <code>-D</code> and the path to the device as an argument.<br />
{{clo|indent=1}}<br />
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4890Wifi2015-10-29T20:30:40Z<p>Jjung: </p>
<hr />
<div>{{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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<br />
{{warning | Keywords need to be added to the SEO tag (above)}}<br />
<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many machines from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, like the one found here at [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin], a system can equipped with wireless networking capability. <br />
<br />
This page describes the actions needed to connect to a wireless network either using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in will already have the proper software and drivers to support connecting to a wireless network. If you're using a board with built-in Wi-Fi, skip to the [[#Wireless Networking|Wireless Networking]] section. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
{{warning | This step isn't needed on EMAC boards with built in wifi capability. Boards like the SOM-200GS with the wifi option will have this software pre-installed. You can tell them to skip this section for those boards.}}<br />
<br />
<cl>1. This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* A check for any updates is typically a good practice before installing new software. Use the <code>opkg</code> manager to install any updated software from the package list. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the <code>linux-firmware-ath9k</code> package. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
{{warning | Don't forget to always use code tags around package names. I added them around <code>linux-firmware-ath9k</code> for you. <br />
<br /><br />
Also, don't forget to capitalize and double check the spelling of company names; I fixed Marvell below; it was "marvel". The package name apparently misspells the company name.<br />
<br /><br /><br />
Additionally, the Marvell package won't work for all EMAC products with built in Wifi. I'm currently designing a board which will have a Texas Instruments Wifi module on it rather than the wi2wi module which uses the Marvell driver. But as I mentioned above, the board should have this pre-installed. If it doesn't, please let me know. It's important that this software and the correct drivers are pre-installed on these boards.<br />
<br /><br /><br />
Showing example output of the opkg commands, below, will make the procedure more clear.<br />
}}<br />
<br />
* The <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<br />
<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
{{warning | Did you forget to add the greps to the above commands? Oh wait, no, you stumbled across a gotcha in the wiki syntax. You can see several examples of how I worked around this by looking at the source, here: http://wikidev.emacinc.com/wiki/Opkg#Finding_Packages_to_Install }}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<!-- THIS COMMENTED OUT IN FAVOR OF BETTER APPROACH<br />
<br clear=all><br />
:<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. <br />
<br />
<br />
* The psk that <code>wpa_passphrase</code> creates is long and complicated so highlight and copy it. Remember the name of the SSID<br />
<br /><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
network={<br />
:ssid="SSID"<br />
:proto=WPA<br />
:key_mgmt=WPA-PSK<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
-- '''INSERT''' --<br />
{{clos}}<br />
<br clear=all><br />
--><br />
<br />
<br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br /><br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
<br clear=all><br />
<br />
* 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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{warning | Adding troubleshooting steps, such as checking /etc/resolv.conf to see what DNS server(s) were provided from the DHCP server, and inspecting the routing table, would be beneficial.}}<br />
<br />
== Troubleshooting ==<br />
If your come across any issues communicating though the network, try these suggestions as starting points to resolve the problem(s).<br />
* View the <code>/etc/resolv.conf</code> file to view the DNS servers provided from the DHCP server.<br />
* Inspect the routing table.<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
This page walks through the procedure to connect a machine to a wireless network via a USB Wifi 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 used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. EMAC does resell the USB adapter. Request for purchase of the adpater should be sent to [mailto:sales@emacinc.com sales@emacinc.com], inquiring about a product with a EPN of PER-USB-00005-R.<br />
<br />
{{warning | Should we really recommend buying an adapter from a 3rd party? This is generally not a good business practice. Eric?}}<br />
<br />
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 />
<br clear=all><br />
<br />
{{warning | The moreinfo template section should be filled in with links to other articles we have on networking, since other articles do apply.}}<br />
<br />
{{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<!-- {{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
* [[Network_Configuration | Network Configuration]]<br />
* [[OE50:Packages | EMAC OE 5.X Release Information]]<br />
* [[EMAC_OE_50_Add-on_Packages | EMAC OE 50 Add-on Packages]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4888Wifi2015-10-29T20:24:10Z<p>Jjung: </p>
<hr />
<div>{{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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<br />
{{warning | Keywords need to be added to the SEO tag (above)}}<br />
<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many machines from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, like the one found here at [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin], a system can equipped with wireless networking capability. <br />
<br />
This page describes the actions needed to connect to a wireless network either using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in will already have the proper software and drivers to support connecting to a wireless network. If you're using a board with built-in Wi-Fi, skip to the [[#Wireless Networking|Wireless Networking]] section. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
{{warning | This step isn't needed on EMAC boards with built in wifi capability. Boards like the SOM-200GS with the wifi option will have this software pre-installed. You can tell them to skip this section for those boards.}}<br />
<br />
<cl>1. This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* A check for any updates is typically a good practice before installing new software. Use the <code>opkg</code> manager to install any updated software from the package list. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the <code>linux-firmware-ath9k</code> package. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
{{warning | Don't forget to always use code tags around package names. I added them around <code>linux-firmware-ath9k</code> for you. <br />
<br /><br />
Also, don't forget to capitalize and double check the spelling of company names; I fixed Marvell below; it was "marvel". The package name apparently misspells the company name.<br />
<br /><br /><br />
Additionally, the Marvell package won't work for all EMAC products with built in Wifi. I'm currently designing a board which will have a Texas Instruments Wifi module on it rather than the wi2wi module which uses the Marvell driver. But as I mentioned above, the board should have this pre-installed. If it doesn't, please let me know. It's important that this software and the correct drivers are pre-installed on these boards.<br />
<br /><br /><br />
Showing example output of the opkg commands, below, will make the procedure more clear.<br />
}}<br />
<br />
* The <code>iw</code> and <code>wireless-tools</code> packages will complete the needed software to get a connection started. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<br />
<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
{{warning | Did you forget to add the greps to the above commands? Oh wait, no, you stumbled across a gotcha in the wiki syntax. You can see several examples of how I worked around this by looking at the source, here: http://wikidev.emacinc.com/wiki/Opkg#Finding_Packages_to_Install }}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<!-- THIS COMMENTED OUT IN FAVOR OF BETTER APPROACH<br />
<br clear=all><br />
:<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. <br />
<br />
<br />
* The psk that <code>wpa_passphrase</code> creates is long and complicated so highlight and copy it. Remember the name of the SSID<br />
<br /><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
network={<br />
:ssid="SSID"<br />
:proto=WPA<br />
:key_mgmt=WPA-PSK<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
-- '''INSERT''' --<br />
{{clos}}<br />
<br clear=all><br />
--><br />
<br />
<br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br /><br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
<br clear=all><br />
<br />
* 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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{warning | Adding troubleshooting steps, such as checking /etc/resolv.conf to see what DNS server(s) were provided from the DHCP server, and inspecting the routing table, would be beneficial.}}<br />
<br />
== Troubleshooting ==<br />
If your come across any issues communicating though the network, try these suggestions as starting points to resolve the problem(s).<br />
* View the <code>/etc/resolv.conf</code> file to view the DNS servers provided from the DHCP server.<br />
* Inspect the routing table.<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
This page walks through the procedure to connect a machine to a wireless network via a USB Wifi 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 used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. We recommend using a USB adapter from [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin].<br />
<br />
{{warning | Should we really recommend buying an adapter from a 3rd party? This is generally not a good business practice. Eric?}}<br />
<br />
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 />
<br clear=all><br />
<br />
{{warning | The moreinfo template section should be filled in with links to other articles we have on networking, since other articles do apply.}}<br />
<br />
{{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<!-- {{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
* [[Network_Configuration | Network Configuration]]<br />
* [[OE50:Packages | EMAC OE 5.X Release Information]]<br />
* [[EMAC_OE_50_Add-on_Packages | EMAC OE 50 Add-on Packages]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4887Wifi2015-10-29T18:21:26Z<p>Jjung: </p>
<hr />
<div>{{todo|Buggy (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+); (10.28.2015-15:05->JJ+);(10.28.2015-16:35->MD-)|Jeffrey Jung| project=OE 5.0,Buggy,JJ,MD }}<br />
{{#seo:wireless, wifi, networking<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<br />
{{warning | Keywords need to be added to the SEO tag (above)}}<br />
<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
While many machines from EMAC are not natively designed to connect to wireless networks, most of these systems do have USB ports. Using a USB wireless network adapter, like the one found here at [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin], a system can equipped with wireless networking capability. <br />
<br />
This page describes the actions needed to connect to a wireless network either using either a wireless network USB adapter, or the 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 well supported by the Linux kernel.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
Before the device can be connected to the network, some additional software may need to be installed. Boards with Wi-Fi built in will already have the proper software and drivers to support connecting to a wireless network. If your using a board with built-in Wi-Fi, skip to the [[#Wireless Networking|Wireless Networking]] section. In order to obtain the new packages, connect the system to a physical network. The USB adapter may be plugged in at this time, although it may not have the proper drivers installed to the system yet.<br />
<br clear=all><br />
<br />
{{warning | This step isn't needed on EMAC boards with built in wifi capability. Boards like the SOM-200GS with the wifi option will have this software pre-installed. You can tell them to skip this section for those boards.}}<br />
<br />
<cl>1. This process requires modifying some system files, so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* A check for any updates is typically a good practice before installing new software. Use the <code>opkg</code> manager to install any updated software from the package list. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* If using the USB adapter, the appropriate drivers may need to be installed. The ThinkPenguin USB adapter requires the installment of the <code>linux-firmware-ath9k</code> package. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
{{warning | Don't forget to always use code tags around package names. I added them around <code>linux-firmware-ath9k</code> for you. <br />
<br /><br />
Also, don't forget to capitalize and double check the spelling of company names; I fixed Marvell below; it was "marvel". The package name apparently misspells the company name.<br />
<br /><br /><br />
Additionally, the Marvell package won't work for all EMAC products with built in Wifi. I'm currently designing a board which will have a Texas Instruments Wifi module on it rather than the wi2wi module which uses the Marvell driver. But as I mentioned above, the board should have this pre-installed. If it doesn't, please let me know. It's important that this software and the correct drivers are pre-installed on these boards.<br />
<br /><br /><br />
Showing example output of the opkg commands, below, will make the procedure more clear.<br />
}}<br />
<br />
* If using built-in Wi-Fi, the Marvell license and <code>linux-firmware-sd8787</code> packages will need to be installed. <br />
{{clo | indent=2}}<br />
{{clio | opkg install linux-firmware-marvel-license| hostname=som9g45 }}<br />
{{clio | opkg install linux-firmware-sd8787 | hostname=som9g45}}<br />
{{clos}}<br />
<br />
* 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. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<br />
<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so remount the root filesystem with read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* Wireless networks can be found using the scan option of <code>iw</code>.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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) more easily, pipe the output of the <code>iw scan</code> command through <code>grep</code> to scan for the keywords "SSID" or "signal". The closer the value of the signal strength is to 0, the stronger the connection.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan {{!}} grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan {{!}} grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
{{warning | Did you forget to add the greps to the above commands? Oh wait, no, you stumbled across a gotcha in the wiki syntax. You can see several examples of how I worked around this by looking at the source, here: http://wikidev.emacinc.com/wiki/Opkg#Finding_Packages_to_Install }}<br />
<br />
<br/><br />
The <code>/etc/wpa_supplicant.conf</code> file will need to be modified to provide the necessary connection information, the details of which depend upon the type of encryption used for the wireless network. <br />
<br/><br />
<br />
* For an open network, uncomment the following lines in <code>/etc/wpa_supplicant.conf</code> and fill in the correct SSID for the network to which the machine should connect.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* Networks protected by either WEP or WPA2 encryption will need a pre-shared key (PSK), which is 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 and redirect the output to a new file, <code>/etc/wpa_supplicant.conf</code>. Note: if this file already exists, it will be overwritten by this command; you may want to back it up first.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password > /etc/wpa_supplicant.conf|hostname=ipac9x25}}<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
* The contents of the <code>/etc/wpa_supplicant.conf</code> should now look similar to the following:<br />
{{clo|indent=2}}<br />
{{clio | cat /etc/wpa_supplicant.conf | hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<!-- THIS COMMENTED OUT IN FAVOR OF BETTER APPROACH<br />
<br clear=all><br />
:<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. <br />
<br />
<br />
* The psk that <code>wpa_passphrase</code> creates is long and complicated so highlight and copy it. Remember the name of the SSID<br />
<br /><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
network={<br />
:ssid="SSID"<br />
:proto=WPA<br />
:key_mgmt=WPA-PSK<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
-- '''INSERT''' --<br />
{{clos}}<br />
<br clear=all><br />
--><br />
<br />
<br />
<br />
* The {{icli | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} command will attempt to establish a connection with the network. <br />
<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br /><br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
<br clear=all><br />
<br />
* 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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{warning | Adding troubleshooting steps, such as checking /etc/resolv.conf to see what DNS server(s) were provided from the DHCP server, and inspecting the routing table, would be beneficial.}}<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
This page walks through the procedure to connect a machine to a wireless network via a USB Wifi 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 used to connect EMAC devices to wireless networks, but they will often face issues with driver support or other compatibility issues. We recommend using a USB adapter from [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin].<br />
<br />
{{warning | Should we really recommend buying an adapter from a 3rd party? This is generally not a good business practice. Eric?}}<br />
<br />
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 />
<br clear=all><br />
<br />
{{warning | The moreinfo template section should be filled in with links to other articles we have on networking, since other articles do apply.}}<br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4886Getting Started With Minicom2015-10-28T23:02:46Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.28.2015-16:36->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}<br />
{{#seo:minicom<br />
|title=Getting Started With Minicom<br />
|titlemode=append<br />
|keywods=<br />
|description=A guide to help customers connect to their devices with minicom<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span> --?<br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<code>minicom</code> is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run my calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in <code>/etc/minicom/minirc.dfl</code>. For those using a Windows, PuTTY is a great application to make such connections. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.<br />
<br />
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages --><br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
The use of <code>minicom</code> is required when connecting to and EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> as well as a guide to demonstrate using <code>minicom</code> to connect with EMAC devices.<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
Hey!!! Create a nice intro type thing for the procedure.<br />
<cl>1. If <code>minicom</code> has yet to be installed on your development Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package<br />
{{clo|indent=1}}<br />
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The <code>minicom</code> settings will need to be changed so that the application will be able to find your device. Pull up the settings using the <code>-s</code> option.<br />
{{clo|indent=1}}<br />
{{clio|minicom -s|hostname=developerpc|username=user}}<br />
{{clos}}<br />
<br />
* The first thing that will need to be configured is the '''serial port setup'''. Arrow down to the title and press the Enter key.<br/>[Screenshot?]<br />
<br />
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The EMAC devices will require the '''Bps/Par/Bits''', and flow control settings. Set '''Bps/Par/Bits''' to 115200 baud, 8 data bits and no priority. Set both flow control settings to ''''No''''. Press the 'Esc' key to save the settings and to be be brought back to the configurations page.<br /> [definitely use a screenshot here]<br />
<br />
* <br />
</cl><br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Getting_Started_With_Minicom&diff=4884Getting Started With Minicom2015-10-28T21:36:23Z<p>Jjung: Created page with "{{ subst:Pgtempl | initials={{subst::Templateimpl:getinitials}} | project=OE 5.0 | title=Page Title | desc=Description for SEO }}"</p>
<hr />
<div>{{todo| NotStarted (10.28.2015-16:36->JJ+)| Jjung | project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Page Title<br />
|titlemode=append<br />
|keywords=<br />
|description=Description for SEO<br />
}}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /**************************************** Page Description Text ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
<span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span><br />
<br />
__TOC__<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Background Information ****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:bg | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** General Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:geninfo | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Using/Working With ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:using | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /***************************************** Examples *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:examples | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** Conclusion ******************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:conclusion | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
<br />
<!-- /*********************************************************************************************************/ --><br />
<!-- /****************************************** More Information *****************************************/ --><br />
<!-- /*********************************************************************************************************/ --><br />
{{:Templateimpl:moreinfo | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
* <br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Page Title | desc=Description for SEO | project=OE 5.0 }}<br />
*</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4883Wifi2015-10-28T20:09:02Z<p>Jjung: </p>
<hr />
<div>{{todo|Review (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+); (10.28.2015-15:05->JJ+)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
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 />
<br clear=all><br />
<br />
<cl>1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* 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. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* If using built-in Wi-Fi, the marvel license and <code>linux-firmware-sd8787</code> packages will need to be installed. <br />
{{clo | indent=2}}<br />
{{clio | opkg install linux-firmware-marvel-license| hostname=som9g45 }}<br />
{{clio | opkg install linux-firmware-sd8787 | hostname=som9g45}}<br />
{{clos}}<br />
<br />
* 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. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<br />
<br />
<!-- Wireless Networking --><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
<cl>1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
* Wireless networks can be found using the can option of iw.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br/><br />
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 />
<br/><br />
<br />
* For an open network, you'll just need to uncomment the lines in <code>/etc/wpa_supplicant.conf</code> and write the proper SSID for the network.<br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="SSID"<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
* 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.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password|hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<code>#psk</code>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<br clear=all><br />
:<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. <br />
<br />
<br />
* The psk that <code>wpa_passphrase</code> creates is long and complicated so highlight and copy it. Remember the name of the SSID<br />
<br /><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
network={<br />
:ssid="SSID"<br />
:proto=WPA<br />
:key_mgmt=WPA-PSK<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
-- '''INSERT''' --<br />
{{clos}}<br />
<br clear=all><br />
<br />
* The path /etc/init.d/wpa_supplicant with the argument <code>start</code> will attempt to establish a connection with the network. <br />
{{clo|indent=2}}<br />
{{clio | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
<br /><br />
:A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
: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.<br />
<br />
<br clear=all><br />
<br />
* 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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
* 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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
</cl><br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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].<br />
<br />
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 />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4878Wifi2015-10-27T20:32:41Z<p>Jjung: </p>
<hr />
<div>{{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 }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
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.<br />
__TOC__<br />
<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br />
<!-- {{warning | A bit more background info would be nice. Why USB dongles? Why ThinkPenguin? etc}} --><br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
<!-- {{warning|These descriptions need to be fleshed out the same way you fleshed out sentences in the Getting Started document I just reviewed.}} --><br />
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 />
<br clear=all><br />
<cl>1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. <br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25 }} <br />
{{clos}}<br />
* 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. <br />
{{clo|indent=2}}<br />
{{clio | opkg update | hostname=ipac9x25 }} <br />
{{clos}}<br />
* 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>. <br />
{{clo|indent=2}}<br />
{{clio | opkg install wpa-supplicant | hostname=ipac9x25 }} <br />
{{clos}}<br />
* 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. <br />
{{clo|indent=2}}<br />
{{clio | opkg install linux-firmware-ath9k | hostname=ipac9x25}} <br />
{{clos}}<br />
* If using built-in Wi-Fi, the marvel license and <code>linux-firmware-sd8787</code> packages will need to be installed. <br />
{{clo | indent=2}}<br />
{{clio | opkg install linux-firmware-marvel-license| hostname=som9g45 }}<br />
{{clio | opkg install linux-firmware-sd8787 | hostname=som9g45}}<br />
{{clos}}<br />
* 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. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
<!-- {{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 /><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.}} --><br />
<br />
* Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
{{clo|indent=2}}<br />
{{clio| reboot |hostname=ipac9x25}}<br />
{{clos}}<br />
</cl><br />
<!-- {{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.}} --><br />
<br />
<br />
<br />
<!-- {{warning | This step ^^ logically belongs in the next section, since sections should stand alone.}} --><br />
<!-- Wireless Networking--><br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br/><br />
1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permissions.<br />
{{clo|indent=2}}<br />
{{clio | mount -o remount,rw / | hostname=ipac9x25}} <br />
{{clos}}<br />
<br />
2. Wireless networks can be found using the can option of iw.<br />
{{clo|indent=2}}<br />
{{clio | iw dev wlan0 scan | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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.<br />
{{clo|indent=2}}<br />
{{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep SSID|hostname=ipac9x25}}<br />
:SSID: EMAC-A<br />
{{clio| iw dev wlan0 scan <nowiki>|</nowiki> grep signal|hostname=ipac9x25}}<br />
:signal: -78.00dBm<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all><br />
<br />
: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 />
<br/><br />
<br />
3. For an open network, you'll just need to uncomment the lines in <code>/etc/wpa_supplicant.conf</code> <br /> <br />
<syntaxhighlight lang=bash><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</syntaxhighlight><br />
<br />
<!-- {{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 /><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. }} --><br />
<br />
<br />
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.<br />
{{clo|indent=2}}<br />
{{clio|wpa_passphrase SSID Password|hostname=ipac9x25}}<br />
network={<br />
:ssid="SSID"<br />
:<nowiki>#psk</nowiki>="Password"<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br /><br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br />
<!-- {{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 />
<br clear=all><br />
:<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. <br />
<br />
<br />
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 />
<br /><br />
<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 /><br />
{{clo|indent=2}}<br />
network={<br />
:ssid="SSID"<br />
:proto=WPA<br />
:key_mgmt=WPA-PSK<br />
:psk=b99d2c0fb66194f93ad52b71051e1095dc76e12529321334b3feb18332608eb7<br />
}<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
~<br/><br />
-- '''INSERT''' --<br />
{{clos}}<br />
<br clear=all><br />
<br />
7. The path /etc/init.d/wpa_supplicant with the argument <code>start</code> will attempt to establish a connection with the network. <br />
{{clo|indent=2}}<br />
{{clio | /etc/init.d/wpa_supplicant start | hostname=ipac9x25}} <br />
{{clos}}<br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
A connection has failed if output to the terminal continues and the following line is seen repeatedly:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> <br />
{{clo|indent=2}}<br />
{{clio| /etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant<br/><br />
rfkill: Cannot open RFKILL control device<br/><br />
{{clio| wlan0: authenticate with 1c:7e:e5:40:10:fd| hostname=ipac9x25}}<br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: send auth to 1c:7e:e5:40:10:fd (try 2/3)<br/><br />
wlan0: authenticated<br/><br />
wlan0: associating with AP with corrupt beacon<br/><br />
wlan0: associate with 1c:7e:e5:40:10:fd (try 1/3)<br/><br />
wlan0: RX AssocResp from 1c:7e:e5:40:10:fd (capab=0x431 status=0 aid=6)<br/><br />
wlan0: associated<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br />
{{clos}}<br />
:'''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 /> <br />
{{clo|indent=2}}<br />
{{clio|/etc/init.d/wpa-supplicant start| hostname=ipac9x25}}<br />
Successfully initialized wpa_supplicant <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready <br />
{{clio| IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready|hostname=ipac9x25}} <br />
cfg80211: Calling CRDA to update world regulatory domain<br/><br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/> <br />
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready<br/> <br />
cfg80211: Calling CRDA to update world regulatory domain<br/> <br />
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready<br/><br />
{{clos}}<br />
::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.<br />
<br />
<!-- {{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 />
<br clear=all><br />
<br />
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 /> <br />
{{clo|indent=2}}<br />
wlan0 Link encap:Ethernet HWaddr A8:54:B2:42:89:8D<br />
::inet addr:10.0.4.148 Bcast:10.0.255.255 Mask:255.255.0.0<br/><br />
::UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1<br/><br />
::RX packets:3395 errors:0 dropped:6 overruns:0 frame:0<br/><br />
::TX packets:60 errors:0 dropped:0 overruns:0 carrier:0<br/><br />
::collisions:0 txqueuelen:1000<br/><br />
::RX bytes:346619 (338.4 KiB) TX bytes:6318 (6.1 Kib)<br/><br />
{{clos}} <br />
<br clear=all><br />
<br />
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 /><br />
{{clo|indent=2}}<br />
{{clio| ping -c www.emacinc.com | hostname=ipac9x25}}<br />
PING www.emacinc.com (172.16.0.10): 56 data bytes <br/><br />
64 bytes from 172.16.0.10: seq=0 ttl=63 time=1.910 ms<br/><br />
64 bytes from 172.16.0.10: seq=1 ttl=63 time=1.748 ms<br/><br />
64 bytes from 172.16.0.10: seq=2 ttl=63 time=2.061 ms<br/><br />
<br/><br />
--- www.emacinc.com ping statistics ---<br/><br />
3 packets transmitted, 3 packets received, 0% packet loss<br/><br />
round-trip min/avg/max = 1.748/1.906/2.061 ms<br />
{{clio||hostname=ipac9x25}}<br />
{{clos}}<br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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].<br />
<br />
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 />
<br clear=all><br />
<br />
<!-- {{warning | Strengthen the conclusion. Don't be afraid to make the conclusion long. Describe things the reader should do next.<br />
<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.<br />
<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.}} --><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4871Wifi2015-10-26T23:02:47Z<p>Jjung: </p>
<hr />
<div>{{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 }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
<br />
<!--Background Information--><br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br />
<!-- DELETE THIS WARNING BEFORE SUBMITTING IT TO REVIEW --><br />
{{warning | A bit more background info would be nice. Why USB dongles? Why ThinkPenguin? etc}}<br />
<br />
<br />
<!-- General Information--><br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
<br />
<!-- Set Up Instructions --><br />
===Set Up=== <br />
<!-- DELETE THIS WARNING BEFORE SUBMITTING IT TO REVIEW --><br />
{{warning|These descriptions need to be fleshed out the same way you fleshed out sentences in the Getting Started document I just reviewed.}}<br />
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 />
<br clear=all><br />
1. This process requires modifying some system files so start by enabling read and write permissions to the filesystem. <br />
:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
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. <br />
:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
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. <br />
:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
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. <br />
:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
5. If using built-in Wi-Fi, the marvel license and linux-firmware-sd8787 packages will need to be installed. <br />
{{clo | indent=2}}<br />
{{clio | opkg install linux-firmware-marvel-license | username=root | hostname=som9g45 }}<br />
{{clio | opkg install linux-firmware-sd8787 | username=root | hostname=som9g45}}<br />
{{clos}} <br />
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. <br />
{{clo | indent=2}}<br />
{{clio | opgk install iw | username=root | hostname=ipac9x25}}<br />
{{clio | opkg install wireless-tools | username=root | hostname=ipac9x25 }} <br />
{{clos}}<br />
<br />
{{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 /><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.}}<br />
<br />
7. Upon successful installation of all required packages, the system will need to be rebooted to take advantage of the new packages. <br />
<br />
{{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.}}<br />
<br />
{{warning | This step ^^ logically belongs in the next section, since sections should stand alone.}}<br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
Using the packages that have just been installed, the system can be connected to the wireless network.<br /> <br />
1. Changes to some configuration files will be necessary, so mount the filesystem to read and write permisions.<br />
:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
2. Wireless networks can be found using the can option of iw.<br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: 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.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
<br />
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 /> <br />
<pre><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</pre><br />
<br />
{{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 /><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. }}<br />
<br />
4. For a WEP password protected network, use <code>wpa_passphrase</code> to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br />
{{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 />
<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
5. Highlight the psk and copy it.<br /><br />
6. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]]<br />
<br clear=all><br />
<br />
<br />
7. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument <code>start</code>. <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: 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:<br />
{{clo | indent=2}}IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready{{clos}}<br />
A connection has failed if the following is seen repeatedly and output to the terminal continues:<br />
{{clo | indent=2}}IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready{{clos}}<br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br />
{{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 />
<br />
<br clear=all><br />
8. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all><br />
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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
{{warning | Strengthen the conclusion. Don't be afraid to make the conclusion long. Describe things the reader should do next.<br />
<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.<br />
<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.}}<br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4833Wifi2015-10-20T19:25:21Z<p>Jjung: </p>
<hr />
<div>{{todo| Review (10.20.2015-14:23->JJ+);(10.20.2015-13:43->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /> <br />
<pre><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</pre><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]]<br />
<br clear=all><br />
<br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start". <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection and watch the terminal output. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4832Wifi2015-10-20T18:44:20Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.20.2015-13:43->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /> <br />
<pre><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</pre><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]]<br />
<br clear=all><br />
<br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start". <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection and watch the terminal output. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4831Wifi2015-10-20T18:41:19Z<p>Jjung: </p>
<hr />
<div>{{todo| InProgress (10.20.2015-12:45->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}}<br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
<br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /> <br />
<pre><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#} <br />
</pre><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]]<br />
<br clear=all><br />
<br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start". <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection and watch the terminal output. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br />
<br /><br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * --><br />
<br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }}<br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Wifi&diff=4830Wifi2015-10-20T17:49:29Z<p>Jjung: </p>
<hr />
<div>{{todo| Started (10.19.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}{{#seo:|title=Wireless Networking|titlemode=append|keywords=|description=How to access a wireless network}} <span style="background:#00FF00;color:#FF0000;font-size:300%"></span>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__{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. {{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} ===Setup=== # This process requires modifying some system files so start by allowing the system to read and write. #:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} # Check for any updates. #:{{cli | username=root | hostname=ipac9x25 | opkg update }} # Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. #:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} # Install the firmware for the USB adapter. #:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} # Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. #:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} #Install the iw and wireless-tools packages. #:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} # Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. # More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. #:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} {{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} After setup of the required software is complete, the connection may be established.<br /> 1. Use iw to scan for nearby wireless networks. :{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} : This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br clear=all>2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /> <nowiki>###open network#network={# ssid="your-ssid" (optional)# scan_ssid=1# key_mgmt=NONE#} </nowiki>3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<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. 4. Highlight the psk and copy it.<br />5. 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]] <br clear=all>6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "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 connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br />:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all>:'''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. <br /> :[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br clear=all>7. 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>8. 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]] <br clear=all> <!-- {{:Templateimpl:examples | 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 WiFi adapter or built-in wireless, as well as acquiring the necessary software tools to make the connection for the first time.<br clear=all><!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * -->{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} * [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Help:Page_validation&diff=4829Help:Page validation2015-10-20T17:21:15Z<p>Jjung: </p>
<hr />
<div>{{todo| Started (10.19.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}} <br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /><br />
<nowiki><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#}<br />
</nowiki><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] <br />
<br clear=all><br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start" <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection and watch the terminal output. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br /><br />
<br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
<br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br />
<br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* --><br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Help:Page_validation&diff=4828Help:Page validation2015-10-20T17:10:27Z<p>Jjung: </p>
<hr />
<div>{{todo| NotStarted (10.19.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}} <br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connections to WPA and WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network including SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless networks with iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /><br />
<nowiki><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#}<br />
</nowiki><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] <br />
<br clear=all><br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start" <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection and watch the terminal output. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br /><br />
<br />
:'''Successful connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
<br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br />
<br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* --><br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Help:Page_validation&diff=4827Help:Page validation2015-10-20T16:47:35Z<p>Jjung: </p>
<hr />
<div>{{todo| NotStarted (10.19.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}} <br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connection to WPA AND WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network includeing SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless newtworks iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /><br />
<nowiki><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#}<br />
</nowiki><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] <br />
<br clear=all><br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start" <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection. Watch the terminal for output from the command. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br /><br />
<br />
:'''Successfull connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
<br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br />
<br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* --><br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* [[Network_Configuration | Network Configuration]]</div>Jjunghttps://wiki.emacinc.com/index.php?title=Help:Page_validation&diff=4826Help:Page validation2015-10-20T16:35:39Z<p>Jjung: </p>
<hr />
<div>{{todo| NotStarted (10.19.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,JJ }}<br />
{{#seo:<br />
|title=Wireless Networking<br />
|titlemode=append<br />
|keywords=<br />
|description=How to access a wireless network<br />
}} <br />
<span style="background:#00FF00;color:#FF0000;font-size:300%"></span><br />
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.<br />
__TOC__<br />
{{:Templateimpl:bg | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
Most modules from EMAC can be upgraded to use wireless networking via a USB adapter. The USB adapter can be purchased at the [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb ThinkPenguin] website. EMAC's SoM-200GS carrier can optionally be ordered with built-in WiFi and bluetooth. <br />
<br />
{{:Templateimpl:geninfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
===Setup=== <br />
# This process requires modifying some system files so start by allowing the system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
# Check for any updates. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg update }} <br />
# Install wpa-supplicant to allow connection to WPA AND WPA2 protected networks. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install wpa-supplicant}} <br />
# Install the firmware for the USB adapter. <br />
#:{{cli | username=root | hostname=ipac9x25 | opkg install linux-firmware-ath9k}} <br />
# Install the marvel firmware and the sd8787 firmware for built-in WiFi on the SoM-200GS. <br />
#:{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-marvel-license}}<br />{{cli | username=root | hostname=som9g45 | opkg install linux-firmware-sd8787}} <br />
#Install the iw and wireless-tools packages. <br />
#:{{cli | username=root | hostname=ipac9x25 | opgk install iw}} <br /> {{cli | username=root | hostname=ipac9x25 | opkg install wireless-tools}} <br />
# Once everything has successfully installed, reboot the system. If you're using the USB adapter, plug in the adapter upon successful login. <br />
# More configuration to system files is required to establish a connection to the network. Mount the file system to read and write. <br />
#:{{cli | username=root | hostname=ipac9x25 | mount -o remount,rw /}} <br />
<br />
{{:Templateimpl:using | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
After setup of the required software is complete, the connection may be established.<br /> <br />
1. Use iw to scan for nearby wireless networks. <br />
:{{cli | username=root | hostname=ipac9x25 | iw dev wlan0 scan}} <br />
: This will produce a list of nearby networks and detailed information about each network includeing SSID, the type of security, frequency, and signal strength. Use grep to help make identifying the SSID and signal strength easier. For the signal strength, the closer the value is to 0, the stronger the signal is.<br />
:[[File:Scanning_with_iw.png|600px|left|thumb|Terminal output of scanning for wireless newtworks iw command]] <br />
<br clear=all><br />
2. For an open network, simply uncomment the lines in /etc/wpa_supplicant.conf:<br /><br />
<nowiki><br />
###open network<br />
#network={<br />
# ssid="your-ssid" (optional)<br />
# scan_ssid=1<br />
# key_mgmt=NONE<br />
#}<br />
</nowiki><br />
3. For a WEP password protected network, use wpa_passphrase to generate the private shared key(psk).<br />
:[[File:Wpa_passphrase.png|600px|left|thumb|Terminal output when using the wpa_passphrase command]]<br />
<br clear=all><br />
: SSID is the SSID of the preferred network found when scanning with iw. Password is the password to connect to the network. <br />
4. Highlight the psk and copy it.<br /><br />
5. Edit /etc/wpa_supplicant.conf to have the appropriate SSID and psk <br /><br />
:[[File:Wpasupplicantconf.png|600px|left|thumb|Editing /etc/wpa_supplicant.conf with vim]] <br />
<br clear=all><br />
<br />
6. Make the connection to the network using the path /etc/init.d/wpa_supplicant with the argument "start" <br />
:{{cli | username=root | hostname=ipac9x25 | /etc/init.d/wpa_supplicant start}} <br />
: Give the command some time to establish the connection. Watch the terminal for output from the command. A connections has been established when output stops and the last line read "IPv6 ADDRCONF(NETDEV_CHANGE):wlan0: link becomes ready". A connection has failed if "IPv6: ADDRCONF(NETDEV_UP):wlan0: link is not ready" is seen repeatedly and output to the terminal continues. <br /><br />
<br />
:'''Successfull connection''' (waiting a full minute to ensure output to the terminal stopped); <br /> [[File:Connectionsuccess.png|600px|left|thumb|Successful connection terminal output]] <br clear=all><br />
<br />
:'''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. <br /> <br />
:[[File:Wifi_connection_failed.png|600px|left|thumb|Failed connection terminal output]] <br />
<br clear=all><br />
7. Confirm there is an IP address under wlan0 with the ifconfig command <br /> <br />
:[[File:Wlan0_ip_address.png|600px|left|thumb|ifconfig showing that wlan0 does have an IP address]] <br />
<br clear=all><br />
8. 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 /><br />
:[[File:Pingemac.png|600px|left|thumb|Sending and receiving packets from www.emacinc.com]] <br />
<br clear=all> <br />
<br />
<!-- {{:Templateimpl:examples | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} --><br />
<br />
<br />
{{:Templateimpl:conclusion | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
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.<br />
<br clear=all><br />
<br />
<!-- {{:Templateimpl:moreinfo | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* --><br />
{{:Templateimpl:whatnext | initials=JJ | title=Wireless Networking | desc=How to access a wireless network | project=OE 5.0 }} <br />
* Bluetooth</div>Jjung