Capn_Fish
May 2 2007, 12:56 PM
I have written a wireless config utility for pdaXrom that works with 2.6.x kernels, and probably 2.4.x. A package for 2.6.x kernels is attached, as is the source code. If you compile it yourself, make the directory /home/root/Choices/wlanconfig. It probably will only run as root.
Have fun, and feedback is welcome.
EDIT: Fixed a (major) bug, will upload the new source and a new package ASAP.
EDIT2: New stuff attached.
EDIT3: More bugs found. New stuff will be up ASAP.
EDIT4: I think all the bugs are worked out, so here's version 1.0. Any feedback is still welcome.
EDIT5: Forgot to remove some junk I used for debugging. New stuff attached.
EDIT6: Updated to v1.1, now with static IP address support. Not fully tested. Changelog also added to source code.
EDIT7: Updated to v1.2.Flags added to the executable. Type #wlanconfig help to see them.
EDIT8: Updated to v1.3. Feedback is now given after connecting, profile listing works better, and a few other things. See page 3 of this thread and/or the changelog for more details. Note that if you are updating from an older version, you must rename ~/Choices/wlanconfig/active to ~/.../.active.
EDIT9: Updated to v0.1 of the rewrite (v2). See changelog for details.
EDIT10: Wlanconfig2-2 is now out! Now with a GUI (in FLTK). Get my FLTK build from the new packages thread to use it (1.1.7).
EDIT11: A very small update. Just turned power management on, as my card got really hot with it off. YMMV.
EDIT12: Updated the stuff to v0.2 with support for interface selection. You need to add your interface (eg, wlan0) on a new line in your profiles for this release to work!
EDIT13: new ipk up, source will be soon
EDIT14: Source is up now.
To build it, run fltk-config --compile wlanconfig2-2.cxx when in the source directory.
Also, it can run in console mode by passing the "console" flag on the command line, and the ipk name should be "wlanconfig2-2..."
QUOTE(Capn_Fish @ May 2 2007, 08:56 PM)
I have written a wireless config utility for pdaXrom that works with 2.6.x kernels, and probably 2.4.x. A package for 2.6.x kernels is attached, as is the source code. If you compile it yourself, make the directory /home/root/Choices/wlanconfig. It probably will only run as root.
Have fun, and feedback is welcome.
EDIT: Fixed a (major) bug, will upload the new source and a new package ASAP.
EDIT2: New stuff attached.
EDIT3: More bugs found. New stuff will be up ASAP.
Excellent! Very good news!
Capn_Fish
May 2 2007, 04:46 PM
At least somebody's showing some interest.
I've got all of the bugs worked out AFAICT, so I'm going to attach version 1.0 in my first post.
Still, testing is welcome.
InSearchOf
May 2 2007, 05:55 PM
Thanks for the effort... I haven't had a chance to try it out... but I will
Late
Capn_Fish
May 2 2007, 05:58 PM
Cool.
It doesn't have a GUI, but it works great (and is totally keyboard-driven). My hope is that somebody can take the code and write a frontend for it so that it can replace the broken lan & wifi tool in pdaXrom.
Meanie
May 2 2007, 06:17 PM
QUOTE(Capn_Fish @ May 3 2007, 11:58 AM)
Cool.
It doesn't have a GUI, but it works great (and is totally keyboard-driven). My hope is that somebody can take the code and write a frontend for it so that it can replace the broken lan & wifi tool in pdaXrom.
well, a few comments.
you are hardcoding /home/root, wouldn't reading the $HOME variable of the current user or ~/Choices/wlanconfig be a better choice?
also, you are assuming everyone is using dhcp. some people actually assign static ip addresses and have more complex gateway and routing configs as well as multiple dns entries.
Capn_Fish
May 2 2007, 06:35 PM
QUOTE(Meanie @ May 2 2007, 09:17 PM)
QUOTE(Capn_Fish @ May 3 2007, 11:58 AM)
Cool.
It doesn't have a GUI, but it works great (and is totally keyboard-driven). My hope is that somebody can take the code and write a frontend for it so that it can replace the broken lan & wifi tool in pdaXrom.
well, a few comments.
you are hardcoding /home/root, wouldn't reading the $HOME variable of the current user or ~/Choices/wlanconfig be a better choice?
also, you are assuming everyone is using dhcp. some people actually assign static ip addresses and have more complex gateway and routing configs as well as multiple dns entries.
Can I just put $HOME in my code instead of /home/root?
If there is a good page on how to set up the static ip/complex gateways/multiple DNS stuff, I may be able to add it in, but I'm really new to C++, so no guarentees.
Thanks for the input. I'll do my best to fix up the code tomorrow (for the $HOME thing). Others are free to modify it as well.
Meanie
May 2 2007, 06:43 PM
QUOTE(Capn_Fish @ May 3 2007, 12:35 PM)
QUOTE(Meanie @ May 2 2007, 09:17 PM)
QUOTE(Capn_Fish @ May 3 2007, 11:58 AM)
Cool.
It doesn't have a GUI, but it works great (and is totally keyboard-driven). My hope is that somebody can take the code and write a frontend for it so that it can replace the broken lan & wifi tool in pdaXrom.
well, a few comments.
you are hardcoding /home/root, wouldn't reading the $HOME variable of the current user or ~/Choices/wlanconfig be a better choice?
also, you are assuming everyone is using dhcp. some people actually assign static ip addresses and have more complex gateway and routing configs as well as multiple dns entries.
Can I just put $HOME in my code instead of /home/root?
If there is a good page on how to set up the static ip/complex gateways/multiple DNS stuff, I may be able to add it in, but I'm really new to C++, so no guarentees.
Thanks for the input. I'll do my best to fix up the code tomorrow (for the $HOME thing). Others are free to modify it as well.
have a look at my net.agent script for an example. it sets up wifi and usb ethernet with either dhcp or static ip depending on the config options.
sdjf
May 2 2007, 07:04 PM
Are you guys including debugging output to a logfile as a standard now?
All it takes in the calls to dhcpcd is adding a -d, plus you have to enable the log in /etc/syslog.conf.
I've been working on a script to do this for all ROMs. Are you interested in seeing it?
I would add something else to it other than dhcpcd if I knew what else people used, but I guess you could do that yourselves sooner.
sdjf
Meanie
May 2 2007, 07:48 PM
QUOTE(sdjf @ May 3 2007, 01:04 PM)
Are you guys including debugging output to a logfile as a standard now?
All it takes in the calls to dhcpcd is adding a -d, plus you have to enable the log in /etc/syslog.conf.
I've been working on a script to do this for all ROMs. Are you interested in seeing it?
I would add something else to it other than dhcpcd if I knew what else people used, but I guess you could do that yourselves sooner.
sdjf
debugging should not be enabled by default on a Zaurus. It just slows down the already slow IO, therefore, no
daniel3000
May 2 2007, 11:01 PM
Thanks Fish!
But please let me know - why do you say the LAN&WIFI app is broken?
Here it works okay, and I have recently added basic WPA support which is still in testing stage:
http://www.oesf.org/forums/index.php?showtopic=23804daniel
Meanie
May 3 2007, 12:24 AM
QUOTE(daniel3000 @ May 3 2007, 05:01 PM)
Thanks Fish!
But please let me know - why do you say the LAN&WIFI app is broken?
Here it works okay, and I have recently added basic WPA support which is still in testing stage:
http://www.oesf.org/forums/index.php?showtopic=23804daniel
probably because he is using 2.6 kernel where there is no cardctrl but some other command instead. if 2.6 kernel is still using the same scheme format and location as before then that would be the only change requried.
however, this new tool does more than configure the wifi profile, it also makes a connection which the python tool does not do.
sdjf
May 3 2007, 05:29 AM
QUOTE(Meanie)
probably because he is using 2.6
kernel where there is no cardctrl but
some other command instead.
Is there a cardctrl command in some kernels as well as a cardctl command, or was that a typo?
Thanks,
sdjf
InSearchOf
May 3 2007, 07:04 AM
QUOTE(sdjf @ May 3 2007, 09:29 AM)
QUOTE(Meanie)
probably because he is using 2.6
kernel where there is no cardctrl but
some other command instead.
Is there a cardctrl command in some kernels as well as a cardctl command, or was that a typo?
Thanks,
sdjf
AFAIK, just cartctl...
Late
grog
May 3 2007, 08:49 AM
QUOTE(InSearchOf @ May 3 2007, 09:04 AM)
QUOTE(sdjf @ May 3 2007, 09:29 AM)
QUOTE(Meanie)
probably because he is using 2.6 kernel where there is no cardctrl but some other command instead.
Is there a cardctrl command in some kernels as well as a cardctl command, or was that a typo?
AFAIK, just cartctl...
r197
CODE
$ uname -a
Linux zaurus 2.6.16 #1 PREEMPT Wed Apr 11 15:59:50 UTC 2007 armv5tel unknown
$ pccardctl
pcmciautils 014
Copyright (C) 2004-2005 Dominik Brodowski, (C) 1999 David A. Hinds
Report errors and bugs to <linux-pcmcia@lists.infradead.org>, please.
invalid or unknown argument
Usage: pccardctl COMMAND
Supported commands are:
ls
insert
eject
suspend
resume
reset
info
status
config
ident
InSearchOf
May 3 2007, 09:24 AM
QUOTE(grog @ May 3 2007, 12:49 PM)
QUOTE(InSearchOf @ May 3 2007, 09:04 AM)
QUOTE(sdjf @ May 3 2007, 09:29 AM)
QUOTE(Meanie)
probably because he is using 2.6 kernel where there is no cardctrl but some other command instead.
Is there a cardctrl command in some kernels as well as a cardctl command, or was that a typo?
AFAIK, just cartctl...
r197
CODE
$ uname -a
Linux zaurus 2.6.16 #1 PREEMPT Wed Apr 11 15:59:50 UTC 2007 armv5tel unknown
$ pccardctl
pcmciautils 014
Copyright (C) 2004-2005 Dominik Brodowski, (C) 1999 David A. Hinds
Report errors and bugs to <linux-pcmcia@lists.infradead.org>, please.
invalid or unknown argument
Usage: pccardctl COMMAND
Supported commands are:
ls
insert
eject
suspend
resume
reset
info
status
config
ident
They were talking about 2.4 kernel...
I thought
Late
Capn_Fish
May 3 2007, 10:23 AM
QUOTE(Meanie @ May 2 2007, 09:43 PM)
have a look at my net.agent script for an example. it sets up wifi and usb ethernet with either dhcp or static ip depending on the config options.
It just occurred to me...If you have a script that does this already, why should I make another one?
Also, where is said script?
sdjf
May 3 2007, 10:36 AM
About pccardctl, looks like the difference is it adds 2 options (ls and info). I would guess it works the same otherwise? I guess I will check a man page when have more time. This is helpful info.
Thanks,
sdjf
Capn_Fish
May 3 2007, 10:43 AM
QUOTE(sdjf @ May 3 2007, 01:36 PM)
About pccardctl, looks like the difference is it adds 2 options (ls and info). I would guess it works the same otherwise? I guess I will check a man page when have more time. This is helpful info.
Thanks,
sdjf
I thought that pccardctl didn't accept schemes (e.g. no 'pccardctl scheme xyz'), and that was the big difference?
Capn_Fish
May 3 2007, 11:03 AM
OK, I've added support for static IP addresses. I'll test it now and see if it works.
Capn_Fish
May 3 2007, 02:18 PM
Packages and source updated to version 1.1. Static IP addresses are now supported and the source now has a changelog.
This release is not fully tested, but it should be good.
Comments/bug reports/criticism/requests (no guarentees) are still welcome and encouraged.
sdjf
May 3 2007, 02:20 PM
QUOTE(Capn_Fish)
I thought that pccardctl didn't
accept schemes (e.g. no 'pccardctl
scheme xyz'), and that was the big difference?
Whoops!

My oversight...haven't had time to find a man page, and I forgot about the schemes as never use them. Was talking about the command list for cardctl.
sorry,
sdjf
Capn_Fish
May 3 2007, 02:28 PM
QUOTE(sdjf @ May 3 2007, 05:20 PM)
QUOTE(Capn_Fish)
I thought that pccardctl didn't
accept schemes (e.g. no 'pccardctl
scheme xyz'), and that was the big difference?
Whoops!

My oversight...haven't had time to find a man page, and I forgot about the schemes as never use them. Was talking about the command list for cardctl.
sorry,
sdjf
No big deal.
Meanie
May 3 2007, 05:28 PM
QUOTE(Capn_Fish @ May 4 2007, 04:23 AM)
QUOTE(Meanie @ May 2 2007, 09:43 PM)
have a look at my net.agent script for an example. it sets up wifi and usb ethernet with either dhcp or static ip depending on the config options.
It just occurred to me...If you have a script that does this already, why should I make another one?
Also, where is said script?
it's part of pdaXii13 customisation,
http://www.tyrannozaurus.com/feed/pdaXii13...ii13-custom.tgz
HoloVector
May 10 2007, 08:00 PM
Capn Fish,
Thanks for the handy tool. I find it is very useful for the issue I am having with my wifi card in R198. Can I pass variables to it directly from the terminal without using your interface? My wifi card needs a deactivate before I can activate it. I would like to include your tool in a shell script that would run a deactivate then activate everytime I insert the card. I tried the obvious ones like wlanconfig deactivate and wlanconfig 2 but they don't work.
Meanie
May 10 2007, 10:27 PM
QUOTE(HoloVector @ May 11 2007, 02:00 PM)
Capn Fish,
Thanks for the handy tool. I find it is very useful for the issue I am having with my wifi card in R198. Can I pass variables to it directly from the terminal without using your interface? My wifi card needs a deactivate before I can activate it. I would like to include your tool in a shell script that would run a deactivate then activate everytime I insert the card. I tried the obvious ones like wlanconfig deactivate and wlanconfig 2 but they don't work.
personally, i think that tool should be written as a X GUI, and the text version should be command line driven
the best would be if the tool automatically starts a GUI if no command line option was given, but if command line arguments are passed, it just does what it is told to do without popping up the GUI....
Capn_Fish
May 11 2007, 03:45 AM
I'm working on that. That's why I was asking about GTK/FLTK/QT in the other thread.
HoloVector
May 11 2007, 09:12 AM
Thanks Capn Fish. I'm especially looking forward to the command line addition to your utility. Although the GUI would be appreciated too especially for profile setups.
Capn_Fish
May 11 2007, 12:20 PM
I still need to figure out how to pass command line variables. Once I find a place documenting it, I'll probably have a version with it implemented within a few hours (likely within an hour).
So....Anybody got a place with docs on the subject?
HoloVector
May 11 2007, 12:36 PM
Thank you very much. I wish I did have the information for you but, I'm pretty much clueless when it comes to dev type work.
sdjf
May 11 2007, 01:21 PM
I'm lost. I know passing variables in shell scripts, but is that or isn't that what you want?
If it's a PCMCIA device, then cardctl (or the similar pccardctl) could be what you need to suspend, resume, reset...which options are appropriate depend on the state of the device when you use cardctl/pccardctl.
In qtopia roms, qcop would also be needed, but I understand this is just pdaX-flavor, right?
sdjf
sdjf
May 11 2007, 01:30 PM
Another comment. No time to search for specific docs, but if the arguments are whole words, they can be addressed as $1, $2, $3, and so on, within the script.
Advanced Bash Scripting Guide may help:
http://tldp.org/LDP/abs/htmlThere also is a pdf somewhere that makes an easier read.
sdjf
Capn_Fish
May 11 2007, 03:01 PM
I'm actually looking for how to to it (pass variables/flags to a program) in C++.
sdjf
May 11 2007, 03:23 PM
Oops...I did download the source and see it isn't bash. Are you sure you want to just overwrite the directories instead of testing for their presence and only making them if they don't already exist? I'm wondering if something might get lost that way, or it would generate an error?
sdjf
sdjf
May 11 2007, 03:39 PM
Try this:
http://www.lix.polytechnique.fr/~liberti/t...nosolutions.pdfGoogle's advanced search helps...I don't know C++ but there seems to be example of command-line input in it.
sdjf
Capn_Fish
May 12 2007, 08:57 AM
The files are about to be updated. See the first post for details.
Capn_Fish
May 12 2007, 08:57 AM
The files are about to be updated. See the first post for details.
Capn_Fish
May 15 2007, 10:47 AM
Are there any features (besides a GUI) that people find to be missing from the app?
grog
May 15 2007, 05:58 PM
QUOTE(Capn_Fish @ May 15 2007, 12:47 PM)
Are there any features (besides a GUI) that people find to be missing from the app?
First off, GREAT GREAT GREAT utility. Many thanks.
Since you asked

, a few requests:
- instead of showing 'active' as a profile, can the active profile be marked in the list (say with a '*')?
- can the profile list be shown one per line (would make it easier to read IMHO)?
- for setting the active profile, can the existing profiles be presented in a list to be selected?
- can we have an option to run ifconfig/iwconfig to show the connection details? Or maybe have that run after a connection is made to indicate success.
thanks
Capn_Fish
May 16 2007, 06:33 AM
QUOTE(grog @ May 15 2007, 08:58 PM)
QUOTE(Capn_Fish @ May 15 2007, 12:47 PM)
Are there any features (besides a GUI) that people find to be missing from the app?
First off, GREAT GREAT GREAT utility. Many thanks.
Since you asked

, a few requests:
1. instead of showing 'active' as a profile, can the active profile be marked in the list (say with a '*')?
2. can the profile list be shown one per line (would make it easier to read IMHO)?
3. for setting the active profile, can the existing profiles be presented in a list to be selected?
-4.can we have an option to run ifconfig/iwconfig to show the connection details? Or maybe have that run after a connection is made to indicate success.
thanks
1. I can probably do that, but it won't be the first thing to go in, as it appears to be more difficult than the others.
EDIT: How about having the "active" profile simply not shown, then having the active profile name listed at the bottom:
CODE
>6
profileA
profileB
profileC
profileD
Active: /home/xyz/Choices/wlanconfig/profileC
2. Easily done. (done)
3. Probably (see #1) EDIT: I made it so it'll list the profiles before you select the active one...I'm working on having it complain if the file/profile doesn't exist.
4. I can have it be run after making any connection or have a prompt after making said connection saying "Would you like to see the details of your connection?" or something like that. Which would be better/less annoying? And for passing stuff in the command line to skip the UI? (done, up for changing)
EDIT: It'll have to be the same for both UI and no UI, as they use the same code.

EDIT: iwconfig, ifconfig, or both?
Thanks for the input.
grog
May 16 2007, 07:20 AM
QUOTE(Capn_Fish @ May 16 2007, 08:33 AM)
1. I can probably do that, but it won't be the first thing to go in, as it appears to be more difficult than the others.
EDIT: How about having the "active" profile simply not shown, then having the active profile name listed at the bottom:
CODE
>6
profileA
profileB
profileC
profileD
Active: /home/xyz/Choices/wlanconfig/profileC
works for me.
QUOTE
2. Easily done. (done)
kewl
QUOTE
3. Probably (see #1) EDIT: I made it so it'll list the profiles before you select the active one...I'm working on having it complain if the file/profile doesn't exist.
double kewl

QUOTE
4. I can have it be run after making any connection or have a prompt after making said connection saying "Would you like to see the details of your connection?" or something like that. Which would be better/less annoying? And for passing stuff in the command line to skip the UI? (done, up for changing)
I'd say have it default to coming up if being run interactively, otherwise no.
QUOTE
EDIT: It'll have to be the same for both UI and no UI, as they use the same code.

I don't see that as a problem.
QUOTE
EDIT: iwconfig, ifconfig, or both?
iwconfig I guess, specifcally for the affected interface (wlan0).
good work! keep it up!! thanks
Capn_Fish
May 16 2007, 08:12 AM
I'm posting new stuff within a few minutes. I didn't get to making the app check for files' existance, so I'm going to make a new version soon that is "idiot proof," ie will complain if something is wrong and not fail silently like it does now.
grog
May 23 2007, 07:14 AM
I had to drop off the radar for a while (new addition to the family, now even
less spare time

). I just downloaded 1.3, thanks for the changes, they work great.
One more request

. Can you add an option to show the settings of a profile? Either prompting for the profile to show, or maybe just the active one, whatever you think. This can be as simple as just spitting the file out, but would be better if the settings could be labeled so we know what they are.
thanks again.
Capn_Fish
May 23 2007, 10:05 AM
QUOTE(grog @ May 23 2007, 10:14 AM)
I had to drop off the radar for a while (new addition to the family, now even
less spare time

). I just downloaded 1.3, thanks for the changes, they work great.
One more request

. Can you add an option to show the settings of a profile? Either prompting for the profile to show, or maybe just the active one, whatever you think. This can be as simple as just spitting the file out, but would be better if the settings could be labeled so we know what they are.
thanks again.
Just so I don't get this wrong, you want an option in the menu that just spits out the raw stuff stored in the profile file, so output would be something like this:
CODE
SSID: somessid
Key: xxxxxxxxxx
IP: dhcp
IP could of course actually be an IP address.
grog
May 23 2007, 11:12 AM
QUOTE(Capn_Fish @ May 23 2007, 12:05 PM)
Just so I don't get this wrong, you want an option in the menu that just spits out the raw stuff stored in the profile file, so output would be something like this:
CODE
SSID: somessid
Key: xxxxxxxxxx
IP: dhcp
IP could of course actually be an IP address.
That is precisely what I had in mind. thks
Capn_Fish
May 23 2007, 01:34 PM
QUOTE(grog @ May 23 2007, 02:12 PM)
QUOTE(Capn_Fish @ May 23 2007, 12:05 PM)
Just so I don't get this wrong, you want an option in the menu that just spits out the raw stuff stored in the profile file, so output would be something like this:
CODE
SSID: somessid
Key: xxxxxxxxxx
IP: dhcp
IP could of course actually be an IP address.
That is precisely what I had in mind. thks
It'll probably get done either today or tomorrow.
Capn_Fish
May 27 2007, 07:22 AM
Sorry this is taking so long. I found some bugs that could lead to having incorrect information inputted/outputted that are taking a while to sort out.
Capn_Fish
May 27 2007, 07:30 AM
I think I'm going for a rewrite here. This is just WAY full of bugs, and I should be able to make it more efficient. Don't worry, I'll keep the old code around, just in case.
grog
May 27 2007, 07:54 AM
QUOTE(Capn_Fish @ May 27 2007, 09:22 AM)
Sorry this is taking so long. I found some bugs that could lead to having incorrect information inputted/outputted that are taking a while to sort out.
QUOTE(Capn_Fish @ May 27 2007, 09:30 AM)
I think I'm going for a rewrite here. This is just WAY full of bugs, and I should be able to make it more efficient. Don't worry, I'll keep the old code around, just in case.
Hey, take your time. And I'm sorry for opening such a big can-o-worms

I'm sure I can speak for all of us that we really appreciate your hard work on this.
Capn_Fish
May 27 2007, 08:12 AM
I really enjoy coding, so it's not really work for me.
But really, I should thank you. I had no idea that there were so many issues with the code, and you made me notice them. Plus the way I'm doing it now requires me to learn how to use pointers, which is something I've been meaning to learn to do for a long time*.
I also wasn't really apologizing for it taking a long time, it was more for me saying that it would be done in a couple days than not having it done.
*A note to all of you who are knowledgeable about C++: I WILL have questions concerning these
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.