Help - Search - Members - Calendar
Full Version: Wpa-gui Backported To Sharprom
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > Sharp ROMs
enodr
I have been looking for this one for ages, so I did it myself! It's really a pain to backport QT3 apps to QPE but when it works it's so cool (took me the afternoon...).

So here it is, the first real GUI for easy Wifi under Sharprom!



I still need to make a few tweakings so that everything fits on a the Zaurus display, then I'll post the file.
HoloVector
QUOTE(enodr @ Dec 28 2006, 04:45 PM)
I have been looking for this one for ages, so I did it myself! It's really a pain to backport QT3 apps to QPE but when it works it's so cool (took me the afternoon...).

So here it is, the first real GUI for easy Wifi under Sharprom!

...
I still need to make a few tweakings so that everything fits on a the Zaurus display, then I'll post the file.
*

Nice! I can't wait to try it under Cacko on my C1000 and C3200. Thanks.
harvell
This is huge!!!! no more editing wpa-supplicant files. I look forward to loading it. I just reflashed to cacko.
Hrw
Can you share patches/sources? wpa-gui for opie would be nice to have.
enodr
QUOTE(Hrw @ Dec 29 2006, 09:34 AM)
Can you share patches/sources? wpa-gui for opie would be nice to have.


Of course I can! I always do wink.gif

http://sharpromfeed.home.linuxtogo.org/dow...r_qpe.0.5.6.tgz

I have adapted the UI so that it can work both on landscape and portrait mode. It required some tweakings in the network details dialog because there were too many options to show on one screen, so I have modified it to display only the relevant info depending on the current selection (if you choose WEP network the WPA options will hide automatically, ...).

I have also added a "Connect" button on the Scan dialog, it is more intuitive than double clicking on a network name.

Hrw, I let you add this in OE, making a recipe should be easy as 1, 2, 3 (I have modified the wpa_gui.pro file accordingly). After installation don't forget to chown root:root wpa_gui && chmod u+s wpa_gui (need root to read /var/run/wpa_supplicant/).

Please give feedbacks.

Edit: just noticed an annoying bug. When you switch to another window and clik on the wpa_gui icon on the taskbar, the app won't get the focus as it should. I imagine this is a qte trick. Anyone could help?
jfv
Could we get an ipk including the wpa supplicant and the GUI, so as to have one install, please?

Thanks

Felipe
harvell
I noticed the cacko rom had wpa_supplicant preloaded with the rom. However it's not in "/var/run/wpa_supplicant". It's in /home/root/usr/bin/wpa_supplicant

Should I link it? Sorry if it sounds dumb sometimes the newb in me comes out. biggrin.gif
enodr
QUOTE(harvell @ Jan 3 2007, 05:33 PM)
I noticed the cacko rom had wpa_supplicant preloaded with the rom.  However it's not in "/var/run/wpa_supplicant".  It's in /home/root/usr/bin/wpa_supplicant

Should I link it? Sorry if it sounds dumb sometimes the newb in me comes out. biggrin.gif
*


/var/run/wpa_supplicant/ is a directory created when you launch wpa_supplicant. In this directory there is one socket for each Wifi card (eg wlan0). So no do not link anything here. Just:
- create a blank /etc/wpa_supplicant.conf file (sudo mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.sample && touch /etc/wpa_supplicant.conf)
- launch wpa_supplicant (wpa_supplicant -Dhostap -c/etc/wpa_supplicant.conf -iwlan0 -cool.gif
- you can optionally create a script to launch wpa_supplicant at startup (put in /etc/rc.d/init.d and link to /etc/rc.d/rc5.d/)
- launch wpa-gui
- Enjoy!

PS: I noticed that dhcpcd would not give me a new IP address when connecting with wpa-gui unless I had disabled and enabled the wifi card before. Sending a dhcpcd -N should do this, but it's not working. Maybe I overlooked some easy step here.
speculatrix
the way I normally do this (in cacko) do this is to use the qtopia gui to set up the wifi net, exit the gui, then edit /etc/pcmcia/wlan-ng.opts and add the line "WPA=y" to the appropriate qpewlanXX section; this then triggers the wlan startup scripts to kick off the wpa daemon.

I'd then have to edit the /etc/wpa_supplicant.conf file manually too.

This is a great tool, well done!
bolbit
Hi, anychance to get an ipk of this gui ?
Thanks.
Jon_J
QUOTE(bolbit @ Jan 9 2007, 03:32 PM)
Hi, anychance to get an ipk of this gui ?
Thanks.
*

I was wondering about that also.
I downloaded the attached file, but it seems like it needs to be compiled, which is something I have not figured out how to do yet. wink.gif
alijames
enodr,

Have you uploaded the ipk of this anywhere yet? I have not yet got my build system up and running since changing jobs, so an ipk would be very useful to me.

If not, could you post it here so I can try it out?

Cheers,

Alistair
alijames
In fact , if enodr is not around at the moment, can someone else have a go at building it and post it?

Cheers,

Alistair
harvell
QUOTE(enodr @ Jan 4 2007, 02:51 AM)
QUOTE(harvell @ Jan 3 2007, 05:33 PM)
I noticed the cacko rom had wpa_supplicant preloaded with the rom.  However it's not in "/var/run/wpa_supplicant".  It's in /home/root/usr/bin/wpa_supplicant

Should I link it? Sorry if it sounds dumb sometimes the newb in me comes out. biggrin.gif
*


/var/run/wpa_supplicant/ is a directory created when you launch wpa_supplicant. In this directory there is one socket for each Wifi card (eg wlan0). So no do not link anything here. Just:
- create a blank /etc/wpa_supplicant.conf file (sudo mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.sample && touch /etc/wpa_supplicant.conf)
- launch wpa_supplicant (wpa_supplicant -Dhostap -c/etc/wpa_supplicant.conf -iwlan0 -cool.gif
- you can optionally create a script to launch wpa_supplicant at startup (put in /etc/rc.d/init.d and link to /etc/rc.d/rc5.d/)
- launch wpa-gui
- Enjoy!

PS: I noticed that dhcpcd would not give me a new IP address when connecting with wpa-gui unless I had disabled and enabled the wifi card before. Sending a dhcpcd -N should do this, but it's not working. Maybe I overlooked some easy step here.
*



Thanks for the help so far. I also appreciate your new Sharp feed.

I noticed that in cacko the wpa_supplicant version is at 0.3.8. It was giving me problems when with the wpa_supplicant.conf file when I tried to start it.


CODE
$ sudo wpa_supplicant -Dhostap -c /etc/wpa_supplicant.conf -i wlan0
wpa_supplicant v0.3.8
Copyright 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
 wpa_supplicant [-BddehLqqvw] -i<ifname> -c<config file> [-D<driver>] \
     [-N -i<ifname> -c<conf> [-D<driver>] ...]

drivers:
 hostap = Host AP driver (Intersil Prism2/2.5/3)
 wext = Linux wireless extensions (generic)
options:
 -B = run daemon in the background
 -d = increase debugging verbosity (-dd even more)
 -K = include keys (passwords, etc.) in debug output
 -t = include timestamp in debug messages
 -h = show this help text
 -L = show license (GPL and BSD)
 -q = decrease debugging verbosity (-qq even less)
 -v = show version
 -w = wait for interface to be added, if needed
 -N = start describing new interface

No networks (SSID) configured.


So I noticed in your feed that you compiled a newer version of wpa_supplicant of 0.4.9. When I tried to start it I got this

CODE
$ sudo /home/root/usr/sbin/wpa_supplicant -D hostap -c /etc/wpa_supplicant.conf -i wlan0
ioctl[SIOCSIWPMKSA]: No such device
ioctl[SIOCSIWMODE]: No such device
Could not configure driver to use managed mode
SIOCSIFFLAGS: No such device
Could not set interface 'wlan0' UP
ioctl[SIOCGIWRANGE]: No such device
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: No such device
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: No such device
ioctl[PRISM2_IOCTL_HOSTAPD]: No such device
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: No such device
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: No such device
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: No such device
Failed to set encryption.
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: No such device
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: No such device
l2_packet_receive - recvfrom: Network is down
ioctl[SIOCSIWSCAN]: No such device
Failed to initiate AP scan.
ioctl[SIOCGIWSCAN]: No such device

blink.gif

Could this be from having the older version that's built into the Cacko ROM? Or am I just a knuckle head that's missing something obvious. When this process is running it does not create anything in /var/run/ .

Thanks in advance for the help smile.gif
speculatrix
to make WPA work in Cacko is easy but not obvious. Use the qtopia applet as normal and create the network object, then exit.

then, become root and edit the /etc/pcmcia/wlan-ng.opts, find the qpewlanX config you just created and (X is a number) and add the line "WPA=y".

then simply add an entry into /etc/wpa_supplicant.conf like this:
CODE
network={
       ssid="My_Wireless_Lan"
       psk="my wpa passphrase."
       priority=5
}



the only problem with the qtopia applet is that it won't accept a space in the SSID; to fix this, have to edit the wlan-ng.opts.

the individual wifi settings are stored in files in
/home/zaurus/Applications/Network/modules (it took me a while to find that out!)
so you can also make manual hacks in there too
harvell
Thanks for the heads up Speculatrix. I've setup wpa in cacko before when I know the ssid and passphrase. However I'm hoping that this gui that enodr backported will give us a better automated process. The problem I'm having is that if you don't know the ssid and enter it in the wpa_supplicant.conf file it will not let the daemon keep running. Or at least kick into the /var/run directory.

Correct me if I'm wrong but theoretically we should be able to kick off the wpa_supplicant daemon in a "ap-scan" mode and then use the gui to find service set id's. From there use the gui to enter in a passphrase and have that edit the wpa_supplicant.conf file to ensure our passphrases our encrypted. Am I right with this thought process?
speculatrix
wpa supplicant has options to wait for the device (wifi0) to appear, and I imagine you can dynamically add new entries to wpa_supplicant.conf and "hup" it (kill -1 $PID_OF_WPASUPP).

the way I think wireless tools in suse works is to set a blank ssid, get the card to scan, identify whether wep/wpa or none and ask for a passphrase, and then it creates a specific /var/run/wpa_supplicant.conf.wlan0 or similar and starts off wpasupp with that as config file

I haven't tried the wpa gui applet in this thread, I am already happy to hack the wlan-ng.conf and /etc/wpa~~ file
harvell
Has any one achieved success with this gui besides Enodr???
Jon_J
"Bump"
Was there ever an IPK made for this very useful GUI tool?

I have edited my files as shown in harvell's Cacko blog at tyrannozaurus.
http://www.tyrannozaurus.com/?q=cacko

But this GUI program would very handy if I need to do this again, as I'll need to look up how to edit these files again if I start over with a new flash.
harvell
QUOTE(Jon_J @ Apr 25 2007, 08:44 AM)
"Bump"
Was there ever an IPK made for this very useful GUI tool?

I have edited my files as shown in harvell's Cacko blog at tyrannozaurus.
http://www.tyrannozaurus.com/?q=cacko

But this GUI program would very handy if I need to do this again, as I'll need to look up how to edit these files again if I start over with a new flash.
*


Every time I tried it there was an error about starting the interface. Do you think he somehow used or needed to use qcop settings? I could never get it working.
danboid
Where can I download an .ipk of this cacko wpa setup tool?
sdjf
QUOTE(danboid @ May 3 2007, 01:57 AM)
Where can I download an .ipk of this cacko wpa setup tool?
*


Just see post #1 on page 1 of this thread. wink.gif

EDIT: Oops...I see it may not be an ipk yet. sad.gif

sdjf
gaarder
There is no ipk but a compiled binary file for wpa-gui is in the source package. All you need to do is copy it to your bin path.

I am still trying to get it to connect with wpa-supplicant under Cacko 1.23 tho.
gaarder
I have prepared an ipkg.

http://168weedon.com/zaurus/wpa_gui_0.5.6_arm.ipk

By installing this ipkg, your existing /etc/wpa_supplicant.conf will be backed up at /etc/wpa_supplicant.conf.bak, and a "default" wpa_supplicant.conf will be created.

The gui itself is not capable of doing much... it can connect to wpa_supplicant and monitor some of its status. I cannot get the modify bit to work too, modifying directly wpa_supplicant.conf is probably the faster way to make wpa work on zaurus.

I can't compile it on my zaurus, otherwise I would have delve deeper into the code.

Installed together with the ipk is also a script wpa_sup.sh that starts wpa_supplicant, use at your own risk.
jfv
Thanks for the ipk. If I want to install this on an original Sharp ROM (not cacko) which files do I need and where do I get them? I guess I'll need at least the wpa_supplicant binary.

Thanks

EDIT: I found online wpa_supplicant ipks for pdaxrom and openzaurus, should I try either of these?
mikew
Speculatrix

Just retired & decided to see if I could get my Zaurus 3200 with Cacko ROM using your setting but they did not work for me.

Also had a look at the wifi settings are stored in files in /home/zaurus/Applications/Network/modules but could not see anything relevant.

I used Hex PSK so left out the double quotes.

Any suggestions?

Mike Woodward
speculatrix
QUOTE(mikew @ May 30 2008, 07:33 PM) *
Speculatrix

Just retired & decided to see if I could get my Zaurus 3200 with Cacko ROM using your setting but they did not work for me.


er, I'm a bit lost. basically, to do wpa manually you add the WPA=y to /etc/pcmcia/wlan-ng.opts file into the relevant section - take a backup copy of the file beforehand. The qtopia config app can overwrite that file so be prepared to put it back.

then edit/create the /etc/wpa_supplicant.conf file.

you see, cacko hasn't modified the original sharp qtopia app to have an option for WPA as there's no source code, hence adding the flag manually; the actual network up/down stuff is shell scripts so cacko picks up the WPA flag and takes appropriate action.

HTH
Paul
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.