NeoReel
Posts: 28
Joined: Wed Sep 18, 2019 7:43 pm

Using D-Link Wifi dongle with pi

Sun Nov 17, 2019 10:14 pm

Greetings,

I have acquired a D-Link DWA-181 USB wifi dongle, for which the Linux driver can be downloaded here: http://support.dlink.ca/ProductInfo.aspx?m=DWA-181

In the release notes, they say that this dongle only supports kernel 3.11~4.15, so I have downgraded my kernel to 4.14.98-v7+ (I can confirm the version using uname -r).

The downloaded driver DWA-181_REVA_DRIVER_LINUX_5.6.1.5\rtl88x2BU_WiFi_linux_v5.6.1.5_33902.20190604_COEX20180928-6a6a folder contains a Makefile. I understand I should be using sudo make followed by sudo install, but when I run sudo make, I get the following output:

Code: Select all

/bin/sh: 1: bc: not found
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.14.98-v7+/build M=/home/pi/dlinkUSB/rtl88x2BU_WiFi_linux_v5.6.1.5_33902.20190604_COEX20180928-6a6a  modules
make[1]: Entering directory '/lib/modules/4.14.98-v7+/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/4.14.98-v7+/build'
make: *** [Makefile:2245: modules] Error 2
How can I get the kernel modules and resolve this error?

Any help would be appreciated.

Thank you!

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: Using D-Link Wifi dongle with pi

Mon Nov 18, 2019 8:50 am

NeoReel wrote:
Sun Nov 17, 2019 10:14 pm
Greetings,

I have acquired a D-Link DWA-181 USB wifi dongle, for which the Linux driver can be downloaded here: http://support.dlink.ca/ProductInfo.aspx?m=DWA-181

In the release notes, they say that this dongle only supports kernel 3.11~4.15, so I have downgraded my kernel to 4.14.98-v7+ (I can confirm the version using uname -r).

The downloaded driver DWA-181_REVA_DRIVER_LINUX_5.6.1.5\rtl88x2BU_WiFi_linux_v5.6.1.5_33902.20190604_COEX20180928-6a6a folder contains a Makefile. I understand I should be using sudo make followed by sudo install, but when I run sudo make, I get the following output:

Code: Select all

/bin/sh: 1: bc: not found
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.14.98-v7+/build M=/home/pi/dlinkUSB/rtl88x2BU_WiFi_linux_v5.6.1.5_33902.20190604_COEX20180928-6a6a  modules
make[1]: Entering directory '/lib/modules/4.14.98-v7+/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/4.14.98-v7+/build'
make: *** [Makefile:2245: modules] Error 2
How can I get the kernel modules and resolve this error?

Any help would be appreciated.

Thank you!

The driver though for Linux is it actually for machines running x86 CPU Architecture ?


There is a poster on these forums who has compiled various drivers for Realtek Chipsets, the instructions are "universal" as per this post, providing you are running Raspbian:

https://www.raspberrypi.org/forums/view ... 5#p1136676
Take what I advise as advice not the utopian holy grail, and it is gratis !!

NeoReel
Posts: 28
Joined: Wed Sep 18, 2019 7:43 pm

Re: Using D-Link Wifi dongle with pi

Mon Nov 18, 2019 3:53 pm

Thank you! The link you provided could not find/install my particular driver, but you put me on the right track!

All I had to do was to follow this tutorial http://www.embeddedpi.com/documentation ... tall-guide to install the kernel source with rpi-source, and then use

Code: Select all

sudo nano Makefile
to change the driver's makefile

Code: Select all

ARCH ?= $(SUBARCH)
to

Code: Select all

ARCH := arm
Then the driver would compile, and all I needed to do was

Code: Select all

sudo make
sudo make install
sudo reboot -h now
Cheers!
Last edited by NeoReel on Mon Nov 18, 2019 4:37 pm, edited 1 time in total.

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

Re: Using D-Link Wifi dongle with pi

Mon Nov 18, 2019 4:20 pm

Hi NeoReel,

Can you post the output of the command lsusb to show your wifi adapter details so I can update the drivers I compile to handle it.

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

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

NeoReel
Posts: 28
Joined: Wed Sep 18, 2019 7:43 pm

Re: Using D-Link Wifi dongle with pi

Mon Nov 18, 2019 4:25 pm

Sure thing!
lsusb returns:

Code: Select all

Bus 001 Device 004: ID 2001:331e D-Link Corp.
which is a DWA-181, and the ouput compiled driver is 88x2bu.ko
Hope this helps!

Let me know when you have an update ready! Your tool is much more intuitive than recompiling kernel modules!

Thank you!

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

Re: Using D-Link Wifi dongle with pi

Mon Nov 18, 2019 5:04 pm

NeoReel wrote:
Mon Nov 18, 2019 4:25 pm
Sure thing!
lsusb returns:

Code: Select all

Bus 001 Device 004: ID 2001:331e D-Link Corp.
which is a DWA-181, and the ouput compiled driver is 88x2bu.ko
Hope this helps!

Let me know when you have an update ready! Your tool is much more intuitive than recompiling kernel modules!

Thank you!
Thanks,


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

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

Petefln
Posts: 2
Joined: Thu Jan 09, 2020 5:01 am

Re: Using D-Link Wifi dongle with pi

Fri Jan 10, 2020 6:05 am

Hi MrEngman,
I too am in need of a driver for the DWA-181.
I've tried the method listed above to no avail. Is it possible to have the driver added to your installation tool?
Thanks,

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

Re: Using D-Link Wifi dongle with pi

Fri Jan 10, 2020 2:52 pm

Petefln wrote:
Fri Jan 10, 2020 6:05 am
Hi MrEngman,
I too am in need of a driver for the DWA-181.
I've tried the method listed above to no avail. Is it possible to have the driver added to your installation tool?
Thanks,
I have updated my install-wifi script to handle this wifi module. You can download and install the script using commands

Code: Select all

sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
Command sudo install-wifi should download and install the driver for your wifi. Command sudo install-wifi -h will show details on how you can use the script.

This assumes you are using the Raspbian OS on your PI as the drivers I ccompile are only for use with Raspbian.


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

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

Petefln
Posts: 2
Joined: Thu Jan 09, 2020 5:01 am

Re: Using D-Link Wifi dongle with pi

Sat Jan 11, 2020 4:36 am

You Sir, are a gentleman and a scholar.
Your installation tool worked like a charm.
Thank you for your efforts.
Cheers.

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

Re: Using D-Link Wifi dongle with pi

Sat Jan 11, 2020 9:16 am

Petefln wrote:
Sat Jan 11, 2020 4:36 am
You Sir, are a gentleman and a scholar.
Your installation tool worked like a charm.
Thank you for your efforts.
Cheers.
Thank you, glad to be able to help you.

Have fun with your Pi.


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

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

njmurarka
Posts: 1
Joined: Sun Jan 03, 2021 8:38 am

Re: Using D-Link Wifi dongle with pi

Sun Jan 03, 2021 8:39 am

Fantastic. You are amazing. I installed your tool and it magically got my device driver installed and brought my WiFi up. Amazing!

Return to “General discussion”