View Single Post
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#394
I've made a small qbw button for loading and unloading wl1251 for those who might find it usefull.


And also created two shortcuts to load or unload from anywhere in xterm by just typing "wifion" or "wifioff"

Short instructions:

1. open your load.sh and edit the paths to match yours
Code:
#!/bin/sh
# Save mac address
MACADDR="`ifconfig wlan0 | sed -n 's/.*HWaddr \([0-9A-Fa-f:]\+\).*/\1/p'`"
# Unload wifi modules
rmmod wl1251_spi 2>/dev/null
rmmod wl1251 2>/dev/null
rmmod wl12xx 2>/dev/null
rmmod mac80211 2>/dev/null
rmmod cfg80211 2>/dev/null
rmmod rfkill_backport 2>/dev/null
rmmod compat_firmware_class 2>/dev/null
rmmod compat 2>/dev/null
# Load bleeding-edge wl1251
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/compat.ko
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/rfkill_backport.ko
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/cfg80211.ko
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/mac80211.ko
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/wl1251.ko
insmod /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/wl1251_spi.ko
# Restore mac address
ifconfig wlan0 down hw ether "$MACADDR"
2. copy wifion and wifioff to /usr/bin and make it executable
Code:
cd /usr/bin
chmod a+x wifion
chmod a+x wifioff
Check the path in both files
Code:
#!/bin/sh

sh /home/user/MyDocs/wl1251-maemo/binary/compat-wireless/load.sh
3. copy wifion.png and wifioff.png to /home/user/.queen_beecon_dir

4. create a new queen beecon widget on desktop -> go to advanced and "Import File to Buffer" -> then "Buffer to Beecon"
Use file Wl1251.txt from attachments (the one in the zip file is outdated) remove .txt if you want before importing.

Edit: I forgot to mention that you'll need sudser package installed for QBW executing the command properly.
Code:
apt-get install sudser
Edit2: Added a proper Wl1252 queen beecon import file (see attachments) with valid instance export data.

Done!

Have fun,

..::J4ZZ::..
Attached Images
  
Attached Files
File Type: zip Widget_wl1251.zip (356.0 KB, 191 views)
File Type: txt Wl1251.txt (2.0 KB, 163 views)

Last edited by J4ZZ; 2011-05-26 at 12:45.
 

The Following 7 Users Say Thank You to J4ZZ For This Useful Post: