Wednesday, February 19, 2014

MobileLite Wireless running OpenWrt, with working wireless

It's been quite a while since last post. A combination of little time to play, and some bumps in the road.

I'll try to sum it up quickly.

After John commented about another project using the WiFi part on th MT7620, I decided to search around a bit, and found a ton of information. The most important being that OpenWrt didn't include the WiFi because of licensing issues.

Kingston were kind enough to include the Ralink SDK, even though the licensing in the source seems to indicate that it violates the license. But then again, I'm not a lawyer, so I can just assume what they are doing is legal.

I check out some code a few places, among those is this one ASUS RT-N56U/N65U/N14U custom firmware, but that is uClinux based, and we wanted OpenWrt. And OpenWrt as close to trunk as posible.

I found quite a few Chinese pages mentioning the WiFi on the device, at first the most interesting one was one called "openwrt-mt7620-pandora". Some minor changes, and I manage to boot the device with WiFi and everything. It was running a 3.3 kernel, but that wasn't any big issue. Then I start to look at the source and sure enough, there is both the Ralink/MediaTek license header in some files. There was also some files that were licensed to Drambox Pandora, with a disclaimer that It's illegal to use with other devices.

But at least, now I know its possible. So I start all over from scratch again. I have the source for the wireless drivers from Kingston, and if others have managed to use them, so should I.

Short story, it was a lot harder than expected. So I have spent quite some time learning the structure of OpenWrt devices, the toolchain etc. Today I finally had plenty of time after work to really sit down and try to solve this. I do a few quick searches to get some information, an this page pops into the search result MT7620 OpenWRT所用的RT2860v2 WIFI驱动package. And it links to this Github page. And sure enough, a few days ago there was a changeset that adds WiFi support to the device.

I just check out the code, configure and builds. And there I have it, the wireless is working just the way I want it to. On what seems like a, pretty current version of OpenWrt. Someone finished doing exactly what I were trying, and failing, to do. It would be stupid of me to continue trying to do this, when someone else has already finished doing it. So much for my learning experience.

I guess I will need to make some minor changes, add the MLW221 as a device. Configure GPIO and file system, and make a patch for it. But its getting closer.

If anyone want to try it out, this is how I do it.
  1. Clone repository
  2. make menuconfig
  3. Configure for our SOC
  4. Configure the WiFi part under Ralink as builtin, and add the stuff we need.
  5. Set image type to initrd
  6. Build
  7. tftp boot to ram
I still have my concerns about the license of some parts of the repository, so consider yourself warned.

No comments:

Post a Comment