Category Archives: Gentoo

ZD1211 news

We have made a lot of progress since my last post about our rewritten ZD1211 USB-WLAN driver.

  • Monitor mode – the ability to spy on local network traffic with tools like ethereal.
  • Software encryption – we can now connect to encrypted (WEP + WPA) networks. Hardware-based encryption will be supported later.
  • ZD1211B support – we now support the newer range of ZyDAS devices
  • Improved RX performance
  • Misc fixes and improvements

I managed to get in contact with some ZyDAS engineers, who are responsive and helpful via email. Thumbs up to them, I hope this level of communication can continue for future products beyond the Atheros acquisition.

I have been spending time hacking on softmac (generic code layer which powers ZD1211, bcm43xx, and a few other drivers). I fixed a few bugs, and am now working on finishing some of the incomplete functionality (such as shared key authentication, mixed mode protection and short/long preambles).

There is only one more thing we need to complete before we submit a basic driver for inclusion in Linux 2.6.18: automatic TX power calibration, so that we aren’t needlessly broadcasting our traffic over long distances when the access point is very close. This won’t be too hard once we have figured out how to decode the signal strength. The code in the vendor driver for doing this is quite cryptic, to say the least.

Atheros to acquire ZyDAS

This is some interesting news.

My first thoughts were if and how this would affect ZyDAS’ current Linux driver maintenance efforts, which have enabled us to write a nicer driver quickly approaching kernel inclusion.

Then I remembered about the Atheros range of PCI wifi hardware which is supported by the madwifi driver, which was originally written by Atheros and released to the community. So hopefully this means good things for vendor communication.

Edit: I’ve just been informed that madwifi contains a binary blob, i.e. a large closed-source element of the driver. Maybe this is more of a mixed message…

Planet Gentoo News

Planet vs Universe

Due to a once fairly even split of opinions, we actually have two versions of Planet: Planet Gentoo and Gentoo Universe. The universe aggregates entire blogs (articles of any topic) into a single page, whereas the planet site only aggregates “on-topic” RSS feeds, where “on-topic” is loosely defined to be anything related to Gentoo/open-source/tech-stuff.

The Planet Gentoo on-topic thing doesn’t work too well. To pull it off, we require developers to provide us with a separate RSS feed for the Planet. Usually, people just create a new category called “Gentoo” and give us the category-specific feed URL. However, many people use their “Gentoo” category for Gentoo-only articles, then they publish other interesting open-source related articles outside of the Gentoo category, so they do not appear on Planet.

Also, under normal circumstances, there isn’t a lot of difference between Planet and Universe (that is perhaps slightly different today due to the site being spammed with old content).

So, I’m thinking of killing Planet and replacing it with what we have on Gentoo Universe – complete aggregations of everyones weblogs, where the only restriction is that content must be ‘sensible’ and written in English. How do people feel about this? I’m especially interested in the opinions from those who originally said they didn’t want to be reading what people ate for breakfast every day (the people who wanted an “on-topic-only” Planet to read).

This change will be discussed on the gentoo-dev mailing list before I take action, if I decide this is a good idea.

Looking for a co-maintainer

Maintaining the Planet and Universe sites really is quite straightforward, yet people will tell you how slow I am to add or remove weblogs. Most of the time, I’m too busy with other things, so planet requests end up sitting in my mailbox until a rainy afternoon.

For this reason, I’m looking for a co-maintainer who can be more on-the-ball than myself. I say co-maintainer, actually you’ll probably be doing most of the work, but I’ll definately still be hanging around and contributing the odd few minutes now and then, as well as continuing the more advanced maintenance tasks.

To be more specific, what the position really involves is:

  • Adding new weblog feed URL’s to 2 config files (one for planet, one for universe) when developers see the light and set up their own weblog (or when new developers join the project). These files are kept in a subversion tree, just commit them and Planet picks up the changes within 1 hour.
  • Removing those feed URL’s when developers leave.
  • Uploading developer hackergotchi’s to the designated location on request, and referencing them in the config files.
  • Creating developer weblogs on our b2evolution installation – this is provided for those who don’t want to host their own weblogs.
  • Removing comment spam from our b2evolution install (we are working on better anti-spam measures).

That’s really not a lot – but it’s not particularly interesting either.

All you really need is experience with weblogs (even if that’s just installing and running one), basic knowledge of subversion, and a notion that you’ll be able to be more responsive than myself. PHP/Python skills are a bonus if you are interested in getting even more involved, but that’s not a requirement. This is open for both existing Gentoo developers and non-developers too. Anyone interested?

Republishing of old content

Occasionally, the Planet republishes all articles in someones weblog as if they were written on the current day.

This has been happening a lot lately, partly due to people mass upgrading to WordPress 2.0 (for some lame reason that ends up slightly changing the dates of all your previous articles), and partly due to some buggy weblogs which randomly change the article dates when they feel like it. We’re tracking the recent occurances in bug 128895.

The sites are powered by a small python application cunningly named Planet. One thing I miss from the old Planet version was that when this happened, I could simply open Planet’s cache files, modify the dates of the old articles to be too old to be aggregated (i.e. changed the publish date to be 1 year ago), then re-run Planet in offline mode. This was an acceptable workaround.

The newer versions of Planet do not use a human-readable cache format anymore, so I can’t do the date hacking thing. Is anyone interested in writing a python app which parses the cache files and allows me to modify dates? Planet is dead simple to set up and hack on, no webserver required – its just a script which outputs to a .html file in a certain directory. The source code can be found here.

ZD1211 rewrite driver partially usable

I just announced our just-about-functional rewritten ZD1211 driver on the zd1211-devs mailing list. The driver is actually usable (and reliable!) on unencrypted networks.

A fully usable (WLAN client) driver is now well within sight, we just need to implement connecting to encrypted networks and automatic rate management.

More advanced features (such as ad-hoc connectivity, master mode, monitor mode, …) will come later. Hopefully the community will help us out there.

Linux Wireless Summit

I was lucky enough to spend most of last week in Portland, Oregon. After a chaotic flight all day Tuesday, several of us met on Wednesday and attended a larger social meeting that evening. It was really nice meeting so many active kernel developers who were previously just names in my inbox.

For those that don’t know, wireless networking is one of the weaker areas of the Linux kernel in terms of hardware support, general usability, and excess functional code duplication.

The actual summit took place over Thursday/Friday at OSDL‘s offices. The main topics addressed at the summit were unification of the various generic wireless “stacks” that exist, how we can get more drivers ready for kernel inclusion, and how we can improve communication with vendors and the FCC.


Picture from Jean Tourrihles. Note OSDL’s wireless network key clearly visible on the far right, ahem.

On Friday, I met for dinner with 5 other Gentoo developers. Corey Shields (cshields), Donnie Berkholz (spyderous) and Michael Marineau (marineam) travelled up from OSU. Aaron Kulbe (SuperLag) joined us, who already resides in Portland. Henrik Brix Andersen (brix) was also attending the conference, and brought along two Gentoo users. We had a good time, and I’m going to have to visit OSL if I ever get the opportunity again.

There wasn’t much opportunity for hacking at the summit, but a few us of got together on Saturday and went through some issues. I have never worked on kernel stuff with other kernel hackers in-person before, and this was highly productive. Johannes Berg monitored the wireless traffic produced from our ZD1211 driver rewrite, and threw around some suggestions and softmac patches. Michael Buesch went through the driver source and pointed out a few bugs. Ulrich Kunitz improved the locking. At the end of the session, we had our ZD1211 device associated to the hotel network and browsing the web!

I travelled home on Sunday, just when I was getting used to the timezone. Many thanks to Greg KH who was in the right place at the right time when I realised I had misread my flight timetable (oops!). Also thanks to OSDL for sponsoring my travel and the event itself.

Linux-friendly wireless vendors

I’ll write more about the Linux Wireless Summit when I am back at home, but here’s a taster.

One item that was discussed was vendor interaction with the Linux wireless development community, or the lack of it. The wireless networking market is still young and lack of vendor cooperation is one of the things that has resulted in Linux’s support for wireless networking being below par.

Without direct company contacts, there’s not a lot we can do to actively improve this, other than be friendly to those who have cooperated, and be patient. With that, we identified the vendors who have been cooperative:

  • Intel rock – they have done the whole shebang. They write open-source drivers for their Intel Centrino wireless adapters (ipw2100/ipw2200), cooperate enough with the Linux developer community for those drivers to be included in mainline Linux, allow firmware to be redistributed, and have contributed to a generic wireless stack shared between all wireless drivers. These cards are probably the best supported wireless adapters under Linux at this time.
  • ZyDAS write GPL drivers for most of their products, and distribute device specs to Linux developers. They also allow redistribution of device firmware. In terms of hardware support, Linux supports the older ZD1201 USB-Wireless adapters, but I’d really recommend the newer ZD1211 devices instead. ZD1211 will be well supported in mainline Linux hopefully within a few weeks.
  • Ralink have apparently contributed device specs. If anyone has details on hardware support under Linux, leave a comment.

Please keep these vendors in mind when purchasing hardware in the future, and be sure to thank them for their contributions.

ZD1211 TX operational

After a couple of weeks of head-scratching, I managed to get the rewritten USB-wireless ZD1211 driver transmitting data.

The code has been written for a while, and although it seems to work (the device doesn’t indicate any form of failure), the frames simply weren’t “hitting the air”.

The problem originates from the huge number of undocumented physical registers in the vendor driver. Rather than list all 200 of them in our driver source in the ugly manner which ZyDAS do so, we devised a quick one-line macro to perform the same task:

#define CR(reg)                CTL_REG((reg)*4)

However, it appears that ZyDAS have some trouble counting. A snippet from the vendor driver:

#define        ZD_CR1            0x0004
#define        ZD_CR2            0x0008
#define        ZD_CR3            0x000C
#define        ZD_CR5            0x0010
#define        ZD_CR6            0x0014
#define        ZD_CR7            0x0018
#define        ZD_CR8            0x001C
#define        ZD_CR4            0x0020
#define        ZD_CR9            0x0024

1,2,3,5,6,7,8,4,9… Our macro obviously doesn’t match the unordered nature of those low CR addresses.
After inserting the appropriate hacks into our driver, packets start flying, as confirmed by another wireless card in monitor mode.

Be warned: although we have transmit and receive working to some degree, the driver isn’t ready for users wanting to connect to networks yet.

I’m attending the OSDL Wireless Developer Summit in the first week of April, and I’m hoping that we’ll have a partially usable driver in time for that.

dpfp 0.1

A bit later than anticipated, I have created initial releases for the dpfp project, a driver for DigitalPersona and Microsoft USB fingerprint readers.

My last attempt at the driver/library thing failed – I learned more about the device, and decided I should take a few steps back and work with a different design.

So far, the rewrite is working out, so I’m releasing an early version for people to try. The driver provides a simple character device interface, and the library provides a nice API to that interface. libdpfp includes an example program which you can use to scan your fingerprint to a PGM file.

This isn’t for general usage yet. There are basic instructions in the README file in the dpfp-driver distribution.

If you have questions, please don’t ask them in comments on my weblog, use the mailing list instead. Enjoy!

Mikko Kiviharju’s Black Hat session

Mikko gave his Black Hat Europe presentation about the security issues with Microsoft/DigitalPersona’s fingerprint readers recently, which seems to have been a success.

It has gained media attention, with a few reports floating around in addition to the one I linked to recently. itnews.com.au has one of the better ones, including comments from Digital Persona. At least Mikko found one way to get through to them :)

Mikko’s slides are online here and it looks like audio will be published soon on this page. Mikko explains the lack of encryption and references the dpfp project in a few places for some of the discoveries. He also explains some of the device optics and demonstrates how the lack of encryption can be exploited to allow finger replay attacks.