PDA

View Full Version : Wireless problems fixer script (Installs compat and patches it)



noes1s
11-03-2011, 11:31 PM
This script usually fixes the next problems:
- Constant internet disconnects
- Problems connecting to APs
- Problems to internet surfing after connecting to APs
- mon0: -1 channel on airodump-mg
- injection problems with aireplay-ng

What it does:
- Installs compat-wireless drivers automatically and patches it. (Works on 2.6 and 3.0 kernels)

Included patches:
- channel-negative-one-maxim.patch
- mac80211.compat08082009.wl_frag+ack_v1.patch
- zd1211rw-inject+dbi-fix-2.6.26.patch
- mac80211_2.6.32.2-wl_frag+ack_radiotap.patch

Language? Bash

Link: (Disabled until its fixed)
- Problem detected: The script works well with generic linux kernels, but BT5 custom kernel its incompatible with the new compat installer. (Fixing it)

How to use it?
(Internet connection required to download the drivers, use an ethernet connection or something)
- Copy the text on the link into a new text document, save it as "wifix" on some folder.
- Open the terminal and cd to that folder
- Use the command "sudo bash wifix" to load the script
- The script menu will open, choose "1" to install compat wireless.

MichaelF
11-06-2011, 01:10 AM
root@bt:~/Desktop# sudo bash wifix
: command not found
: command not found
: command not found
'ifix: line 15: syntax error near unexpected token `{
'ifix: line 15: `InstallCompat(){


This script usually fixes the next problems:
- Constant internet disconnects
- Problems connecting to APs
- Problems to internet surfing after connecting to APs
- mon0: -1 channel on airodump-mg
- injection problems with aireplay-ng

What it does:
- Installs compat-wireless drivers automatically and patches it. (Works on 2.6 and 3.0 kernels)

Included patches:
- channel-negative-one-maxim.patch
- mac80211.compat08082009.wl_frag+ack_v1.patch
- zd1211rw-inject+dbi-fix-2.6.26.patch
- mac80211_2.6.32.2-wl_frag+ack_radiotap.patch

Language? Bash

Link: http://pastebin.com/raw.php?i=RHSv9w8y

How to use it?
(Internet connection required to download the drivers, use an ethernet connection or something)
- Copy the text on the link into a new text document, save it as "wifix" on some folder.
- Open the terminal and cd to that folder
- Use the command "sudo bash wifix" to load the script
- The script menu will open, choose "1" to install compat wireless.

noes1s
11-06-2011, 05:07 PM
Transferring it from Windows has left the CR/LF line endings on it. Those are invisible line end characters that are added to the original document on dos plataforms. Linux doesnt do that thing.

Solution 1 (copy it right):
- You can either copy the script using Linux, and copying it from the link provided in this post http://pastebin.com/raw.php?i=RHSv9w8y wich its clear from CR/LF endings. (If you copy the colored version of the script, http://pastebin.com/RHSv9w8y it will cause problems, same as if you click on "Copy to clipboard)

Solution 2 (fix it):
- Or with the actual copy that you got on root@bt:~/Desktop, use this command to clean the document out of CR/LF endings:

cat wifix | sed '/\015/d' > wifix2

Then use:

sudo bash wifix2

Extra info:
- You can discover those characters using Geany instead of Gedit, just enable the next on Geany: View > Editor > Show Line Endings

Snayler
11-07-2011, 04:23 AM
Doesn't work for me.


--2011-11-07 04:21:22-- http://patches.aircrack-ng.org/channel-negative-one-maxim.patch
Resolving patches.aircrack-ng.org... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2
Connecting to patches.aircrack-ng.org|213.186.33.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1021 [text/plain]
Saving to: `STDOUT'

100%[======================================>] 1,021 --.-K/s in 0s

2011-11-07 04:21:22 (44.7 MB/s) - written to stdout [1021/1021]

patching file net/wireless/chan.c
Hunk #1 succeeded at 82 (offset 33 lines).
Hunk #2 succeeded at 134 (offset 55 lines).
--2011-11-07 04:21:22-- http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
Resolving patches.aircrack-ng.org... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2
Connecting to patches.aircrack-ng.org|213.186.33.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1049 (1.0K) [text/plain]
Saving to: `STDOUT'

100%[======================================>] 1,049 --.-K/s in 0s

2011-11-07 04:21:22 (43.7 MB/s) - written to stdout [1049/1049]

patching file net/mac80211/tx.c
Hunk #1 succeeded at 781 (offset 104 lines).
--2011-11-07 04:21:22-- http://patches.aircrack-ng.org/zd1211rw-inject+dbi-fix-2.6.26.patch
Resolving patches.aircrack-ng.org... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2
Connecting to patches.aircrack-ng.org|213.186.33.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1876 (1.8K) [text/plain]
Saving to: `STDOUT'

100%[======================================>] 1,876 --.-K/s in 0.001s

2011-11-07 04:21:22 (1.57 MB/s) - written to stdout [1876/1876]

patching file drivers/net/wireless/zd1211rw/zd_mac.c
Hunk #1 succeeded at 227 with fuzz 1 (offset 6 lines).
Hunk #2 succeeded at 975 (offset 155 lines).
Hunk #3 succeeded at 989 (offset 155 lines).
Hunk #4 FAILED at 1162.
1 out of 4 hunks FAILED -- saving rejects to file drivers/net/wireless/zd1211rw/zd_mac.c.rej
--2011-11-07 04:21:22-- http://patches.aircrack-ng.org/mac80211_2.6.32.2-wl_frag+ack_radiotap.patch
Resolving patches.aircrack-ng.org... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2
Connecting to patches.aircrack-ng.org|213.186.33.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2658 (2.6K) [text/plain]
Saving to: `STDOUT'

100%[======================================>] 2,658 --.-K/s in 0.003s

2011-11-07 04:21:22 (761 KB/s) - written to stdout [2658/2658]

patching file include/net/ieee80211_radiotap.h
Hunk #1 succeeded at 251 with fuzz 2 (offset 11 lines).
patching file net/mac80211/tx.c
Hunk #1 succeeded at 779 with fuzz 1 (offset 101 lines).
Hunk #2 succeeded at 1102 with fuzz 1 (offset 124 lines).
Hunk #3 FAILED at 1035.
Hunk #4 succeeded at 1264 with fuzz 1 (offset 166 lines).
1 out of 4 hunks FAILED -- saving rejects to file net/mac80211/tx.c.rej
/tmp/compat-wireless-2.6.39-rc6-1/config.mk:204: "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m."
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.39.4/build M=/tmp/compat-wireless-2.6.39-rc6-1 modules
make[1]: Entering directory `/lib/modules/2.6.39.4'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.39.4'
make: *** [modules] Error 2

(!) Unknown installation error

MichaelF
11-08-2011, 12:00 AM
I tried all the fixes you mentioned without success. Either received the same error or only the last 2 lines. I downloaded straight into Linux, and got the same error. I downloaded Geany (which is great - thanks). I tried using the default Gnome network package, but it was not great. I removed both it and Wicd, and just used wpa_supplicant at the command line with a config file, and set my laptop not to sleep, and so far that seems to work. I appreciate your efforts though.


Transferring it from Windows has left the CR/LF line endings on it. Those are invisible line end characters that are added to the original document on dos plataforms. Linux doesnt do that thing.

Solution 1 (copy it right):
- You can either copy the script using Linux, and copying it from the link provided in this post http://pastebin.com/raw.php?i=RHSv9w8y wich its clear from CR/LF endings. (If you copy the colored version of the script, http://pastebin.com/RHSv9w8y it will cause problems, same as if you click on "Copy to clipboard)

Solution 2 (fix it):
- Or with the actual copy that you got on root@bt:~/Desktop, use this command to clean the document out of CR/LF endings:

cat wifix | sed '/\015/d' > wifix2

Then use:

sudo bash wifix2

Extra info:
- You can discover those characters using Geany instead of Gedit, just enable the next on Geany: View > Editor > Show Line Endings