OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Sharp ROMs => Topic started by: enodr on December 28, 2006, 05:45:04 pm

Title: Wpa-gui Backported To Sharprom
Post by: enodr on December 28, 2006, 05:45:04 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!

[img]http://www.geek-fr.com/_media/blog/qpe-wpa-gui.jpg\" border=\"0\" class=\"linked-image\" /]

I still need to make a few tweakings so that everything fits on a the Zaurus display, then I'll post the file.
Title: Wpa-gui Backported To Sharprom
Post by: HoloVector on December 28, 2006, 07:58:32 pm
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149378\"][{POST_SNAPBACK}][/a][/div]
Nice!  I can't wait to try it under Cacko on my C1000 and C3200.  Thanks.
Title: Wpa-gui Backported To Sharprom
Post by: harvell on December 29, 2006, 03:37:00 am
This is huge!!!! no more editing wpa-supplicant files.  I look forward to loading it.  I just reflashed to cacko.
Title: Wpa-gui Backported To Sharprom
Post by: Hrw on December 29, 2006, 12:34:37 pm
Can you share patches/sources? wpa-gui for opie would be nice to have.
Title: Wpa-gui Backported To Sharprom
Post by: enodr on December 29, 2006, 06:36:23 pm
Quote
Can you share patches/sources? wpa-gui for opie would be nice to have.

Of course I can! I always do

http://sharpromfeed.home.linuxtogo.org/dow...r_qpe.0.5.6.tgz (http://sharpromfeed.home.linuxtogo.org/download/projects/wpa_gui_for_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?
Title: Wpa-gui Backported To Sharprom
Post by: jfv on December 30, 2006, 02:54:14 am
Could we get an ipk including the wpa supplicant and the GUI, so as to have one install, please?

Thanks

Felipe
Title: Wpa-gui Backported To Sharprom
Post by: harvell on January 03, 2007, 08:33:37 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.
Title: Wpa-gui Backported To Sharprom
Post by: enodr on January 04, 2007, 05:51:36 am
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149967\"][{POST_SNAPBACK}][/a][/div]

/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 -
- 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.
Title: Wpa-gui Backported To Sharprom
Post by: speculatrix on January 04, 2007, 10:00:39 am
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!
Title: Wpa-gui Backported To Sharprom
Post by: bolbit on January 09, 2007, 04:32:25 pm
Hi, anychance to get an ipk of this gui ?
Thanks.
Title: Wpa-gui Backported To Sharprom
Post by: Jon_J on January 09, 2007, 04:38:21 pm
Quote
Hi, anychance to get an ipk of this gui ?
Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150580\"][{POST_SNAPBACK}][/a][/div]
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.
Title: Wpa-gui Backported To Sharprom
Post by: alijames on February 16, 2007, 05:36:00 am
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
Title: Wpa-gui Backported To Sharprom
Post by: alijames on February 16, 2007, 05:37:30 am
In fact , if enodr is not around at the moment, can someone else have a go at building it and post it?

Cheers,

Alistair
Title: Wpa-gui Backported To Sharprom
Post by: harvell on March 08, 2007, 02:42:09 am
Quote
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149967\"][{POST_SNAPBACK}][/a][/div]

/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 -
- 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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150007\"][{POST_SNAPBACK}][/a][/div]

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: [Select]
$ sudo wpa_supplicant -Dhostap -c /etc/wpa_supplicant.conf -i wlan0
wpa_supplicant v0.3.8
Copyright © 2003-2005, Jouni Malinen 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 -c [-D] \
      [-N -i -c [-D] ...]

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: [Select]
$ 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
 

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
Title: Wpa-gui Backported To Sharprom
Post by: speculatrix on March 08, 2007, 05:08:20 am
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: [Select]
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
Title: Wpa-gui Backported To Sharprom
Post by: harvell on March 08, 2007, 03:52:39 pm
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?
Title: Wpa-gui Backported To Sharprom
Post by: speculatrix on March 08, 2007, 06:17:36 pm
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
Title: Wpa-gui Backported To Sharprom
Post by: harvell on March 22, 2007, 01:06:18 am
Has any one achieved success with this gui besides Enodr???
Title: Wpa-gui Backported To Sharprom
Post by: Jon_J on April 25, 2007, 12:44:14 pm
"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 (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.
Title: Wpa-gui Backported To Sharprom
Post by: harvell on April 27, 2007, 06:26:40 pm
Quote
"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 (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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159783\"][{POST_SNAPBACK}][/a][/div]

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.
Title: Wpa-gui Backported To Sharprom
Post by: danboid on May 03, 2007, 04:57:21 am
Where can I download an .ipk of this cacko wpa setup tool?
Title: Wpa-gui Backported To Sharprom
Post by: sdjf on May 20, 2007, 12:47:17 am
Quote
Where can I download an .ipk of this cacko wpa setup tool?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160349\"][{POST_SNAPBACK}][/a][/div]

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

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

sdjf
Title: Wpa-gui Backported To Sharprom
Post by: gaarder on July 12, 2007, 03:45:33 am
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.
Title: Wpa-gui Backported To Sharprom
Post by: gaarder on July 13, 2007, 12:04:39 pm
I have prepared an ipkg.

http://168weedon.com/zaurus/wpa_gui_0.5.6_arm.ipk (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.
Title: Wpa-gui Backported To Sharprom
Post by: jfv on July 13, 2007, 12:08:29 pm
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?
Title: Wpa-gui Backported To Sharprom
Post by: mikew on May 30, 2008, 03:33:26 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.

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
Title: Wpa-gui Backported To Sharprom
Post by: speculatrix on June 06, 2008, 01:02:30 pm
Quote from: 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.

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