Building the VT6656 Linux Driver for Ubuntu

Please note: A new version of this driver is available that does not require patching. This driver is also GPL-licensed, making it suitable for eventual inclusion in the kernel. These instructions are now obsolete. Download the updated driver source from Via Arena.

We’ve been carrying the VIA VNT6656G6A40 USB WiFi module for some time now. This is a nice, compact USB wireless module that is ideal for some applications due to the fact that it ships without the bulky plastic case and external USB connector that most consumer USB network devices do. Instead, you can simply wire it directly to an internal USB header and mount the circuit board wherever it fits inside the chassis.

The device is based on the VIA VT6656 802.11b/g chip. VIA has released several driver packages for this chip. If you run an ancient version of Fedora, you may be able to use one of the binary packages distributed with the Windows driver package; however, most users will instead need to compile the driver from source (and, in fact, you’ll also need to patch the source first).

That may sound intimidating to some users because many devices are supported by modern Linux distributions out-of-the-box. Sadly, VIA has chosen not to include a license with the VT6656 driver archive. Consequently, this device currently has no chance of being supported by popular Linux distributions due to the legal ambiguity surrounding the driver source code.

However, if you feel comfortable at the command-line prompt and are up for a little bit of work to get your device functioning, read on.

Fetching & Unpacking the Source

I’ll be building this driver on a machine running Ubuntu 7.04 (Feisty). First, create a temporary directory to work in and fetch the source archive from the VIA Arena distribution page:

The included documentation file (linux.txt) appears to be grossly out of date, and is quite useless. Ignore it.

Preparing the System to Build Kernel Modules

Our next step is to build the driver. Like all kernel modules, you must have your kernel source (or a reasonable substitute, like the kernel headers package provided by Debian and Ubuntu) present on the machine in order to build. Many users will find that the Debian/Ubuntu-specific program module-assistant provides an easy way to prepare the machine for building kernel modules:

The above error is a telling sign that the driver source is out of date with your kernel, a common problem for vendor-maintained source drivers. If your kernel is from the 2.6.20 series, you can use this trivial patch for the driver source. Apply it to your driver source thusly:

The patch introduces two new lines of code. I’m not much of a kernel hacker, so I can’t say with certainty that the fix is correct, but it did seem to work on the system I tested with.

Note that this fix is kernel-specific. I tested the same patch on an Ubuntu 7.10 (Gutsy) system (kernel version 2.6.22-14-generic), and the module failed to build. Time permitting, I’ll try to prepare a patch for this kernel version as well. The only permanent solution is for VIA to re-release the driver and include the missing license file, allowing distribution and kernel developers to maintain and ship the driver properly.

Testing & Installing

Linux kernel modules are binary files with a .ko extension. Once the driver has been built successfully, you can insert it with the insmod tool:

$ ls *.ko
vntwusb.ko
$ sudo insmod vntwusb.ko

However, you’ll probably want to install it so that it gets loaded at boot time:

Once the module has been installed, it can be loaded with modprobe (rather than using insmod):

$ sudo modprobe vntwusb

If the module is installed correctly, your system should automatically detect and load it at boot time. Once it has been loaded, you should be able to use the usual tools provided by the distribution to configure it (NetworkManager on Ubuntu).

Caveats & Conclusion

The VIA source package also includes a patched version of wpa-supplicant. I have not used this; I assume that the device driver does not behave like most other wireless drivers, making the patched version of wpa-supplicant necessary.

Compiling and using wpa-supplicant is not something I’ll cover here. Do be aware that WPA security may not be functional without this patched version.

I hope this post is helpful to folks trying to get this device working on their Linux machines.

Comments (40)

We’re only building in the “driver” subdirectory; be sure not to miss the “cd driver” command just before “make”, above.

Forest

January 7, 2008

I’ve heard complaints from some users that they are unable to successfully connect to a network using this driver, despite success scanning for local networks (using iwlist).

I did successfully connect to an open 802.11b/g network, and was able to transfer data without problems, however, users should be aware that this driver may not necessarily be completely bug-free, and may have problems with certain network environments. In particular, radio interference and slightly odd network parameters may play a role in determining success.

Joao

January 16, 2008

I have tried to compile the driver for VT6655 in Feisty using the same technique described, but I’m not skilled enough to patch the source code and fix the errors.

Can you help?

Forest

January 16, 2008

Hi Joao,

What issues are you seeing?

max

January 27, 2008

Hi,

any news about the gutsy patch?
🙂

Forest

January 28, 2008

Hi max,

Sorry, I don’t have anything ready yet. We’ve been busy around here 🙂

I’ll see what I can come up with a little later in the week.

Forest

February 4, 2008

The following patch does make the driver compile with the gutsy kernel (2.6.22-14-generic). I haven’t actually tested the functionality, though.

[…] process to the one described previously for the VT6656. You should follow the instructions from my previous post, but use the following commands to fetch, unpack, patch, and build the driver […]

Riadh

March 17, 2008

when i execute the command #insmod vntwusb.ko
i get the following:
“vntwusb: version magic ‘2.6.16.29-xen SMP 686 REGPARAM gcc-4.0’ should be ‘2.6.16.29-xen SMP 686 REGPARAM gcc-3.4’ ‘”

i d’ont know what to do.. please help

Forest

March 17, 2008

Hi Riadh,

Which distribution are you on? The kernel you are running is not a standard kernel for either Ubuntu 7.04 or Ubuntu 7.10. Perhaps you compiled it yourself?

The problem that you are seeing is that the default gcc version on your system (the one that is being used to compile the driver) is not the same version that was used to compile the kernel. Kernel modules must be compiled with the same gcc version that was used to compile the kernel itself.

Hi to all,
I have problems with this driver because my pc seems not to be able to get a IP address from wifi router even if it has DHCP on…

Forest

May 15, 2008

Hi Mirko,

Your report is the second I’ve seen that indicates issues with this driver. I suspect the driver has some quirks that prevent it from functioning correctly in some network environments. Unfortunately, there may not be much that can be done about this, except to notify VIA of the issue.

Josue

May 22, 2008

Hi there,

I’m also trying to install VT6655 WiFi on my MicroClient. I’m using ndiswrapper (v.1.45) on a Xubuntu 7.10. Initially it seems everything is working perfectly but I’m experiencing some problems when connecting remotelly to my MicroClient. To do so I’m using openSSH.

Well, the problem is that the openSSH connection goes down very often. To test what’s happening I perform an infinite ping from any computer to my MicroClient, with this result:

So the point is that my MicroClient’s WiFi is working descontinuosly and this is a huge problem if working with openSSH as after some seconds of inactivity the connection is lost.

Do you know if the problem can be related to ndiswrapper? Do you think installing the proper linux drivers would it work better?

Thank you in advance!
Josué

(I’ll post this also in the microclient’s group in google)

ni_lus

June 20, 2008

Does anyone here got a compiled one for Ubuntu 8.04 (Hardy Heron)?

I’ve tried the hardy heron patch for it but I’m still having problems. I will try it again but if anyone has a compiled one, please share…thanks in advance.

El Flavio

June 21, 2008

Any chance of a Deb file comming out for this driver? It could make it a lot more easier for installing the driver.

Forest

June 24, 2008

ni_lus, El Flavio:

Unfortunately, there is no license for these drivers, and thus distribution of binaries is not permitted. If you are dissatisfied with this situation, do feel free to let VIA know.

Anthony

July 7, 2008

Thanks for the instructions, got it working with debian 4 without much trouble, just had to unplug the usb a couple times for it to be recognized. Now all I need is to compile wpa_supplicant to go with it.

ni_lus

July 22, 2008

Thanks anyways. I tried this before but haven’t had much luck. I guess I’ll just try again, maybe there’s something I did wrong before.

Okko

July 26, 2008

Hi,

anyone had success in Ubuntu 8.04 (Hardy Heron)?

First issue I encoutered was in make:

scripts/Makefile.build:46: *** CFLAGS was changed in “Makefile”. Fix it to use EXTRA_CFLAGS. Stop.

I was able to fix this with these steps:

1) Search & replace “CFLAGS” with “EXTRA_CFLAGS” until you find the line

$(CC) $(CFLAGS) -o $@ $<

Replace that line with:
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $<

I then applied the gutsy.patch, but compiling fails with this error message:

so probably an updated patch for 8.04 is needed.
VIA hasn’t updated their source for quite some time so it is starting to look like they won’t.

Forest

July 28, 2008

ni_lus: You are trying to compile the driver for Ubuntu 8.04. As Okko notes, a new patch is necessary to make that work. The patch that I originally provided was for Ubuntu 7.10.

If time permits, we may be able to distribute a patch for Ubuntu 8.04. However, the API differences between VIA’s driver and current kernel versions continue to grow, and, as such, so does the work involved with resolving those differences and producing new patches.

Okko

August 10, 2008

VIA has updated the driver on August 8th 2008. It is available in the VIA Arena distribution page linked in the original post by Forest and appears to compile on Ubuntu 8.04 with the most recent kernel. There are a couple of warnings, though:

4. Go to terminal and locate the folder should be VT6656_WLAN_Linux_V118

Replace “BUILDING” with this:

cd VT6656_WLAN_Linux_V118
make

5. Then continue with the rest of the steps dilligently.

Hope it works for you.

Forest

March 17, 2009

@Muzammil

I haven’t tested it, but it sounds like VIA may have published a newer driver that does not require patching. You may be able to save some time by just downloading the newer driver and skipping the patch step.

Forest

March 19, 2009

Update: new driver source available is GPL-licensed and does not require patching.

Aditionally, I have issues with several APs. I cannot join them with the repeating message “WLAN_AUTHENTICATE_WAIT:wait x times!!” in the logs, where x goes from 1 to 5. Is this reception-related (too weak), or some other source of troubles? Any ideas?

flohack

December 24, 2009

UPDATE: VIA has release a new Version (1.20.03) which works for me also with Ubuntu 9.10, despite they claim its only for 9.04. Link is the same as I have already posted here in July.

Sim

September 24, 2012

Has anyone gotten the drivers working with Ubuntu 12.04? I am trying to install v1.20.03 and get an error right away:

This WiFi card used to work, until i made a mistake of upgrading to 12.04 (my previous 9.xx isn’t supported anymore).
Now it’s been 4 days since i’ve started looking for a solution and i’m still unable to fix the driver issue.
If anyone reading this had success installing this card for 12.04 please let me know.