WLan / WiFi from the scratch

Seems to be quite complex to implement a WiFi Dongle and get it running. I'm stuck right after compiling the driver module.
Here is what I have done so far:
Image on SD card is standard as bought, uname -a shows "Linux debian 2.6.35.7-nanosg20 #1 PREEMPT Fri Dec 17 13:51:35 CET 2010 armv5tejl GNU/Linux"

----------------
Prepare my Developer sample with all sources:

apt-get update
apt-get install build-essential
wget http://www.ledato.de/download/linux-source-2.6.35.7-nanosg20.deb
dpkg -i linux-source-2.6.35.7-nanosg20.deb
rm /lib/modules/2.6.35.7-nanosg20/build
rm /lib/modules/2.6.35.7-nanosg20/source
ln -s /usr/src/linux-2.6.35.7-nanosg20 /lib/modules/2.6.35.7-nanosg20/build
ln -s /usr/src/linux-2.6.35.7-nanosg20 /lib/modules/2.6.35.7-nanosg20/source
cd /usr/src/linux-2.6.35.7-nanosg20
make nanosg20_defconfig
make prepare

----------------

Get some wireless tools:
apt-get install wireless-tools

----------------

Next: Get Sources for my RTL8188 device:
http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=48&PFi...

Prepare for compile:
- unpack it to my temp dir (tar -xzvf ....)
- go to the subdir
- edit the makefile, change ARCH variable to arm type (no crosscompile needed)

$(MAKE) ARCH="arm" CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
#$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules

Start to compile:

make
make install

Add module:

insmod ./8712u.ko

lsmod shows the loaded module

----------------

ifconfig wlan0 up -> gives error message
iwconfig -> tells that lo and eth0 are "No wireless extensions"

What next? Which part is missing / needs to be installed....

Re: WLan / WiFi from the scratch

Does this error on "ifconfig wlan0 up" say something about missing firmware?

Re: WLan / WiFi from the scratch

No, it points to a missing device. The interface wlan is not present (Message: 'wlan0: ERROR while getting interface flags: No such device
').
The link between the loaded driver and the device is missing. The device itself is the correct one for the driver - a RTL8188 based one (Micro-Adapter 'Joy-It' from Reichelt)

Re: WLan / WiFi from the scratch

Tadaa. Solved!
Issue was a wrong driver which I had chosen from the Realtek site. I didn't match to the real Hardware.
Confusing point was that
'modinfo 8192cu | grep 8176'
gave the information
'alias: usb:v0BDAp8176d*dc*dsc*dp*ic*isc*ip*'

The Vendor ID and product code were listed correctly, but not working ?!?!?

So I decided to compile another one (RTL8188CUS) which works fine so far.
Seems to be one of many Linux traps u can run in.

Re: WLan / WiFi from the scratch

Story is to be continued, maybe I can get some more help here.
Point ist, that during startup process all paramaters for the card are sei in /etc/network/interfaces - for sure, also the wlan0 interface. The config looks like:
[...snipp...]
allow-hotplug wlan0
iface wlan0 inet static
address 169.254.1.1
netmask 255.255.0.0
broadcast 169.254.255.255
wireless-mode ad-hoc
wireless-key s:tosecret2show
wireless-keymode restrict
wireless-essid MyNetwork
[...snapp...]

At the end, address, netmask, broadcast are set fine, but -surprise- wireless- parameters are not set.
dmesg tells at the point where the card needs to be configured, that the hardware is not ready, yet: ADDRCONF(NETDEV_UP): wlan0: link is not ready

On console, it is possible to start the interface with iwconfig wlan0 .... w/o problems

I know, the driver needs at about 2 seconds to come up (dmesg again: rtl8192cu_hal_init in 1920ms) , so I need some delay between enabling the Interface and configuring it.

Question: How can I tell Linux to wait some seconds between starting the Interface and configuring the network device?

Solved again. Answering to own questions is kind of self focusing, but maybe I can help other users with that instead of just deleting this comment...
I tried several times to modify rc.local with that line:
/bin/sleep 10 && /sbin/iwconfig wlan0 mode ad-hoc essid MyNetwork key s:tosecret2show restricted
that failed all the time.
Reason was an error some lines earlier in rc.local which means that the execution is stopped. Shit happens.

Syndicate content