Saturday, November 26, 2011

FreeBSD on the TP-Link TL-WR1043nd!

I've now included (almost) all of the support needed to run FreeBSD natively on the TP-Link TL-WR1043nd. It's a 3-antenna, 2x2 stream 2.4ghz 802.11n AP which you can get for under AUD $100.

It supports hostap mode (which is what I bet most of you want to use) and I'm currently using it at home alongside my Ubiquiti Routerstation Pro based hostap (which is what I use to test out all the other pre-11n and 11n NICs that I currently own.)

I currently get around 50mbit TCP throughput - but I leave full FreeBSD-HEAD debugging on. I'm sure I can push the unit closer to 100mbit. (Compare to the Routerstation Pro + AR9160 hostap - where I routinely get 160mbit of TCP throughput.)

What works (read: what I've tested):
  • Ethernet (at least the WAN port);
  • Wireless - 802.11bgn - 20/40mhz operation as well as legacy operation (and both, if that's what you need);
  • Serial console - if you've soldered in one.

The firmware image stores the configuration in a 64k flash partition which is read upon boot. You can modify files in /etc and then save these to flash via "cfg_save".

What isn't supported:
  • The onboard switch - so I believe the only port available at the present moment is the WLAN port;
  • The GPIO lines aren't being configured, so the WLAN, status and USB/QSS buttons don't function.
I haven't tested out Multi-SSID mode yet. The earlier AR9130 revisions have some issues with multi-SSID mode and handling block-ack tracking, so I _think_ I'll need to somehow disable aggregation on the second and later VAP interfaces. Just keep that in mind if you're tinkering.

Further details about the hardware and how to build the software for yourself can be found here in my FreeBSD wifi development project wiki.

No, I won't (yet) be putting up firmware images for people to test. Things are changing quite rapidly and there's no easy way to reflash a unit once you've placed FreeBSD on it - you'll need to have added a serial console to the device.

7 comments:

  1. Which SVN revision did you checkout from HEAD? How large is your image? Would supporting the TP-Link TL-WR841ND be possible? What isstanding in the way of support for th onboard switch and GPIO lines?

    ReplyDelete
  2. Just use the latest -HEAD. If it's broken, it needs fixing. :)

    The kernel is about 2 meg compressed; the rootfs is about 5 meg compressed. It's unfortunately far too big for some of the devices out there (with 2/4meg flash!) but I've not made any attempt to slim things down. I'm using this for development rather than deployment.

    If someone sends/buys me a TP-Link TL-WR841D then I'll make FreeBSD work on it. It won't be until after Christmas though. :)

    The CPU and wireless support is in the tree, but until the PCI/PCIe "hacks" are included into the distribution, the wireless won't work. The on-board 100mbit switch support isn't in the tree yet but someone is working on that right now.

    The GPIO and switch stuff is being sorted out as we speak. There's code for both; it just requires some tidying up to make it useful on all these platforms.

    Thanks for your interest!

    ReplyDelete
  3. The TP-LINK TL-WR841ND is currently $20 at a site called Newegg and unfortunately, it might cost more to send it to you than it would to actually buy the hardware, but I will look into it.

    With that said, how does one send you stuff?

    ReplyDelete
  4. Wait two weeks, and then buy it for me. I'll be in the US in two weeks.

    I'd buy the hardware myself, but I've bought enough of it at the moment, so I'd like to see others donate some hardware to me. :)

    ReplyDelete
  5. Will you post that on your blog when you are in the US?

    Also, I seem to have missed a key question, which is what filesystem are you using on the TP-Link TL-WR1043ND? Is there any wear leveling to protect the flash?

    ReplyDelete
  6. .. it's a read-only FFS. There's no need for wear levelling at this point. The 64k config partition is not wear levelled but it's not going to be written to very often.

    Just email me, adrian@freebsd.org :)

    ReplyDelete
  7. What is the default LAN ip address for image
    TP-WN1043ND.factory.bin, do i need to use this command "setenv ipaddr 192.168.1.10
    setenv serverip 192.168.1.16", why via wan port.

    Usually i use lan port for tftp boot

    ReplyDelete