Wireless diagnostic / troubleshooting script

This forum is dedicated to new ideas, suggestions and proposals.

Wireless diagnostic / troubleshooting script

Postby doktor5000 » Aug 11th, '13, 19:54

As problems with wireless connections occur rather often, and have multiple causes, i've taken a diagnostic script created for Bodhi Linux (debian-based) http://wiki.bodhilinux.com/doku.php?id=wireless_script and modified it slightly for Mageia. I'd like to extend it a little bit and restructure it,
as it misses same parts about firmware, blacklisting the way it's implemented in Mageia and maybe multiple wpa_supplicant instances.

Also i didn't have time to test networkmanager related stuff, but shouldn't be a big deal.

Attached is my version of the script, please check it out and provide some feedback, it would also be nice if you would volunteer to help improve it.

wireless_script_2.1.sh.txt
download, remove extension .txt and make executable with chmod +x wireless_script_2.1.sh
-> results will be saved as wireless-results.txt
(89.21 KiB) Downloaded 264 times


EDIT: Original version is available at http://sourceforge.net/projects/wirelessscript/files/
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Wireless diagnostic / troubleshooting script

Postby tom_ » Aug 11th, '13, 23:35

it worked almost fine on my machine, here some idea to improve it:

- In my laptop lshw was not installed, the script wrote:

Code: Select all
tom@localhost Desktop]$ sudo ./wireless_script_2.1.sh  --verbose
[sudo] password for tom:
./wireless_script_2.1.sh: line 2166: server1-link: command not found
Performing initial enviroment checks.....
which: no lshw in (/sbin:/bin:/usr/sbin:/usr/bin)
cannot find required binaries


it would be better suggest something like "please run urpmi lshw when a connection is availlable"

- running the script with lshw installed, it stopped before the end (should end with "probe complete...please see 'wireless-results.txt")

Code: Select all
tom@localhost Desktop]$ sudo ./wireless_script_2.1.sh  --verbose
./wireless_script_2.1.sh: line 2166: server1-link: command not found
Performing initial enviroment checks.....
Please select an adaptor to check

1. AR9285 Wireless Network Adapter (PCI-Express)
2. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
3. Exit
1
Please be patient. Depending on your setup this could take some time...
tom@localhost Desktop]$


running the script with "bash -x" It end with:

Code: Select all
+ echo 'Please be patient. Depending on your setup this could take some time...'
Please be patient. Depending on your setup this could take some time...
+ call_redirect_stdout
+ exec
+ exec
+ exec
tom@localhost Desktop]$



- everytime the script runs, I can see this line: "./wireless_script_2.1.sh: line 2166: server1-link: command not found"

- It searches for files that in MGA have different name/location
Code: Select all
/etc/network/interfaces does not exist
/etc/modprobe.d/blacklist.conf does not exist


- the last line in the generated report is
Code: Select all
DEBUG: Interface value null in call_ping_target


- finally: my connection is working fine so the script didn't raise any problem,
but it would be nice if the script could be able to suggest some action to the user in order to improve/solve the situation
(but probably bash is not the better language to write a smarter script, so this point could require a full rewrite of this script)
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: Wireless diagnostic / troubleshooting script

Postby doktor5000 » Aug 12th, '13, 20:56

To maybe clarify something - the script can be improved by everyone.

I don't need that script for myself, just thought it may be a help to get a consolidated and structured baseline for troubleshooting.
Also I'm not sure when i've got enough time and mood to work on this again, as structured/conditional bash scripts are not my favourite thing to work on, even more so when they were not created by me originally and need to re reworked.

====

urpmi installation is currently only implemented for rfkill, and could be easily done for the other binaries too.
But it would be easier for me to put this into an RPM package, as that way all the required binaries would all be installed in one go.

line 2166: server1-link - that's the only thing on that line, don't know what the author intended with this, removed it now.

And it probably stops in the end due to installed network-manager, without it it should go through rather quickly (under a minute altogether).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Ideas and suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron