Saturday, January 24, 2009

Now wireless autostarts in Tiny Core

And how did I do it?
Actually, it was very simple but I'm not sure I could have stumbled upon the solution by myself. See, this thread for details.
But, in summary it seems that the bootlocal.sh script didn't recognize the "iwconfig" command unless the complete path was included i.e. /usr/local/sbib/iwconfig.
So, after making this change the script worked perfectly as part of bootlocal.sh.
Indeed, I was able to combine the startwifi script with ra0.sh (and just leaving out ra00.sh altogether) to make just one script to do the whole thing.
In addition, no "sleep" command at all is needed as apparently the tce's (particularly wireless_tools) are loaded before anything else.
Here's the script as it stands at the moment (although some further changes are still possible):

#!/bin/sh
ifconfig ra0 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.254
echo nameserver 208.67.222.222 > /etc/resolv.conf
echo nameserver 208.67.220.220 >> /etc/resolv.conf
cd /home/tc
cp rt2860sta.ko.gz /lib/modules/2.6.26-tinycore/kernel/drivers/net/
depmod -a
modprobe rt2860sta
ifconfig ra0 up
/usr/local/sbin/iwconfig ra0 key open
/usr/local/sbin/iwconfig ra0 key a784947226d4aedbfadce86783
/usr/local/sbin/iwconfig ra0 essid "eircom6523 7524"
ifconfig ra0 192.168.1.5 netmask 255.255.255.0
route add default gw 192.168.1.254

No comments:

Post a Comment