Electrum

USB WLAN

Discussions about Micromint Electrum SBCs based on the the Atmel AT91SAM9 ARM9.

Moderator: support

USB WLAN

Postby ufechner » Thu Nov 24, 2011 5:39 pm

Hello,

today we had our first successfull flight with our new Electrum 100 flight control computer :D (an older video you can see here: http://www.youtube.com/watch?v=mChu9MxDeIA )

We aquired analog sensor data (three channels), logged this data and sent it down to the ground using an XBee wireless link.

This XBee connection is not very good (many package losses and slow data rate), therefore we would like to try an 802.11N USB Wifi adapter. Do you think, that the following adapter would work:
https://www.thinkpenguin.com/gnu-linux/ ... nu-support

Or do you know any other 802.11N adapter, that works with the electrum 100? I would prefer a 5 Ghz adapter, but more important for us is, that the adapter supports two external antennas.

Best regards:

Uwe Fechner
ufechner
 
Posts: 29
Joined: Sun Feb 20, 2011 10:04 pm

Re: USB WLAN

Postby jalvarez » Fri Nov 25, 2011 10:34 am

Glad to learn your project is going well and thanks for posting a URL to your video.

There are suggestions on compatible USB Wifi devices and setup instructions on our Wiki.

http://wiki.micromint.com/index.php/Usi ... B_Adapters

The tested devices implement 802.11g and use the rt73usb and zd1211rw drivers which are relatively popular. We have not tested the 802.11n device you mention and have not previously heard of Penguin Systems. Most other USB Wifi drivers supported by x86 Linux should also be supported by ARM Linux. Using established networking vendors (such as Cisco/Linksys, SMC, etc) tends to work better in the long term. These are two popular Linux USB Wifi compatibility lists.

http://linux-wless.passys.nl/query_host ... hostif=USB

http://linuxwireless.org/en/users/Devices/USB

Note that the kernels distributed by Micromint starting with version 2.6.33.5 already include the kernel wifi configuration listed in the Wiki article. The suggestions are meant for older builds or for developers that do their own kernel configs.
Regards,
Jesus Alvarez
Micromint USA
jalvarez
 
Posts: 89
Joined: Thu Feb 17, 2011 8:50 am
Location: Lake Mary, FL

Re: USB WLAN

Postby jalvarez » Fri Nov 25, 2011 11:04 am

Another wifi alternative some customers have used is to connect an external wifi router via the Ethernet port. That requires more space, power and cost than USB wifi, but makes your dual antenna requirement more feasible. Some USB wifi adapters support a single external antenna, but I am not aware of any that supports dual antennas.
Regards,
Jesus Alvarez
Micromint USA
jalvarez
 
Posts: 89
Joined: Thu Feb 17, 2011 8:50 am
Location: Lake Mary, FL

Re: USB WLAN

Postby ufechner » Thu Dec 29, 2011 8:47 pm

You wrote:
but I am not aware of any that supports dual antennas.

Well, I ordered the Ubiquiti SR71USB (it has two connectors for external antennas). But I didn't receive it yet.

For now, I want to make the Sitecom WLA-5000 WLAN-n adapter work. It uses the Ralink RT3572 chipset. It works fine on Ubuntu 11.04, using the kernel 3.2.RC, after I downloaded the original firmware from the website of the manufacturer.
On the desktop, I am using the rt2800usb kernel driver.
(See also: http://wiki.debian.org/rt2800usb )

But the driver, that is included in the 2.6.33.5 kernel does not support the RT3572 chipset. How can I compile a newer driver for the 2.6.33.5 kernel?

Regards:

Uwe Fechner
ufechner
 
Posts: 29
Joined: Sun Feb 20, 2011 10:04 pm

Re: USB WLAN

Postby jalvarez » Fri Dec 30, 2011 2:18 am

According to the link you posted, the rt3572 driver is enabled in experimental mode since kernel version 2.6.38-5 and apparently is stable since kernel version 3.0.

The Atmel AT91 drivers support kernel versions up to 2.6.38. There are experimental AT91 drivers for 3.2 kernels but they are still not stable. It will likely be a few more months before Atmel releases their AT91 drivers for 3.2 kernels. Micromint will not provide support for 3.2 kernels with the Electrum 100 until the AT91 drivers are stable.

If you need a wifi driver that requires a 3.2 kernel you will need to patch the 3.2 kernel sources with the experimental AT91 drivers, the Electrum configuration and board file. All the source code is available so it is feasible, but would require good understanding of the source code and structure, together with a significant amount of time.

Note that the 3.x kernels are still under active development and are updated several times per month. The 3.2 kernel is in rc (release candidate) state and not considered stable. You will likely require frequent source updates if you move to a 3.x kernel at this time.

Backporting a driver for a 3.2 kernel to a 2.6 kernel may be feasible, particularly if the driver does not make any calls specific to the newer kernel. There are no backporting procedures that work with all drivers. Usually it is not just a matter of copying files and rebuilding. Some source changes and debugging are probably required.

Using a wifi driver supported with 2.6 kernels would certainly be simpler.
Regards,
Jesus Alvarez
Micromint USA
jalvarez
 
Posts: 89
Joined: Thu Feb 17, 2011 8:50 am
Location: Lake Mary, FL

Re: USB WLAN

Postby ufechner » Sun Jan 01, 2012 10:31 am

Hello,
I compiled the rt2800usb driver for kernel 2.6.35 using the backports from compat-wireless (drivers from kernel 3.1):
http://linuxwireless.org/en/users/Download

I can load the driver:

Code: Select all
ufechner@delphi:~/00Software/electrum100/linux-2.6.33.5-at91$ sudo modprobe -v rt2800usb
insmod /lib/modules/2.6.33.5-at91/kernel/lib/crc-ccitt.ko
insmod /lib/modules/2.6.33.5-at91/updates/compat/compat.ko
insmod /lib/modules/2.6.33.5-at91/updates/net/wireless/cfg80211.ko
insmod /lib/modules/2.6.33.5-at91/updates/net/mac80211/mac80211.ko
insmod /lib/modules/2.6.33.5-at91/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko
insmod /lib/modules/2.6.33.5-at91/kernel/drivers/net/wireless/rt2x00/rt2x00usb.ko
insmod /lib/modules/2.6.33.5-at91/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
insmod /lib/modules/2.6.33.5-at91/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
ufechner@delphi:~/00Software/electrum100/linux-2.6.33.5-at91$


But it doesn't work:
Code: Select all
ufechner@delphi:~/00Software/electrum100/linux-2.6.33.5-at91$ sudo iwconfig
lo        no wireless extensions.
dummy0    no wireless extensions.
eth0      no wireless extensions.
ufechner@delphi:~/00Software/electrum100/linux-2.6.33.5-at91$


Any idea?

I put the newest firmware already into /lib/firmware.

The command "lsusb" doesn't list the USB adapter. Should
this command work? If I connect it, I get the following
message in the syslog:
Code: Select all
Jan  1 14:26:01 delphi vmunix: Compat-wireless backport release: compat-wireless-v3.1.1-1
Jan  1 14:26:01 delphi vmunix: Backport based on linux-stable.git v3.1.1
Jan  1 14:26:01 delphi vmunix: cfg80211: Calling CRDA to update world regulatory domain
Jan  1 14:26:02 delphi vmunix: usbcore: registered new interface driver rt2800usb


Best regards and a happy new year!

Uwe Fechner
ufechner
 
Posts: 29
Joined: Sun Feb 20, 2011 10:04 pm

Re: USB WLAN - SOLVED -

Postby ufechner » Mon Jan 02, 2012 1:42 am

Hello,

I finally solved these driver problems. :D
I compiled the drivers from Linux 3.2RC6 and I am able to use them. I needed to patch them for ARM.

In the next days I will publish a detailed description and the patch. Currently I measure a worst case ping time of about 5 ms (average: 1.2 ms) using a 5.2 Ghz link. I am very happy with this result.

Best regards:

Uwe Fechner
ufechner
 
Posts: 29
Joined: Sun Feb 20, 2011 10:04 pm

Re: USB WLAN

Postby jalvarez » Mon Jan 02, 2012 8:31 am

Glad to learn you were able to get your USB wifi device to work. Sounds like you had a busy New Year's weekend.

It is surprising that a driver in the Debian repositories does not support ARM targets. Possibly it is very new and has only been tested with x86 targets. You should consider submitting your patches for ARM support to the driver developer.
Regards,
Jesus Alvarez
Micromint USA
jalvarez
 
Posts: 89
Joined: Thu Feb 17, 2011 8:50 am
Location: Lake Mary, FL

Re: USB WLAN

Postby nexus1980 » Wed Jan 04, 2012 8:33 pm

@ ufechner

How did you manage to get a 3.x kernel boot on Electrum?
I tried to maintain a patch for Electrum and was successful up to 3.0.x (2.6.35, 2.637, 2.6.38 and 2.6.39-6 boot without any issues). However, when it comes to 3.x, Electrum 100 simply freezes (obviously, the kernel gets compiled).

Thanks.
Always listen to experts. They'll tell you what can't be done, and why. Then do it. (Robert A. Heinlein)
nexus1980
 
Posts: 17
Joined: Wed Mar 02, 2011 9:25 pm

Re: USB WLAN

Postby jalvarez » Wed Jan 04, 2012 10:04 pm

I believe Uwe backported the rt2800usb wifi driver for 3.x kernels to a 2.6 kernel.

when it comes to 3.x, Electrum 100 simply freezes

Which AT91 drivers did you use? The AT91 drivers for 2.6 kernels will not work properly with a 3.2 kernel without significant changes. Atmel has posted multiple patches on kernel mailing lists but they are still evolving and should be considered experimental.
Regards,
Jesus Alvarez
Micromint USA
jalvarez
 
Posts: 89
Joined: Thu Feb 17, 2011 8:50 am
Location: Lake Mary, FL

Next

Return to Electrum

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Login Form