Author Topic: New Network Config Utility  (Read 18558 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
New Network Config Utility
« on: May 02, 2007, 04:56:12 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..."
« Last Edit: August 04, 2007, 04:52:07 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
New Network Config Utility
« Reply #1 on: May 02, 2007, 08:25:59 pm »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160304\"][{POST_SNAPBACK}][/a][/div]
Excellent!  Very good news!
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
New Network Config Utility
« Reply #2 on: May 02, 2007, 08:46:32 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
New Network Config Utility
« Reply #3 on: May 02, 2007, 09:55:37 pm »
Thanks for the effort... I haven't had a chance to try it out... but I will

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
New Network Config Utility
« Reply #4 on: May 02, 2007, 09:58:10 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
New Network Config Utility
« Reply #5 on: May 02, 2007, 10:17:17 pm »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160332\"][{POST_SNAPBACK}][/a][/div]

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.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
New Network Config Utility
« Reply #6 on: May 02, 2007, 10:35:51 pm »
Quote
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160332\"][{POST_SNAPBACK}][/a][/div]

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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160334\"][{POST_SNAPBACK}][/a][/div]
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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
New Network Config Utility
« Reply #7 on: May 02, 2007, 10:43:23 pm »
Quote
Quote
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160332\"][{POST_SNAPBACK}][/a][/div]

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

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.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
New Network Config Utility
« Reply #8 on: May 02, 2007, 11:04:59 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
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
New Network Config Utility
« Reply #9 on: May 02, 2007, 11:48:56 pm »
Quote
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160339\"][{POST_SNAPBACK}][/a][/div]

debugging should not be enabled by default on a Zaurus. It just slows down the already slow IO, therefore, no
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
New Network Config Utility
« Reply #10 on: May 03, 2007, 03:01:05 am »
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:

https://www.oesf.org/forums/index.php?showtopic=23804

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
New Network Config Utility
« Reply #11 on: May 03, 2007, 04:24:48 am »
Quote
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:

https://www.oesf.org/forums/index.php?showtopic=23804

daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160343\"][{POST_SNAPBACK}][/a][/div]

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.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
New Network Config Utility
« Reply #12 on: May 03, 2007, 09:29:01 am »
Quote
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
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
New Network Config Utility
« Reply #13 on: May 03, 2007, 11:04:00 am »
Quote
Quote
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160367\"][{POST_SNAPBACK}][/a][/div]

AFAIK, just cartctl...

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
New Network Config Utility
« Reply #14 on: May 03, 2007, 12:49:58 pm »
Quote
Quote
Quote
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?[div align=\"right\"][a href=\"index.php?act=findpost&pid=160367\"][{POST_SNAPBACK}][/a][/div]
AFAIK, just cartctl...[div align=\"right\"][a href=\"index.php?act=findpost&pid=160377\"][{POST_SNAPBACK}][/a][/div]
r197

Code: [Select]
$ 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 , please.
invalid or unknown argument
Usage: pccardctl COMMAND
Supported commands are:
        ls
        insert
        eject
        suspend
        resume
        reset
        info
        status
        config
        ident
GROG!