jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Wifi Dongle Driver

Wed Nov 27, 2013 6:30 pm

Hi, I'm new to Linux and would like to install the driver for my RT8171L WiFi dongle.
Please help me install these drivers

Manual (not much help)

Doesn't work with built in Raspbian Utilities

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Wifi Dongle Driver

Wed Nov 27, 2013 8:11 pm

You shouldn't need to bother with any of that, the driver is simple to install. If you can get a wired internet connection on the Pi, just run:

Code: Select all

sudo apt-get update
sudo apt-get install firmware-ralink

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Thu Nov 28, 2013 12:01 am

Thanks I'll try that

MrEngman
Posts: 4056
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi Dongle Driver

Thu Nov 28, 2013 12:24 am

hunternet93 wrote:You shouldn't need to bother with any of that, the driver is simple to install. If you can get a wired internet connection on the Pi, just run:

Code: Select all

sudo apt-get update
sudo apt-get install firmware-ralink
Hi jdbman,

Don't think that's going to help. The RT8171L or what it really is as far as I know is a Realtek module so Ralink firmware won't help.

Would be helpful to have a few more details. With the wifi dongle connected to the Pi what is the output of the following commands

Code: Select all

lsusb
lsmod
ifconfig
uname -a
MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Wifi Dongle Driver

Thu Nov 28, 2013 12:45 am

Sorry, my bad. That should've been:

Code: Select all

sudo apt-get install firmware-realtek

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Thu Nov 28, 2013 12:53 am

Tried and it was already latest version, When using WPA_gui I get error unable to initiate AP scan

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Wifi Dongle Driver

Thu Nov 28, 2013 12:58 am

Post the output of the below commands:

Code: Select all

ip link
iw list
lsmod
The first will list all of your Pi's network interfaces, the second will list the capabilities of any wireless network interfaces, and the third will list all the kernel modules (drivers, basically) currently loaded.

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Mon Dec 23, 2013 8:27 pm

Sorry about the delay.
USB adapter for the pi blew. :(
Had to order a new one.
Will post when i'm done running an ffmpeg installation script for another project.

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Tue Dec 24, 2013 2:25 pm

Here

Code: Select all

root@serverpi:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether b8:27:eb:6e:fb:7d brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT qlen 1000
    link/ether 00:0f:12:77:13:f2 brd ff:ff:ff:ff:ff:ff
root@serverpi:~# iw link
Usage:  iw [options] command
Options:
        --debug         enable netlink debugging
        --version       show version (3.4)
Commands:
        help [command]
                Print usage for all or a specific command, e.g.
                "help wowlan" or "help wowlan enable".

        event [-t] [-r] [-f]
                Monitor events from the kernel.
                -t - print timestamp
                -r - print relative timstamp
                -f - print full frame for auth/assoc etc.

        phy
        list
                List all wireless devices and their capabilities.

        phy <phyname> info
                Show capabilities for the specified wireless device.

        dev
                List all network interfaces for wireless hardware.

        dev <devname> info
                Show information for this interface.

        dev <devname> del
                Remove this virtual interface

        dev <devname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*]
        phy <phyname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*]
                Add a new virtual interface with the given configuration.
                Valid interface types are: managed, ibss, monitor, mesh, wds.

                The flags are only used for monitor interfaces, valid flags are:
                none:     no special flags
                fcsfail:  show frames with FCS errors
                control:  show control frames
                otherbss: show frames from other BSSes
                cook:     use cooked mode

                The mesh_id is used only for mesh mode.

        dev <devname> ibss join <SSID> <freq in MHz> [HT20|HT40+|HT40-|NOHT] [fixed-freq] [<fixed bssid>] [beacon-interval <TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]
                Join the IBSS cell with the given SSID, if it doesn't exist create
                it on the given frequency. When fixed frequency is requested, don't
                join/create a cell on a different frequency. When a fixed BSSID is
                requested use that BSSID and do not adopt another cell's BSSID even
                if it has higher TSF and the same SSID. If an IBSS is created, create
                it with the specified basic-rates, multicast-rate and beacon-interval.

        dev <devname> ibss leave
                Leave the current IBSS cell.

        dev <devname> station set <MAC address> vlan <ifindex>
                Set an AP VLAN for this station.

        dev <devname> station set <MAC address> plink_action <open|block>
                Set mesh peer link action for this station (peer).

        dev <devname> station dump
                List all stations known, e.g. the AP on managed interfaces

        dev <devname> station del <MAC address>
                Remove the given station entry (use with caution!)

        dev <devname> station get <MAC address>
                Get information for a specific station.

        dev <devname> survey dump
                List all gathered channel survey data

        dev <devname> mesh leave
                Leave a mesh.

        dev <devname> mesh join <mesh ID> [mcast-rate <rate in Mbps>] [<param>=<value>]*
                Join a mesh with the given mesh ID with mcast-rate and mesh parameters.

        dev <devname> mpath dump
                List known mesh paths.

        dev <devname> mpath set <destination MAC address> next_hop <next hop MAC address>
                Set an existing mesh path's next hop.

        dev <devname> mpath new <destination MAC address> next_hop <next hop MAC address>
                Create a new mesh path (instead of relying on automatic discovery).

        dev <devname> mpath del <MAC address>
                Remove the mesh path to the given node.

        dev <devname> mpath get <MAC address>
                Get information on mesh path to the given node.

        dev <devname> scan [-u] [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|passive]
                Scan on the given frequencies and probe for the given SSIDs
                (or wildcard if not given) unless passive scanning is requested.
                If -u is specified print unknown data in the scan results.
                Specified (vendor) IEs must be well-formed.

        dev <devname> scan trigger [freq <freq>*] [ies <hex as 00:11:..>] [ssid <ssid>*|passive]
                Trigger a scan on the given frequencies with probing for the given
                SSIDs (or wildcard if not given) unless passive scanning is requested.

        dev <devname> scan dump [-u]
                Dump the current scan results. If -u is specified, print unknown
                data in scan results.

        reg get
                Print out the kernel's current regulatory domain information.

        reg set <ISO/IEC 3166-1 alpha2>
                Notify the kernel about the current regulatory domain.

        dev <devname> connect [-w] <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1:6162636465]
                Join the network with the given SSID (and frequency, BSSID).
                With -w, wait for the connect to finish or fail.

        dev <devname> disconnect
                Disconnect from the current network.

        dev <devname> link
                Print information about the current link, if any.

        dev <devname> offchannel <freq> <duration>
                Leave operating channel and go to the given channel for a while.

        dev <devname> cqm rssi <threshold|off> [<hysteresis>]
                Set connection quality monitor RSSI threshold.


        phy <phyname> wowlan show
                Show WoWLAN status.

        phy <phyname> wowlan disable
                Disable WoWLAN.

        phy <phyname> wowlan enable [any] [disconnect] [magic-packet] [gtk-rekey-failure] [eap-identity-request] [4way-handshake] [rfkill-release] [patterns <pattern>*]
                Enable WoWLAN with the given triggers.
                Each pattern is given as a bytestring with '-' in places where any byte
                may be present, e.g. 00:11:22:-:44 will match 00:11:22:33:44 and
                00:11:22:33:ff:44 etc.

        dev <devname> roc start <freq> <time>


        phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
                Set a bitmap of allowed antennas to use for TX and RX.
                The driver may reject antenna configurations it cannot support.

        dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]
                Specify transmit power level and setting type.

        phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
                Specify transmit power level and setting type.

        phy <phyname> set distance <distance>
                Set appropriate coverage class for given link distance in meters.
                Valid values: 0 - 114750

        phy <phyname> set coverage <coverage class>
                Set coverage class (1 for every 3 usec of air propagation time).
                Valid values: 0 - 255.

        phy <phyname> set netns <pid>
                Put this wireless device into a different network namespace

        phy <phyname> set rts <rts threshold|off>
                Set rts threshold.

        phy <phyname> set frag <fragmentation threshold|off>
                Set fragmentation threshold.

        dev <devname> set channel <channel> [HT20|HT40+|HT40-]
        phy <phyname> set channel <channel> [HT20|HT40+|HT40-]
        dev <devname> set freq <freq> [HT20|HT40+|HT40-]
        phy <phyname> set freq <freq> [HT20|HT40+|HT40-]
                Set frequency/channel the hardware is using, including HT
                configuration.

        phy <phyname> set name <new name>
                Rename this wireless device.

        dev <devname> set peer <MAC address>
                Set interface WDS peer.

        dev <devname> set noack_map <map>
                Set the NoAck map for the TIDs. (0x0009 = BE, 0x0006 = BK, 0x0030 = VI, 0x00C0 = VO)

        dev <devname> set 4addr <on|off>
                Set interface 4addr (WDS) mode.

        dev <devname> set type <type>
                Set interface type/mode.
                Valid interface types are: managed, ibss, monitor, mesh, wds.

        dev <devname> set meshid <meshid>
        dev <devname> set monitor <flag>*
                Set monitor flags. Valid flags are:
                none:     no special flags
                fcsfail:  show frames with FCS errors
                control:  show control frames
                otherbss: show frames from other BSSes
                cook:     use cooked mode

        dev <devname> set mesh_param <param>=<value> [<param>=<value>]*
                Set mesh parameter (run command without any to see available ones).

        dev <devname> set power_save <on|off>
                Set power save state to on or off.

        dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*] [mcs-<2.4|5> <MCS index>*]
                Sets up the specified rate masks.
                Not passing any arguments would clear the existing mask (if any).

        dev <devname> get mesh_param [<param>]
                Retrieve mesh parameter (run command without any to see available ones).

        dev <devname> get power_save <param>
                Retrieve power save state.


You can omit the 'phy' or 'dev' if the identification is unique,
e.g. "iw wlan0 info" or "iw phy0 info". (Don't when scripting.)

Do NOT screenscrape this tool, we don't consider its output stable.

root@serverpi:~# lsmod
Module                  Size  Used by
snd_bcm2835            16304  0
snd_pcm                77560  1 snd_bcm2835
snd_seq                53329  0
snd_timer              19998  2 snd_pcm,snd_seq
snd_seq_device          6438  1 snd_seq
snd                    58447  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
snd_page_alloc          5145  1 snd_pcm
arc4                    1676  2
rtl8187                51043  0
mac80211              273413  1 rtl8187
cfg80211              184163  2 mac80211,rtl8187
rfkill                 18202  2 cfg80211
eeprom_93cx6            2968  1 rtl8187
leds_gpio               2235  0
led_class               3562  2 leds_gpio,rtl8187
root@serverpi:~#

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Tue Dec 24, 2013 2:29 pm

And here

Code: Select all

root@serverpi:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter
root@serverpi:~# lsmod
Module                  Size  Used by
snd_bcm2835            16304  0
snd_pcm                77560  1 snd_bcm2835
snd_seq                53329  0
snd_timer              19998  2 snd_pcm,snd_seq
snd_seq_device          6438  1 snd_seq
snd                    58447  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
snd_page_alloc          5145  1 snd_pcm
arc4                    1676  2
rtl8187                51043  0
mac80211              273413  1 rtl8187
cfg80211              184163  2 mac80211,rtl8187
rfkill                 18202  2 cfg80211
eeprom_93cx6            2968  1 rtl8187
leds_gpio               2235  0
led_class               3562  2 leds_gpio,rtl8187
root@serverpi:~# ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:6e:fb:7d
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:996 errors:0 dropped:0 overruns:0 frame:0
          TX packets:625 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:148213 (144.7 KiB)  TX bytes:107223 (104.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:0f:12:77:13:f2
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@serverpi:~# uname -a
Linux serverpi 3.6.11+ #456 PREEMPT Mon May 20 17:42:15 BST 2013 armv6l GNU/Linux
root@serverpi:~#

MrEngman
Posts: 4056
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi Dongle Driver

Tue Dec 24, 2013 3:20 pm

Looks like the driver is loaded OK and the wifi adaptor is recognised alright. You need to set up the file /etc/network/interfaces to get it connected using command

Code: Select all

sudo nano /etc/network/interfaces
to edit the file.

If your network uses WPA/WPA2 security try

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "network-name"
wpa-psk "network-password"
If the network uses WEP security change

Code: Select all

wpa-ssid "network-name"
wpa-psk "network-password"
with quotation marks to

Code: Select all

wireless-essid network-name
wireless-key network-password
without quotation marks.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

jbdman
Posts: 8
Joined: Sun Jun 23, 2013 10:25 am

Re: Wifi Dongle Driver

Tue Dec 24, 2013 3:52 pm

Thanks I will try that when my Christmas party is over.
Happy Holidays

Return to “Beginners”