Intel Galileo 2 with USB WiFi Dongle (RT3070)

The WiFi dongle I am using here is Edimax EW-7711UMn

Here I will talk about how to use it on Intel Galileo 2

prerequisite

Install Linux on Intel Galileo 2

Establish communication through terminal

Step 1.

This USB Wifi dongle is supported by Intel Galileo 2, so we don’t need to install driver.

Just plugin it on the board.

$ iwconfig

Find the dongle identifier as “wlp0s20f3u1”

螢幕快照 2015-10-11 21.00.31

The example here is based on WPA WiFi Router

killall wpa_supplicant
ifconfig wlp0s20f3u1 up
wpa_passphrase "YOUR ESSID" "YOUR PASSWORD" > /tmp/wpa.conf 
wpa_supplicant -BDwext -i YOURWIFIIDENTIFIER -c/tmp/wpa.conf

Then you will see “Successfully initialized wpa_supplicant”

If it appears “ifconfig: SIOCSIFFLAGS: Operation not possible due to RF-kill”, when you are entering “ifconfig wlp0s20f3u1 up”.

rfkill unblock all

You can scan to search nearby SSID

iwlist YOURWIFIIDENTIFIER scan

Make a file “udhcpc.sh” in /etc as below code

#!/bin/sh
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

case "$1" in
  deconfig)
    /sbin/ifconfig $interface 0.0.0.0
    ;;

  renew|bound)
    /sbin/ifconfig $interface $ip $BROADCAST $NETMASK

    if [ -n "$router" ] ; then
      echo "deleting routers"
      while route del default gw 0.0.0.0 dev $interface ; do
        :
      done

      for i in $router ; do
        route add default gw $i dev $interface
      done
    fi

   echo -n > $RESOLV_CONF
    [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
    for i in $dns ; do
     echo adding dns $i
      echo nameserver $i >> $RESOLV_CONF
    done
    ;;
esac
exit 0

Then run

udhcpc -i YOURWIFIIDENTIFIER -p /var/run/udhcpc.pid -S -s /etc/udhcpc.sh

You will see like this

螢幕快照 2015-10-11 21.15.59

It works now!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s