OpenWRT on Ebox3300 (V): Networking
20 Oct 2014 | CommentsIn this part, I’m going to describe my problems and solutions to the networking subsystem of the Ebox3300. The goal is to have ethernet controller connected to the WAN and some kind of WLAN module to be an access point for my computers. Device I have, has ethernet controller built in, but no WLAN functionality at all. It has USB 2.0 ports, so it’s possible to attach pendrive-style WLAN card. It also has mini-PCI connector inside, so there are some options to choose from.
The ethernet
As seen in previous parts, the ethernet controller works almost out-of-the-box,
but I noticed a problem (FYI, I’m using OpenWRT’s 3.10.49 kernel
version). Sometimes it fails to enumerate after boot. In dmesg
it throws
something like this:
After that, there is no available network interface. Temporary solution was to
reload the r6040
module (several times in worst case) and it wasn’t
acceptable in any way. Then I turned to Google and found a way out.
Here I’ve found, that not
only me have the same problem and also there is a solution of how to deal with
it. The only thing I’ve changed is (in Linux kernel of course ;)):
After the change, I compiled the module and included it in new image. It’s working flawlessly until now. So I’ve added another patch (as described in previous part).
The wireless lan
First thought that came to me was to use some kind of USB to WiFi adapter.
They are cheap and there are plenty of them. Thankfully, I had lying around
Tp-Link TL-WN722N (based on Atheros chipset), which fulfill my requirements.
I started to prepare needed kernel modules (kmod-ath9k-htc
). After getting
this module in the image I’ve inserted it into kernel and plugged in the WiFi
adapter. Unfortunately, it didn’t work. Here is the output from dmesg
:
It looked as device had some problem with communication. The same errors were shown when I’ve used different USB ports. After searching on the Internet, I noticed that this adapter has quite big power requirements (for example - there were many complaints with using it on Raspberry Pi) and I thought, that this may be the cause. I got my hands on powered USB hub and indeed it worked perfectly. So, this was the solution, but it was rather ugly. From one, quite compact, device I had two, additional cables and another power adapter.
It wasn’t acceptable solution, so I tried to find something different.
It was obvious - use miniPCI port on-board. Wifi cards for the miniPCI port
are nowadays quite scarce. Especially, I wished to have a 802.11n type card.
After searching different on-line shops in my country, I’ve found only several
of them, mostly dedicated for MikroTik router boards and for equivalent of 25$
I bought one called TechnicLAN TMP-9220. It is based on great Atheros AR9220
chipset and the Linux support is splendid. As a bonus it works on the 5GHz
bandwidth as well. So after plugging that into the miniPCI, connecting pigtail
type antenna connector and antenna, I compiled suitable module (kmod-ath9k
)
and got it working on the device. I haven’t noticed any show-stopping problems
with it up to now, so I’m happy.
The configuration of wireless facilities on the OpenWrt distribution is described on wiki very well, so I won’t dive into the details here.
Unfortunately, performance is not great (but enough for my needs for now).
I tested it using the iperf
tool with default settings. Here is the output:
As one can see, average speed is about 20Mbits/s. Adapter is configured as 802.11n, HT20 (150Mbit/s max). Cipher is WPA2/PSK (CCMP/AES). This is quite disappointing, even more, as I get the same results when I use HT40 configuration (max 300Mbit/s theoretically) and also the 802.11g (so max 54Mbits/s). Maybe miniPCI port on this device is a bottleneck? I haven’t found a solution yet, but for now it is enough for my everyday use. I’ve also tested USB adapter and then I’ve only got 4-5Mbits/s on average, so much worse. I’m going to look into this problem in the future.
Comments
comments powered by Disqus