Hello everybody,
@Vern:
Vern wrote:
driver version (including the date if it's a CVS build)
driver version: rt73-cvs-2007101206
Vern wrote:
hardware description - CPU, adapter Mfr. & model, AP if known.
CPU: AT91RM9200
adapter: DWL-G122 H/W: C1
AP: DWL-900AP+
Vern wrote:
distrobution name and version
self compiled linux kernel, no known distribution
Vern wrote:
kernel version
kernel-version: 2.6.19
Now I would describe you my current progress.:
1. Compiling the wlan driver for my debian lenny distribution with linux kernel 2.6.22make, make install with no warnings and errors
modprobe rt73 with no errors
ifup wlan0 with no errors
wlan-adapter works perfectly including WEP encryption2. Create Makefile for the embedded Linux System, based on the original
Quote:
# Tool names
ARCH = arm
CROSS_COMPILE = ${ARCH}-linux-
AS = ${CROSS_COMPILE}as
AR = ${CROSS_COMPILE}ar
CC = ${CROSS_COMPILE}gcc
CPP = ${CC} -E
LD = ${CROSS_COMPILE}ld
NM = ${CROSS_COMPILE}nm
OBJCOPY = ${CROSS_COMPILE}objcopy
OBJDUMP = ${CROSS_COMPILE}objdump
RANLIB = ${CROSS_COMPILE}ranlib
READELF = ${CROSS_COMPILE}readelf
SIZE = ${CROSS_COMPILE}size
STRINGS = ${CROSS_COMPILE}strings
STRIP = ${CROSS_COMPILE}strip
export AS AR CC XPP LD NM OBJCOPY OBJDUMP RANLIB READELF SIZE STRINGS STRIP
MODULE_NAME := rt73
IF_NAME := wlan*
FIRM_DIR := $(PRJROOT)/rootfs/lib/firmware
FIRMWARES := rt73.bin
$(MODULE_NAME)-objs := rtmp_main.o mlme.o connect.o rtusb_bulk.o rtusb_io.o \
sync.o assoc.o auth.o auth_rsp.o rtusb_data.o \
rtmp_init.o sanity.o rtmp_wep.o rtmp_info.o \
rtmp_tkip.o wpa.o md5.o rt2x00debug.o
obj-m += $(MODULE_NAME).o
KDIR := $(PRJROOT)/kernel/linux
PWD := $(shell pwd)
MODULE_ROOT := /lib/modules/2.6.19-etwarm/extra
MODULE_OBJECT := $(MODULE_NAME).ko
all: module
MODULE_CHECK := if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi; \
if [ `du -b $(MODULE_OBJECT) | sed -e 's/\t.*//g'` -gt 1000000 ]; then \
echo "!!! WARNING: Module file much too big (>1MB)"; \
echo "!!! Check your kernel settings or use 'strip'"; \
fi; \
echo "*** Module $(MODULE_OBJECT) built successfully"
module:
@$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) SUBDIRS=$(PWD) 'EXTRA_CFLAGS=-DDBG modules; \
$(MODULE_CHECK)
clean:
@rm -f *.o .*.{cmd,flags}
@rm -f $(MODULE_NAME).{o,ko,mod.{o,c}} built-in.o $(VERSION_HEADER) *~
@rm -fr .tmp_versions Module.symvers
modules_install:
@if ! [ -f $(MODULE_OBJECT) ]; then \
echo "!!! $(MODULE_OBJECT) does not exit: run 'make'"; \
exit 1; \
fi
@echo "*** Install module in $(MODULE_ROOT) ..."
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(PRJROOT)/rootfs/ modules_install
install: modules_install
@echo "*** Install firmware in $(FIRM_DIR) ..."; \
if ! [ -d $(FIRM_DIR) ]; then \
mkdir $(FIRM_DIR); \
fi; \
cp -f $(FIRMWARES) $(FIRM_DIR)
3. Create a new zImageincluding:
- support for hot-pluggable devices CONFIG_HOTPLUG
- userspace firmware loading support CONFIG_FW_LOADER
- wireless LAN drivers (non-hamradio) & wireless extensions CONFIG_NET_RADIO
- OHCI HCD support CONFIG_OHCI_HCD
this includes are necessary for compiling the driver without errors.
4. Run make in the wlan driver folder "Module"debug output:
Quote:
make[1]: Entering directory `/home/embedded-linux/kernel/linux-etwarm'
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_main.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/mlme.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/connect.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtusb_bulk.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtusb_io.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/sync.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/assoc.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/auth.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/auth_rsp.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtusb_data.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_init.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/sanity.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_wep.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.o
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c: In function `rt_ioctl_siwessid':
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c:905: Warnung: Anweisung ohne Effekt
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c: In function `RTMPSetInformation':
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c:1474: Warnung: Anweisung ohne Effekt
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c: In function `Set_SSID_Proc':
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c:3972: Warnung: Anweisung ohne Effekt
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c: In function `rt73_ioctl':
/home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_info.c:2777: Warnung: Anweisung ohne Effekt
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rtmp_tkip.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/wpa.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/md5.o
CC [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rt2x00debug.o
LD [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rt73.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rt73.mod.o
LD [M] /home/embedded-linux/Ralink/rt73-cvs-2007101206/Module/rt73.ko
make[1]: Leaving directory `/home/embedded-linux/kernel/linux-etwarm'
*** Module rt73.ko built successfully
"Anweisung ohne Effekt" means "instruction without effect"
I dont know how to prevent the warnings, so I ignored them. Maybe they are the reason of my further problems???
5. make install--> rt73.bin in /lib/firmware
--> rt73.ko in /lib/modules/2.6.19-etwarm/extra/
6. insmod /lib/modules/2.6.19-etwarm/extra/rt73.ko results:Quote:
rtusb init ====>
idVendor = 0x7d1, idProduct = 0x3c03
rt73: Failed to request_firmware. Check your firmware file location
rt73: probe of 1-1:1.0 failed with error -2
usbcore: registered new interface driver rt73
[/quote]
7. I solved this problem 
a) I forgot to mount sysfs
add "sysfs /sys sysfs defaults" in /etc/fstab
b) add hotplug-script (because I would not use hotplug or udev)
- add textfile "hotplug" in /proc/sys/kernel with entry "/sbin/hotplug"
- create executable file "hotplug" under /sbin
Quote:
#!/bin/sh
# Simple hotplug script sample:
#
# Both $DEVPATH and $FIRMWARE are already provided in the environment.
HOTPLUG_FW_DIR=/lib/firmware
echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading
# To cancel the load in case of error:
#
# echo -1 > /sys/$DEVPATH/loading
#
#
thanks to hennig8. Include ifupdown and run-parts to the busybox, add wireless_tools to my embedded linux systems, add the following params to /etc/network/interfacesQuote:
auto wlan0
iface wlan0 inet static
address 141.57.27.165
netmask 255.255.252.0
network 141.57.24.0
broadcast 141.57.27.255
gateway 141.57.24.3
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid "*******"
pre-up iwconfig wlan0 mode Managed
pre-up iwconfig wlan0 channel 8
pre-up iwpriv wlan0 set AuthMode=WEPAUTO
pre-up iwpriv wlan0 set EncrypType=WEP
pre-up iwpriv wlan0 set Key1=**********
pre-up iwpriv wlan0 set SSID="*******"
9. insmod /lib/modules/2.6.19-etwarm/extra/rt73.ko results now:Quote:
rtusb init ====>
idVendor = 0x7d1, idProduct = 0x3c03
usbcore: registered new interface driver rt73
10. ifup wlan0 results:Quote:
rt73 driver version - 1.0.3.6 CVS
***rt73***: Interface goes up for the first time, activating permanent MAC
***rt73***: Active MAC is: 00:19:5b:74:bf:3e
11. ifconfig and iwconfig output:Quote:
wlan0 Link encap:Ethernet HWaddr 00:19:5B:74:BF:3E
inet addr:141.57.27.165 Bcast:141.57.27.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:91514 errors:0 dropped:0 overruns:0 frame:0
TX packets:9180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7118377 (6.7 MiB) TX bytes:716040 (699.2 KiB)
wlan0 RT73 WLAN ESSID:"FTZwlan"
Mode:Managed Frequency=2.447 GHz Bit Rate:54 Mb/s
RTS thr:off Fragment thr:off
Encryption key:0A1B-2C3D-4E
Link Quality=0/100 Signal level:-121 dBm Noise level:-115 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Here you can see my current problem. There is no link quality.
iwlist wlan0 scanning results:
Quote:
wlan0 No scan results
ifdown wlan0 results:
Quote:
wlan0: unable to signal thread
<--- ????
But the interface goes down
--> Actually I have no idea, what are the reasons of this problem.
Maybe somebody has an idea???
Regards Daniel