Contents[Hide]

Since I want to bulid router based on iConnet two improvements are needed. Wan interface and better WiFi. As WAN I will use USB Ethernet card.

1. Install USB Ethernet card.

In my case I have old D-Link DUB-E100 10/100Mbit USB card which is based on ASIX chip.

opkg update
opkg install kmod-usb-net-asix

Results:

root@OpenWrt:/# opkg install kmod-usb-net-asix
Installing kmod-usb-net-asix (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-usb-net-asix_3.3.8-1_kirkwood.ipk.
Installing kmod-usb-net (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-usb-net_3.3.8-1_kirkwood.ipk.
Installing kmod-usb-core (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-usb-core_3.3.8-1_kirkwood.ipk.
Installing kmod-nls-base (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-nls-base_3.3.8-1_kirkwood.ipk.
Configuring kmod-nls-base.
Configuring kmod-usb-core.
Configuring kmod-usb-net.
Configuring kmod-usb-net-asix.
[   88.140145] asix 1-1.4.4:1.0: eth1: register 'asix' at usb-orion-ehci.0-1.4.4, DLink DUB-E100 USB Ethernet, 00:80:c8:37:ae:ed
[   88.151645] usbcore: registered new interface driver asix
root@OpenWrt:/#

Check if new network interface has been detected:

root@OpenWrt:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:D0:B8:11:E0:E1
          inet addr:192.168.1.38  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1561 errors:0 dropped:0 overruns:0 frame:0
          TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:179238 (175.0 KiB)  TX bytes:14518 (14.1 KiB)
          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:80:C8:37:AE:ED
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3482 (3.4 KiB)  TX bytes:3482 (3.4 KiB)

Where erh0 is iConnect Network Card and eth1 is USB card.

Change /etc/config/network configuration to:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        #option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.15.1'
        option netmask '255.255.255.0'
        option gateway '192.168.15.1'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'

It is advised to keep interface names as 'lan' and 'wan' since they are configured in firewall. Otherwise you must modify /etc/config/firewall zone section and add your names. Reboot, connect internet to USB card and your local network to iConnect.

2. Install WiFi

iConnect WiFi card orginally Ralink (N 150Mbit 1T1R) is connected to miniPCIE slot, exactly the same as in Notebook, this give us opportunity to replace it with better card. I choose Intel 6300 Ultimate N which is 450Mbit 3T3R.

opkg update
opkg install kmod-iwlagn

You should see:

root@OpenWrt:/# opkg install kmod-iwlagn
Installing kmod-iwlagn (3.3.8+2012-09-07-3) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-iwlagn_3.3.8+2012-09-07-3_kirkwood.ipk.
Installing kmod-mac80211 (3.3.8+2012-09-07-3) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-mac80211_3.3.8+2012-09-07-3_kirkwood.ipk.
Installing kmod-crypto-core (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-crypto-core_3.3.8-1_kirkwood.ipk.
Installing kmod-crypto-arc4 (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-crypto-arc4_3.3.8-1_kirkwood.ipk.
Installing kmod-crypto-aes (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-crypto-aes_3.3.8-1_kirkwood.ipk.
Installing kmod-cfg80211 (3.3.8+2012-09-07-3) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/kmod-cfg80211_3.3.8+2012-09-07-3_kirkwood.ipk.
Installing iw (3.6-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/kirkwood/generic/packages/iw_3.6-1_kirkwood.ipk.
Configuring iw.
Configuring kmod-crypto-core.
Configuring kmod-crypto-aes.
Configuring kmod-crypto-arc4.
Configuring kmod-cfg80211.
[   66.850291] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[   66.857850] Backport based on wireless-testing.git master-2012-09-07
[   66.864246] compat.git: wireless-testing.git
[   66.882585] cfg80211: Calling CRDA to update world regulatory domain
[   66.889028] cfg80211: World regulatory domain updated:
[   66.894216] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   66.902444] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   66.910228] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   66.918017] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   66.925812] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   66.933607] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Configuring kmod-mac80211.
Configuring kmod-iwlagn.
[   67.020942] Intel(R) Wireless WiFi driver for Linux, in-tree:
[   67.026769] Copyright(c) 2003-2012 Intel Corporation
root@OpenWrt:/#

Check if firmware was extracted to /lib/firmware there should be at least file iwlwifi-6000-4.ucode.

If firmware is missing go to http://wireless.kernel.org/en/users/Drivers/iwlwifi which is Intel official  page for Linux drivers.
Find your card model and download latest version. Then extract file *.ucode and copy it to /lib/firmware.

2.1 Troubleshooting

In my case WiFi was not working since beginning, there was no wl0 interface. Steps to find the problem.

Check hardware.

Install pciutils:

opkg install pciutils

List devices:

root@OpenWrt:/# lspci
00:00.0 Memory controller: Marvell Technology Group Ltd. 88F6281 [Kirkwood] ARM SoC (rev 02)
00:01.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 35)

First I had problem with fitting card to mini PCI-E connector, you must remove this black square distance pad otherwise it will not have proper contact.
When fixed this issue card was listed after lspci command.

Check kerlen logs.

Use dmesg and find section simillar to this:

[   17.041405] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[   17.048968] Backport based on wireless-testing.git master-2012-09-07
[   17.055350] compat.git: wireless-testing.git
[   17.127345] cfg80211: Calling CRDA to update world regulatory domain
[   17.133929] cfg80211: World regulatory domain updated:
[   17.139109] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   17.147326] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   17.155124] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   17.162919] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   17.170716] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   17.178510] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   17.354108] PPP generic driver version 2.4.2
[   17.401736] ip_tables: (C) 2000-2006 Netfilter Core Team
[   17.484078] NET: Registered protocol family 24
[   17.516903] nf_conntrack version 0.5.0 (4010 buckets, 16040 max)
[   17.695972] Intel(R) Wireless WiFi driver for Linux, in-tree:
[   17.701786] Copyright(c) 2003-2012 Intel Corporation
[   17.706849] PCI: enabling device 0000:00:01.0 (0140 -> 0142)
[   17.712776] iwlwifi 0000:00:01.0: pci_resource_len = 0x00002000
[   17.718749] iwlwifi 0000:00:01.0: pci_resource_base = d1448000
[   17.724605] iwlwifi 0000:00:01.0: HW Revision ID = 0x35
[   17.729959] iwlwifi 0000:00:01.0: pci_enable_msi failed(0Xffffffff)
[   18.036836] iwlwifi 0000:00:01.0: loaded firmware version 9.221.4.1 build 25532

pci_enable_msi failed(0Xffffffff) seems to be a problem, need to check what it means.

   
© Paweł Woźniak