Author Topic: Wpa-gui Backported To Sharprom  (Read 18202 times)

enodr

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Wpa-gui Backported To Sharprom
« 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.

HoloVector

  • Hero Member
  • *****
  • Posts: 533
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #1 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.
« Last Edit: December 28, 2006, 08:02:16 pm by HoloVector »
I think I'm coming down with what kahm's got!  I now have 3 Zaurii in house!  ;)
Current: Zaurus SL-C3200 -  Bobby (Configuring pdaXii13 Akita with Full 5.4.9 upgrade running IceWM)
Zaurus SL-C1000 - Hachiko (Configuring Cacko 1.23 with evilJazz's new kernel)
Zaurus SL-C860 - Fett (Customized Cacko 1.23 with handmade Boba Fett Theme)
Symbol WiFi CF card|Buffalo WiFi CF Card|Buffalo Ethernet CF Card|Red Piel Frama Case|PDAir Case|Black Pelican 1020 Case|Pentopia Stylii|SaruTek Protectors|Transcend SDs (4GB 150X, 1GB 80X, 256MB 45X, 128MB 45X)|2GB PNY SD|2GB SanDisk SD|Transcend CFs (1GB 80X, 512MB 80X)|Sandisk CFs (4GB, 512MB, 256MB)|256MB Netac USB-CF|RH-1 Remote
Check out the ScummVM@tyrannozaurus page if you are an "adventurer" type of person.

harvell

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #2 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.
C1000 w/...  Cacko Lite (When I use the Z alot for business)... pdaXrom (when I see something cool and want to try it.  Best way for me to learn shell commands)
Eee PC for Mrs. Harvell  
4G SD

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #3 on: December 29, 2006, 12:34:37 pm »
Can you share patches/sources? wpa-gui for opie would be nice to have.
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

enodr

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #4 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

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?
« Last Edit: December 29, 2006, 06:44:42 pm by enodr »

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #5 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
SL 5000 D  and C860 Sharp ROM
Too many accessories...

harvell

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #6 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.
C1000 w/...  Cacko Lite (When I use the Z alot for business)... pdaXrom (when I see something cool and want to try it.  Best way for me to learn shell commands)
Eee PC for Mrs. Harvell  
4G SD

enodr

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #7 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.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #8 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!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

bolbit

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #9 on: January 09, 2007, 04:32:25 pm »
Hi, anychance to get an ipk of this gui ?
Thanks.
Zaurus C1000, Cacko 1.23, Symbol Wifi Card, BT USB dongle.
PdaXQtrom

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #10 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.
« Last Edit: January 09, 2007, 04:42:54 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

alijames

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #11 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
Alistair James

C3100 PdaXii13 Akita (with Full Hdimage)
Ambicom CF WLAN
Pharos CF LAN
Socket CF Bluetooth
Kingston 2GB SD
ZTek USB->Serial

alijames

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #12 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
Alistair James

C3100 PdaXii13 Akita (with Full Hdimage)
Ambicom CF WLAN
Pharos CF LAN
Socket CF Bluetooth
Kingston 2GB SD
ZTek USB->Serial

harvell

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://
Wpa-gui Backported To Sharprom
« Reply #13 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
« Last Edit: March 08, 2007, 02:54:08 am by harvell »
C1000 w/...  Cacko Lite (When I use the Z alot for business)... pdaXrom (when I see something cool and want to try it.  Best way for me to learn shell commands)
Eee PC for Mrs. Harvell  
4G SD

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Wpa-gui Backported To Sharprom
« Reply #14 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
« Last Edit: March 08, 2007, 05:08:39 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.