1 (edited by Serxio.Sierra 2015-11-10 23:02:51)

Topic: Atlas3D working with Edimax EW-7811UN WIFI dongle tutorial

The Raspberry PI of the Atlas3D can be used also with the Edimax EW-7811UN WIFI dongle that does not require to install any driver or specific configuration. It is detected automatically by Raspbian. The following instructions were tested with a Raspberry PI B+ and a Raspberry PI 2 using the Edimax WIFI dongle with Raspbian Jessie version (released on 2015-09-24). Also with the Raspberry PI 2 installed in my ATLAS 3D Scanner.

Only two files are needed to be modified to the correct detection of your WIFI network:
- /etc/network/interfaces
- /etc/wpa_supplicant/wpa_supplicant.conf

Please be careful about what changes you make in those files because in case of error you could not access through LAN or WIFI, requiring you access your Raspberry PI using a keyboard and HDMI monitor to reconfigure those files correctly.

Here are my files. I have configured both LAN Ethernet connection and WIFI connection assigning static IP addresses (not dynamic) so I know always what is the IP to access to my Raspberry/Atlas3D. For the WIFI connection I configured WPA encryption. If you desire to use dynamic IP you only have to uncomment the line that says "dhcp" and comment the rest 4 lines after this.


FILE #1 /etc/network/interfaces

We can edit the file with nano editor:

$sudo nano /etc/network/interfaces

An example of the content could be this. You have to change the IP addresses by the desired ones. Please note that firstly the Ethernet LAN device (eth0) is configured and then the WIFI device (wlan0). I have left the comments that could be useful in future.

auto lo
iface lo inet loopback

#auto eth0
#allow-hotplug eth0
#iface eth0 inet manual
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1

#auto wlan0
allow-hotplug wlan0
#iface wlan0 inet manual
#iface wlan0 inet dhcp
iface wlan0 inet static
address 192.168.1.102
netmask 255.255.255.0
gateway 192.168.1.1

pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B -P /var/log/wpa_supplicant.wlan0.pid
post-down killall -q wpa_supplicant

Regarding the last lines note that the pre-up wpa_supplicant line ends with the part ended as ...wlan0.pid. It is the same line. Maybe your browser splits it wrongly in two lines.


FILE #2 /etc/wpa_supplicant/wpa_supplicant.conf

We also can edit it using nano editor:

$sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

With a similar content like this:

ctrl_interface=DIR=/var/log/wpa_supplicant GROUP=netdev
update_config=1

network={
        key_mgmt=NONE
}

network={
        ssid="YOUR_SSID"
        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=yyyyyyyyyyyy
}

Please note that yyyyyyyyyyyy is a generated WPA passphrase from your original WIFI network password. To create this you have to run the following commands (in fact the last one):

$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install raspberrypi-bootloader
$apt-get install wpasupplicant

$sudo sh -c 'wpa_passphrase YOUR_SSID "xxxxxxxx" '

where "xxxxxxxx" is the original password of your WIFI network. Please be careful to close the quotes. With the passphrase generated you only have to add it to the wpa_supplicant.conf file.

Hope this tutorial helps if you want to test your ATLAS 3D with the Edimax WIFI dongle. It works like a charm for me although I have not checked if all instructions are needed.

In a next tutorial I will explain how to install and configure a tight VNC server in your ATLAS 3D Raspberry PI to access remotely without a keyboard neither monitor. It allows to explore and use your Raspberry PI in another way (not only like the core of the Atlas 3D Scanner).

Regards
Serxio Sierra