TP-Link TL-WN321G on at91rm9200dk - so near, yet so far

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5129

kcleung

17-12-2008 07:37:04

Hello board,

I am trying to get a TP-Link TL-WN321G USB wireless stick working on a AT91RM9200DK ARM board. This stick uses the rt73 chipset. I decided to use the rt2x00 drivers in kernel, since it is conveniently bundled with the kernel source. I'm using buildroot to compile the kernel and root filesystem. I'm using kernel version 2.6.24.7 since all newer versions cannot be used due to serial console problem (I don't want to tackle that right now).

What I've done so far
[list13h4mpu8]
[*13h4mpu8]Put the firmware in /lib/firmware on root filesystem image.[/*m13h4mpu8]
[*13h4mpu8]Compiled udev and hotplug in.[/*m13h4mpu8]
[*13h4mpu8]For the above step I tried removing /sbin/hotplug binary and substituting the hotplug script below, also without success.[/*m13h4mpu8][/listu13h4mpu8]
[code13h4mpu8]
#!/bin/sh

HOTPLUG_FW_DIR=/lib/firmware
echo Starting hotplug with DEVPATH = $DEVPATH , FIRMWARE = $FIRMWARE ...
if [ ! -r $HOTPLUG_FW_DIR/$FIRMWARE ] ; then
echo -1 > /sys/$DEVPATH/loading
echo No readable firmware found, aborting load.
else
echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading
echo Firmware should be loaded now.
fi
[/code13h4mpu8]
(this script is modified from the example given in kernel source, Documentation/firmware-class/hotplug-script)

Result
There is normal display of wireless interfaces
[code13h4mpu8]
# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"myESSID"
Mode:Managed Channel:0 Access Point: Not-Associated
Tx-Power=0 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code13h4mpu8]
but after i do [b13h4mpu8]"iwconfig wlan0 mode managed ; iwconfig wlan0 essid myESSID ; ifconfig wlan0 up"[/b13h4mpu8], the following error appears
[code13h4mpu8]
# iwconfig wlan0 mode managed
# iwconfig wlan0 essid myESSID
phy0 -> rt2x00mac_conf_tx: Info - Configured TX ring 0 - CWmin: 4, CWmax: 10, Ai
fs: 2.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX ring 1 - CWmin: 4, CWmax: 10, Ai
fs: 2.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX ring 2 - CWmin: 4, CWmax: 10, Ai
fs: 2.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX ring 3 - CWmin: 4, CWmax: 10, Ai
fs: 2.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX ring 4 - CWmin: 4, CWmax: 10, Ai
fs: 2.
# ifconfig wlan0 up
phy0 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'.
phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
ifconfig: SIOCSIFFLAGS: No such file or directory
[/code13h4mpu8]
(replacing myESSID with actual ESSID of course)

I am lost for ideas as to what to do. The kernel configuration and buildroot configuration does not let me specify a firmware directory so I have placed rt73.bin in /lib/firmware, yet it does not get picked up by hotplug. Any ideas how I can solve this problem?
[code13h4mpu8]
# ls -l /lib/firmware/
-rw-r--r-- 1 root root 2048 Dec 16 2008 rt73.bin
[/code13h4mpu8]

IvD

17-12-2008 10:46:44

Make sure you configure your udev correctly to read firmware from the correct location.
Check udev documentation on how to configure udev.