diff --git a/boards/beagleplay/connect-wifi.rst b/boards/beagleplay/connect-wifi.rst index 0e04f20402289375e2a64b58ac4cc4a6dd2de934..ea405122d443bec317b4e40dd2adc131a32639fc 100644 --- a/boards/beagleplay/connect-wifi.rst +++ b/boards/beagleplay/connect-wifi.rst @@ -9,8 +9,8 @@ wpa_gui Simplest way to connect to WiFi is to use ``wpa_gui`` tool pre-installed on your BeaglePlay. Follow simple steps below to connect to any WiFi access point. -Step1. Starting wpa_gui -======================== +Step 1: Starting wpa_gui +========================= You can start ``wpa_gui`` either from ``Applications > Internet > wpa_gui`` or double click on the ``wpa_gui`` desktop application shortcut. @@ -26,10 +26,10 @@ You can start ``wpa_gui`` either from ``Applications > Internet > wpa_gui`` or d Starting wpa_gui from Desktop application shortcut -Step2. Understanding wpa_gui interface -======================================= +Step 2: Understanding wpa_gui interface +======================================== -The ``wpa_gui`` interface is very simple to understand and use. +Let's see the ``wpa_gui`` interface in detail, 1. ``Adapter`` is the WiFi interface device, it should be ``wlan0`` (on-board WiFi) by default. 2. ``Network`` shows the WiFi access point ``SSID`` if you are connected to that network. @@ -45,8 +45,8 @@ The ``wpa_gui`` interface is very simple to understand and use. wpa_gui interface -Step3. Scanning & Connecting to WiFi access points -=================================================== +Step 3: Scanning & Connecting to WiFi access points +==================================================== To scan the WiFi access points around you, just click on ``Scan`` button availale under ``wpa_gui > Current Status > Scan``. @@ -62,7 +62,7 @@ A new window will open up with, 1. SSID (WiFi name) 2. BSSID 3. Frequency -4. Signal strenght +4. Signal strength 5. flags Now, you just have to double click on the Network you want to connect to as shown below. @@ -86,3 +86,105 @@ your board to WiFi (if password is correct). :alt: Connecting to WiFi access point Connecting to WiFi access point + +wpa_cli +******** + +Another way of connecting to a WiFi access point is to use ``wpa_cli`` tool. + + +Step 1: Open up terminal +========================= + +Open up a terminal window either from ``Applications > Terminal Emulator`` Or from Task Manager. + +.. figure:: images/wpa_cli_step1a.jpg + :align: center + :alt: Open terminal from Applications > Terminal Emulator + + Open terminal from Applications > Terminal Emulator + +.. figure:: images/wpa_cli_step1b.jpg + :align: center + :alt: Open terminal from Task Manager + + Open terminal from Task Manager + +Step 2: Setup credentials +========================= + +To setup credentials of your WiFi access point follow these steps, + +1. Execute ``sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf``, +which will open up ``wpa_supplicant-wlan0.conf`` inside ``nano`` (terminal based) text editor. +2. Edit ``wpa_supplicant-wlan0.conf`` to add SSID (WiFi name) & PSK (WiFi password) of your WiFi access point. + +.. code-block:: + + .... + network={ + ssid="WiFi Name" + psk="WiFi Password" + .... + } + +3. Now save the details using ``ctrl + O`` then enter. +4. To exit out of the ``nano`` text editor use ``ctrl + X``. + +.. figure:: images/wpa_cli_step2a.jpg + :align: center + :alt: Run: $ sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf + + Run: $ sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf + +.. figure:: images/wpa_cli_step2b.jpg + :align: center + :alt: Add SSID and PSK + + Add SSID and PSK + +.. figure:: images/wpa_cli_step2c.jpg + :align: center + :alt: Save credentials and Exit + + Save credentials (ctrl + O) and Exit (ctrl + X) + +Step 3: Reconfigure wlan0 +========================= + +The WiFi doesn't automatically connect to your WiFi access point +after you add the credentials to ``wpa_supplicant-wlan0.conf``. + +1. To connect you can either execute ``sudo wpa_cli -i wlan0 reconfigure`` +2. Or Reboot your device by executing ``reboot`` inside your terminal window. +3. Execute ``ping 8.8.8.8`` to check your connection. Use ``ctrl + C`` to quit. + +.. code-block:: shell + + debian@BeaglePlay:~$ ping 8.8.8.8 + PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. + 64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=5.83 ms + 64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=7.27 ms + 64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=5.30 ms + 64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=5.28 ms + 64 bytes from 8.8.8.8: icmp_seq=5 ttl=118 time=9.04 ms + 64 bytes from 8.8.8.8: icmp_seq=6 ttl=118 time=7.52 ms + 64 bytes from 8.8.8.8: icmp_seq=7 ttl=118 time=5.39 ms + 64 bytes from 8.8.8.8: icmp_seq=8 ttl=118 time=5.94 ms + ^C + --- 8.8.8.8 ping statistics --- + 8 packets transmitted, 8 received, 0% packet loss, time 7008ms + rtt min/avg/max/mdev = 5.281/6.445/9.043/1.274 ms + + +.. figure:: images/wpa_cli_step3a.jpg + :align: center + :alt: Connect to WiFi by running $ sudo wpa_cli -i wlan0 reconfigure + + Connect to WiFi by running $ sudo wpa_cli -i wlan0 reconfigure + +.. figure:: images/wpa_cli_step3b.jpg + :align: center + :alt: To check connection try running $ ping 8.8.8.8 + + To check connection try running $ ping 8.8.8.8 \ No newline at end of file diff --git a/boards/beagleplay/images/wpa_cli_step1a.jpg b/boards/beagleplay/images/wpa_cli_step1a.jpg new file mode 100644 index 0000000000000000000000000000000000000000..386f4f4a01b67fb0cb4242a7fde3e51568efc1ca Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step1a.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step1b.jpg b/boards/beagleplay/images/wpa_cli_step1b.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0efbad6130a7fb53acb39965f49f828e5cf40bbe Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step1b.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step2a.jpg b/boards/beagleplay/images/wpa_cli_step2a.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1e0d547ca6f7db8ceecbc67a3216f7de2d05def9 Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step2a.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step2b.jpg b/boards/beagleplay/images/wpa_cli_step2b.jpg new file mode 100644 index 0000000000000000000000000000000000000000..81e076e93352ced2243911c0b9e104ae267cc1cc Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step2b.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step2c.jpg b/boards/beagleplay/images/wpa_cli_step2c.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a11331b2781a065c6a61ee4d4014860978a87edc Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step2c.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step3a.jpg b/boards/beagleplay/images/wpa_cli_step3a.jpg new file mode 100644 index 0000000000000000000000000000000000000000..249729dffe528e372092365bdcb8a369e210f615 Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step3a.jpg differ diff --git a/boards/beagleplay/images/wpa_cli_step3b.jpg b/boards/beagleplay/images/wpa_cli_step3b.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7ce3d5aaff7d85dac5dcce748a716604b6097bdd Binary files /dev/null and b/boards/beagleplay/images/wpa_cli_step3b.jpg differ