Pwireless-0.8.4

Configuration wizards, scanners, remote desktop, etc.
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

Pwireless-0.8.4

#1 Post by plinej »

Here's a little app I wrote in gtkdialog that scans and connects to selected wifi networks. I know there's already rutilt but I was bored last night at work and wrote this just for something to do. Feel free to modify it anyway you see fit.

0.2 - added a Profile tab so you can save and edit specified wifi hotspots. Also added signal and noise rates to the main gui. I also added the tweaks that maddox mentioned.

0.2.2 - squashed a couple of bugs

0.3 - renamed to Pwireless and repackaged

0.3.1 - fixed a potential bug incase a colon is placed after Channel in "iwlist scanning".

0.3.2 - another fix for maddox

0.3.3 - more bug squashing

0.3.4 - cleaned up a little code

0.4 - found and fixed a bug that may print multiple lines of output by mistake & changed how the progress bar is run (it will restart if you don't connect the first time and need to try again).

0.5 - cleaned up a little more code, found a fixed a couple of potential problems, & added AP MAC address to the gui.

0.6 - more bug fixing

0.6.1 - added "mode" to the iwconfig options

0.7 - some more code modifications thanks to maddox sending me his iwlist and iwconfig outputs.

0.7.1 - another bug squashing attempt for maddox

0.7.2 - more potential problems should be fixed thanks to maddox sending me his iwconfig & iwlist scanning outputs.

0.8 - fixed a bug when x'ing to close the app, thanks to John Doe.

0.8.2 - forum member "urban soul" has made some updates mentioned below:

- all edits marked with #urban
- line numbers likely to have changed..

[421ff, 657ff] during testing I found fixes for ralink rt73, orinoco_cs and prism2.5/host_ap. (these drivers don't support all iwconfig commands and get 'out of business' sometimes)
[line 8ff] make save script. note: It was impossible to have gtkdialog echo a literal backslash \. Otherwise I would have preferred to use the command: ed -s /etc/WAG/profile-conf <<< $'/$SSID/+4s/ESSID*.*/ESSID=\"$ESSID\"/g\nw' #change the essid eg.but the \n is the big problem here. It connot be echoed. No way.
[line 400 & 499] exec save script (use profile-conf)
[line 469ff] add key field to 'new profile' dialog
[line 375+568ff] rearranged iwconfig commands for buggy NICS + break the commandline into pieces (applies only for 'connect' button)
[line 99 ff] read /etc/WAG/profile-conf into combobox
[line 81] added $DEVICE to file: /tmp/Pwireless-dhcp
[line 341] rudimentary support for fix IP configuration. added "IP" field. "auto" means dhcpcd. todo:gateway etc.
[line 364] add support for static IP - reuse /tmp/Pwireless- for IP configuration
[line 6] Version Statement (in titlebar - was wrong.)

known issues:
- click cancel in DHCP wait loop does not kill DHCP; should return to scan window immediately.
- delete profile && return back to profiles tab (not possible with gtkdialog)
- Text in Combobox (Profile-Name) can be edited but is not accounted for due to wag-save-funktion. (on my TODO list)

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

0.8.3 - bugfix

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

0.8.4

Went back to 0.8.1 and applied my 0.8.3 bugfix and some of urban's fixes for 0.8.2. I wanted to go back to my original way for saving profiles since the 0.8.2 & 0.8.3 versions were broken. You'll probably want to delete the files inside /root/.config/pwireless/ before you run this version.
Attachments
pwireless-0.8.4.pet
(4.99 KiB) Downloaded 2765 times
Last edited by plinej on Thu 01 Jan 2009, 23:05, edited 20 times in total.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#2 Post by plinej »

Here's a pic of the wireless-gtkdialog-0.2
Attachments
wireless-gtkdialog-0.2.jpg
(80.77 KiB) Downloaded 3899 times
Last edited by plinej on Thu 01 Nov 2007, 19:28, edited 1 time in total.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#3 Post by zigbert »

Rutilt: 190 kb
Plinej: 2 kb

Who's the Puppy :D

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#4 Post by plinej »

The only other thing I plan on implementing in is another tab for saved profiles so if you use a WEP connection you won't have to type in the WEP key everytime. Let me know if there's anything else you guys would like and if it sounds good to me I'll try to work on it.

maddox
Posts: 454
Joined: Fri 28 Sep 2007, 20:37
Location: sometimes in France

#5 Post by maddox »

hello plinej,
here's my mods for it to work in Toutou 217+X (french puppy)

Code: Select all

line 126 Channel: | sed 's/^[ ^t]*//' | sed 's/Channel://g'   (my channel ends with :)
line 127 quality  Cell $NUM" -A 9    (my output is longer than 5 lines)
line 128 encryption  Cell $NUM" -A 9   (my output is longer than 5 lines)
line 291 sleep 2   (complained about the 8.5 and sleep 8 was toooo long)
output of wireless-gtkdialog:
wlan0 Scan completed :
Cell 01 - Address: xx:xx:xx:xx:xx:xx
ESSID:" "
Mode:Master
Channel:6
Bit Rates:1 Mb/s
Bit Rates:2 Mb/s
Bit Rates:5.5 Mb/s
Bit Rates:11 Mb/s
Encryption key:off
Quality=60/128 Signal level=-76 dBm Noise level=-97 dBm

is there a way to input a hidden ESSID, because at home it's hidden for a reason.
thanks for the gui Image
maddox

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#6 Post by plinej »

Cool thanks, I'll work on putting in your modifications. I am working on a profiles tab so you can add a selected ESSID to your profiles and then edit whatever needs editing from inside the gui. That should work just fine for hidden ESSID's. I know the sleep is long at 8.5 for the progress bar, I just threw that in there so you'll know the program is trying to connect. I will change it to a whole number though. Just out of curiousity could you post your output of "iwlist scanning"? I would like to see how yours compares with what I get here in the U.S.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#7 Post by plinej »

updated to 0.2

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#8 Post by plinej »

I just updated it to 0.2.1, since I noticed I forgot to add a couple lines to delete a profile if the delete button is clicked.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#9 Post by plinej »

I just noticed another bug when using the profiles section and your ESSID has a space in the name. I'll try and work on it later today and post another version.

friedsonjm
Posts: 208
Joined: Sat 10 Mar 2007, 14:49

#10 Post by friedsonjm »

with WPA?

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#11 Post by plinej »

0kay, 0.2.2 has a couple of bug fixes. Everything seems to be working the way I believe it should. So please give some feedback if you use this program.

Once again, I've never used WPA but with the new profiles tab you'll be able to edit and save configurations for saved profiles. I would imagine you could make WPA work from within the profiles tab after some editing.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#12 Post by plinej »

I renamed the script to Pwireless like Barry suggested in his blog and repackaged the program.

maddox
Posts: 454
Joined: Fri 28 Sep 2007, 20:37
Location: sometimes in France

#13 Post by maddox »

hello plinej,
thanks for incorporating the hidden ESSID request.
I still have to edit line 179 channel line, in the latest version
but hey, I can live with that, since i know what and where to edit to fix it.
bty, did a scan around, but seems like everyone's on holidays.
thanks again
maddox

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#14 Post by plinej »

--edit--

disregard

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#15 Post by plinej »

Alright, I somehow thought I fixed that issue but I see I didn't. I modified the line a little so it should work just fine incase there's a colon or not after Channel. I'll post a 0.3.1 version in a few minutes. Here's how I changed the line:

Code: Select all

CHANNEL=`cat /tmp/Pwireless | grep "     Cell $NUM" -A 9 | grep "(Channel" | tail -c 4 | sed 's/)//g' | sed 's/ //g' | sed 's/://g'`

maddox
Posts: 454
Joined: Fri 28 Sep 2007, 20:37
Location: sometimes in France

#16 Post by maddox »

hello plinej,
did it bit by bit, echo ..
grep cell ->

Code: Select all

                    Channel:6

Code: Select all

grep "(Channel "
this is where it breaks, as you're looking for a bracket that doesn't exist in my output.
thanks and hope it helps
maddox

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

ahh, okay. I'll have 0.3.2 up shortly.

maddox
Posts: 454
Joined: Fri 28 Sep 2007, 20:37
Location: sometimes in France

#18 Post by maddox »

hello plinej,
now i get this as a channel -> lima 6

Code: Select all

Channel=l6
thats the tail part
maddox
Last edited by maddox on Sun 04 Nov 2007, 03:59, edited 1 time in total.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#19 Post by plinej »

Okay, I'll use grep to only have numbers in the results.

grep -o [0-9] should work. I'll package up 0.3.3 in a minute.

--edit--

Okay it needs to be this:

grep -o [0-9][0-9]*

since it may or may not be a double digit channel.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#20 Post by plinej »

Okay, 0.3.3 is up. Thank you maddox for testing! I want to make sure this works for everybody so please leave some testing feedback.

Post Reply