Topic: wicd on a Openmoko Neo Freerunner

Hello,

after the successful installation of wicd 1.4.2 on my notebook, I have installed wicd also on my Freerunner, princible also with success.

The very special point was to modify the manager-settings.conf:
1. wired_interface = usb0
2. wireless_interface = eth0

The next point is the missing ethtool/mii-tool. This sequence should be modify for handheld/PDA/mobile phones:
>    # thanks to apienk01 for this
>   # now uses ethtool because it is newer, and if that fails, uses mii-tool
>    @dbus.service.method('org.wicd.daemon.wired')
>    def CheckPluggedIn(self):
>        import re
>        link_tool = 'ethtool'
>        tool_data = misc.Run( link_tool + ' ' + self.wired.wired_interface,True)
>        if not misc.RunRegex(re.compile('(Operation not supported)',re.I),tool_data) is None:
>            print 'ethtool seems to be incompatible with hardware, falling back to mii-tool'
>            link_tool = 'mii-tool'
>        if not misc.RunRegex(re.compile('(Invalid argument)',re.I),tool_data) is None:
>            print 'wired interface appears down, putting up for link check'
>            misc.Run( 'ifconfig ' + self.wired.wired_interface + ' up' )
>        tool_data = misc.Run( link_tool + ' ' + self.wired.wired_interface)
>        if not misc.RunRegex(re.compile('(Link detected: yes)|(link ok)',re.I),tool_data) is None:
>            return True
>        else:
>            return False
>    # End function CheckPluggedIn

Isn't it possible to get the same information in result just by ifconfig. E.g. if wired_interface is up but has no IP, this line is missing in the output of ifconfig. I guess there is to think about.

A further point is a problem with the click to the touchscreen. wicd don't react about these clicks. What is to change? Is it in additional possible to enlarge the icons in the list of (W)LANs? How to do that?

I will keep investigating on my side, maybe we find a nice solution for Freerunner, christian

Last edited by wesselch (2008-08-11 12:13:06)

Re: wicd on a Openmoko Neo Freerunner

As I told before: I am not an expert in python.

I tried to change the function CheckPluggedIn and get an error:
The change:
>    # thanks to apienk01 for this
>    # now uses ethtool because it is newer, and if that fails, uses mii-tool
>    @dbus.service.method('org.wicd.daemon.wired')
>    def CheckPluggedIn(self):
>        import re
>        tool_data = misc.Run( 'ifconfig ' + self.wired.wired_interface,True)
>        if not misc.RunRegex(re.compile('RUNNING',re.I),tool_data) is None:
>            return True
>        else:
>            print 'wired interface appears down, putting up for link check'
>            res = misc.Run( 'ifconfig ' + self.wired.wired_interface + ' up',True)
>            return False
>    # End function CheckPluggedIn

The wicd.log:
2008/08/11 21:07:52 :: ---------------------------
2008/08/11 21:07:52 :: wicd initalizing...
2008/08/11 21:07:52 :: ---------------------------
2008/08/11 21:07:52 :: found wireless interface in configuration... setting wireless interface eth0
2008/08/11 21:07:53 :: found wired interface in configuration... setting wired interface usb0
2008/08/11 21:07:53 :: found wpa driver in configuration... setting wpa driver wext
2008/08/11 21:07:53 :: 0
2008/08/11 21:07:53 :: setting use global dns to 0
2008/08/11 21:07:53 :: setting use global dns to boolean False
2008/08/11 21:07:53 :: setting global dns
2008/08/11 21:07:53 :: global dns servers are None None None
2008/08/11 21:07:53 :: wired autoconnection method is 1
2008/08/11 21:07:53 :: wireless configuration file found...
2008/08/11 21:07:54 :: wired configuration file found...
2008/08/11 21:07:54 :: chmoding configuration files 0600...
2008/08/11 21:07:54 :: chowning configuration files root:root...
2008/08/11 21:07:54 :: autodetected wireless interface... automatically detected wireless interface None
2008/08/11 21:07:54 :: None
2008/08/11 21:07:54 :: using wireless interface... returning wireless interface to client
2008/08/11 21:07:54 :: eth0
2008/08/11 21:07:54 :: autoconnecting... returning wireless interface to client
2008/08/11 21:07:55 :: eth0
2008/08/11 21:07:55 :: scanning start
2008/08/11 21:07:55 ::  ##### 00:14:6C:5A:8A:80
2008/08/11 21:07:58 :: scanning done
2008/08/11 21:07:58 :: found 1 networks: 00:14:6C:5A:8A:80
2008/08/11 21:07:58 :: False
2008/08/11 21:07:58 :: False
2008/08/11 21:07:58 ::
2008/08/11 21:07:58 :: Traceback (most recent call last):
2008/08/11 21:07:58 ::   File "/opt/wicd/daemon.py", line 1230, in <module>
2008/08/11 21:07:59 ::     object = ConnectionWizard(bus_name)
2008/08/11 21:07:59 ::   File "/opt/wicd/daemon.py", line 142, in __init__
2008/08/11 21:07:59 ::     print self.AutoConnect(True)
2008/08/11 21:07:59 ::   File "/opt/wicd/daemon.py", line 349, in AutoConnect
2008/08/11 21:07:59 ::     if self.CheckPluggedIn() == True and self.GetWiredProfileList():
2008/08/11 21:07:59 ::   File "/opt/wicd/daemon.py", line 756, in CheckPluggedIn
2008/08/11 21:07:59 ::     if not misc.RunRegex(re.compile('RUNNING',re.I),tool_data) is None:
2008/08/11 21:07:59 ::   File "/opt/wicd/misc.py", line 41, in RunRegex
2008/08/11 21:07:59 ::     return m.groups()[0]
2008/08/11 21:07:59 :: IndexError: tuple index out of range

What's wrong?

Good night, christian

Re: wicd on a Openmoko Neo Freerunner

You should upgrade to 1.5.1, that function has been completely rewritten in the new version.

Re: wicd on a Openmoko Neo Freerunner

Hello Dan,

I downloaded wicd-1.5.1 and copied it to the Freerunner.

The <setup.py build> brings one error:

root@om-gta02:/media/card/wicd-1.5.1# python ./setup.py build 
Error importing wpath.py. You can safely ignore this
message. It is probably because you haven't run python setup.py
configure yet or you are running it for the first time.
Using init file Error setting up data array. This is normal if
python setup.py configure has not yet been run.
running build
running build_py
file wicd/wpath.py (for module wicd.wpath) not found
creating build
creating build/lib
creating build/lib/wicd
copying wicd/__init__.py -> build/lib/wicd
copying wicd/networking.py -> build/lib/wicd
copying wicd/misc.py -> build/lib/wicd
copying wicd/gui.py -> build/lib/wicd
copying wicd/wnettools.py -> build/lib/wicd
file wicd/wpath.py (for module wicd.wpath) not found

Where can I get w.path.py from? It is not inside the package from sourceforge.

christian

Re: wicd on a Openmoko Neo Freerunner

You need to run

python setup.py configure

before

python setup.py install

. It will generated wpath.py for you smile

Re: wicd on a Openmoko Neo Freerunner

I hoped it, but now I got following:

root@om-gta02:/media/card/wicd-1.5.1# python setup.py configure
Error importing wpath.py. You can safely ignore this
message. It is probably because you haven't run python setup.py
configure yet or you are running it for the first time.
Using init file Error setting up data array. This is normal if
python setup.py configure has not yet been run.
running configure
WARNING: Unable to detect the distribution in use.  If you have specified --init and --initfile, configure will continue.  Please report this warning, along with the name of your distribution, to the wicd developers.
lib is /usr/lib/wicd/
share is /usr/share/wicd/
etc is /etc/wicd/
images is /usr/share/pixmaps/wicd/
encryption is /etc/wicd/encryption/templates/
bin is /usr/bin/
sbin is /usr/sbin/
networks is /var/lib/wicd/configurations/
log is /var/log/wicd/
resume is /etc/acpi/resume.d/
suspend is /etc/acpi/suspend.d/
dbus is /etc/dbus-1/system.d/
desktop is /usr/share/applications/
icons is /usr/share/icons/hicolor/
translations is /usr/share/locale/
autostart is /etc/xdg/autostart/
init is FAIL/
docdir is /usr/share/doc/wicd/
mandir is /usr/share/man/
kdedir is /usr/share/autostart/
python is /usr/bin/python
pidfile is /var/run/wicd/wicd.pid
initfile is FAIL
initfilename is FAIL
Found switch ('no-install-init', None, 'do not install the init file') True
Found switch ('no-install-man', None, 'do not install the man file') False
Found switch ('no-install-kde', None, 'do not install the kde autostart file') False
Found switch ('no-install-acpi', None, 'do not install the suspend.d and resume.d acpi scripts') False
Found switch ('no-install-install', None, 'do not install the INSTALL file') False
Found switch ('no-install-license', None, 'do not install the LICENSE file') False
Replacing values in template files...
Replacing values in init=default=wicd.in init/default/wicd
error: init/default/wicd: No such file or directory

I don't know the correct name of the distribution, it is specially create for the Openmoko.

christian

Re: wicd on a Openmoko Neo Freerunner

Hello Adam, Dan,

I had a look at wicd=wpath.py.in file. Isn't it possible to modify the values manually.

I just need a hint for initfile and initfilename.
And where to store the wpath.py after modification.
How do you thing about this:
lib = '/usr/lib/wicd/'
share = '/usr/share/wicd/'
etc = '/etc/wicd/'
images = '/usr/share/pixmaps/wicd/'
encryption = '/etc/wicd/encryption/templates/'
bin = '/usr/bin/'
networks = '/var/lib/wicd/configurations/'
log = '/var/log/wicd/'

# other, less useful entries
resume = '/etc/acpi/resume.d/'
suspend = '/etc/acpi/suspend.d/'
sbin = '/usr/sbin/'
dbus = '/etc/dbus-1/system.d/'
desktop = '/usr/share/applications/'
translations = '/usr/share/locale/'
icons = '/usr/share/icons/hicolor/'
autostart = '/etc/xdg/autostart/'

init = '%INIT%'

docdir = '/usr/share/doc/wicd/'
mandir = '/usr/share/man/'
kdedir = '/usr/share/autostart/'

python = '/usr/bin/python'
pidfile = '/var/run/wicd/wicd.pid'

# stores something like other/wicd
# really only used in the install
initfile = '%INITFILE%'

# stores only the file name, i.e. wicd
initfilename = '%INITFILENAME%'

no_install_init = %NO_INSTALL_INIT%
no_install_man = %NO_INSTALL_MAN%
no_install_kde = %NO_INSTALL_KDE%
no_install_acpi = %NO_INSTALL_ACPI%
no_install_install = %NO_INSTALL_INSTALL%
no_install_license = %NO_INSTALL_LICENSE%

I need just a little help, christian

Re: wicd on a Openmoko Neo Freerunner

Same information about the distri:

root@om-gta02:/media/card/wicd-1.5.1# uname -a
Linux om-gta02 2.6.24 #1 PREEMPT Thu Apr 24 08:23:36 CST 2008 armv4tl unknown

Re: wicd on a Openmoko Neo Freerunner

Where are the init files store on that distro?

Re: wicd on a Openmoko Neo Freerunner

if you mean the start/stop scripts, then it is /etc/init.d/. There is an old file from wicd-1.4.2 call wicd.

Re: wicd on a Openmoko Neo Freerunner

I modify the initfile = '/etc/init.d' and initfilename='wicd' and run python setup.py install. Now I got the next error:
root@om-gta02:/media/card/wicd-1.5.1# python ./setup.py install
Error importing wpath.py. You can safely ignore this
message. It is probably because you haven't run python setup.py
configure yet or you are running it for the first time.
Using init file Error setting up data array. This is normal if
python setup.py configure has not yet been run.
running install
running build
running build_py
copying wicd/__init__.py -> build/lib/wicd
copying wicd/networking.py -> build/lib/wicd
copying wicd/misc.py -> build/lib/wicd
copying wicd/gui.py -> build/lib/wicd
copying wicd/wnettools.py -> build/lib/wicd
copying wicd/wpath.py -> build/lib/wicd
running install_lib
creating /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/__init__.py -> /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/networking.py -> /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/misc.py -> /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/gui.py -> /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/wnettools.py -> /usr/lib/python2.5/site-packages/wicd
copying build/lib/wicd/wpath.py -> /usr/lib/python2.5/site-packages/wicd
writing byte-compilation script '/tmp/tmpqJnxn4.py'
/usr/bin/python /tmp/tmpqJnxn4.py
Traceback (most recent call last):
  File "/tmp/tmpqJnxn4.py", line 13, in <module>
    direct=1)
  File "/usr/lib/python2.5/distutils/util.py", line 472, in byte_compile
    from py_compile import compile
ImportError: No module named py_compile
error: command '/usr/bin/python' failed with exit status 1

Is the file py_compile also a file created by 'setup install'?

Re: wicd on a Openmoko Neo Freerunner

You still need to run

python setup.py configure

otherwise install will fail.

Let's start fresh. Download the latest Wicd version again.
Now run

python setup.py configure --init /etc/init.d --initfile init/default/wicd

to configure it, and then

python setup.py install

to install it. Also read INSTALL that comes with the package to find some additional options.

Re: wicd on a Openmoko Neo Freerunner

Hello,

sorry, I downloaded wicd-1.5.1 again and start the configure with your command and ran into the next error:

root@om-gta02:/media/card/wicd-1.5.1# python setup.py configure --init /etc/init.d --initfile init/default/wicd
Error importing wpath.py. You can safely ignore this
message. It is probably because you haven't run python setup.py
configure yet or you are running it for the first time.
Using init file Error setting up data array. This is normal if
python setup.py configure has not yet been run.
running configure
WARNING: Unable to detect the distribution in use.  If you have specified --init and --initfile, configure will continue.  Please report this warning, along with the name of your distribution, to the wicd developers.
lib is /usr/lib/wicd/
share is /usr/share/wicd/
etc is /etc/wicd/
images is /usr/share/pixmaps/wicd/
encryption is /etc/wicd/encryption/templates/
bin is /usr/bin/
sbin is /usr/sbin/
networks is /var/lib/wicd/configurations/
log is /var/log/wicd/
resume is /etc/acpi/resume.d/
suspend is /etc/acpi/suspend.d/
dbus is /etc/dbus-1/system.d/
desktop is /usr/share/applications/
icons is /usr/share/icons/hicolor/
translations is /usr/share/locale/
autostart is /etc/xdg/autostart/
init is /etc/init.d/
docdir is /usr/share/doc/wicd/
mandir is /usr/share/man/
kdedir is /usr/share/autostart/
python is /usr/bin/python
pidfile is /var/run/wicd/wicd.pid
initfile is init/default/wicd
initfilename is FAIL
Found switch ('no-install-init', None, 'do not install the init file') True
Found switch ('no-install-man', None, 'do not install the man file') False
Found switch ('no-install-kde', None, 'do not install the kde autostart file') False
Found switch ('no-install-acpi', None, 'do not install the suspend.d and resume.d acpi scripts') False
Found switch ('no-install-install', None, 'do not install the INSTALL file') False
Found switch ('no-install-license', None, 'do not install the LICENSE file') False
Replacing values in template files...
Replacing values in init=default=wicd.in init/default/wicd
error: init/default/wicd: No such file or directory

The file init=default=wicd.in exits.

I read INSTALL but I don't get any information that can help by this installation.
As I realice --init represent the OS init path and --initfile points to the start/stop-script-template. So I don't understand the error message.

Re: wicd on a Openmoko Neo Freerunner

I checked the setup.py. And I got the idea to create a line of folders:
mkdir -p nit/default/
mkdir -p init/redhat/
...
mkdir -p man/
mkdir -p scripts/

Now the configure runs without any error messages.

The install results still the problem with py_compile:
...
writing byte-compilation script '/tmp/tmpUM2LlZ.py'
/usr/bin/python /tmp/tmpUM2LlZ.py
Traceback (most recent call last):
  File "/tmp/tmpUM2LlZ.py", line 13, in <module>
    direct=1)
  File "/usr/lib/python2.5/distutils/util.py", line 472, in byte_compile
    from py_compile import compile
ImportError: No module named py_compile
error: command '/usr/bin/python' failed with exit status 1
:-(
I know wicd-1.4.2 installed on my notebook and I like it. But this version is not running usable at the openmoko. I ask you really deeply to support me by preparation and installation of wicd-1.5.1. If we are successfully I want to deploy a package for all Openmoko users to bring Openmoko up to the first Linux based full function free phone. And a good WLAN manager is more then helpful.

Let's come together. I could not get connect to irc.freenode, but maybe you are able to connect Skype, my user their name is wesselch.

Re: wicd on a Openmoko Neo Freerunner

I found a solution

python setup.py install --no-compile --record ./install.txt

Afterwards I was able to start the daemon from consol by 'python /usr/lib/wicd/wicd-daemon.py' without any error.
Then I made a reboot and same changes to the desktop file, the init file and the manager-settings.

Now wicd-daemon is startable and the gui works. I started both via console.

Certainly I get another (old known) issue:
2008/08/13 11:32:22 :: Error: No way of checking for a wired connection. Make                    sure that either mii-tool or ethtool is installed.
2008/08/13 11:32:24 :: Error: No way of checking for a wired connection. Make                    sure that either mii-tool or ethtool is installed.
2008/08/13 11:32:26 :: Error: No way of checking for a wired connection. Make                    sure that either mii-tool or ethtool is installed.

What's clear, an Openmoko has neither ethtool nor mii-tool. Now, we are back to my first problem and reason to get in contact with you.

Nevertheless, I tried to get to connect my local WLAN. First I configured this WLAN with WPA, the conf was filled fine. Then I cliced on 'Connect', Connecting...-bar were open and the appl. tries to 'None: Putting interface down...'. Nothing else. :-(
I see no related error massage anywhere.

Any idea?

Re: wicd on a Openmoko Neo Freerunner

Hello Adam, Dan,

I have try to find a low level Linux solution for the cable link state:
##############
    def GetPluggedIn(self):
        """ Get the current physical connection state.
       
        The method will first attempt to use ethtool do determine
        physical connection state.  Should ethtool fail to run properly,
        mii-tool will be used instead.
       
        Returns:
        True if a link is detected, False otherwise.
       
        """
        if not self.iface:
            return False
        else:
            return self._ifconfig_get_plugged_in()
#        if self.ETHTOOL_FOUND and self.link_detect != misc.MIITOOL:
#            return self._eth_get_plugged_in()
#        elif self.MIITOOL_FOUND:
#            return self._mii_get_plugged_in()
#        else:
#            print 'Error: No way of checking for a wired connection. Make \
#                   sure that either mii-tool or ethtool is installed.'
#            return False

    def _ifconfig_get_plugged_in(self):
        """ Use ifconfig to determine the physical connection state.
               
        Returns:
        True if a link is detected, False otherwise.
       
        """
        IP = '192.168.0.200'
        tool_data = misc.Run('ifconfig ' + self.iface, True)
        if misc.RunRegex(re.compile('RUNNING', re.I | re.M  | re.S),tool_data) is not None:
            if misc.RunRegex(re.compile('inet addr', re.I | re.M  | re.S),tool_data) is not None:
                tool_data = misc.Run('ping -c 1 -I ' + self.iface + ' ' + IP, True)
                if misc.RunRegex(re.compile('1 packets received', re.I | re.M  | re.S),tool_data) is not None:
                    return True
                else:
                    return False
        else:
            i += 1
            if i<=3 :
                print 'Try to start '.self.iface."\n"
                tool_data = misc.Run('ifconfig ' + self.iface + ' up', True)
                return _ifconfig_get_plugged_in
            else:
                return False
################

Are you able to check the syntax and the functionallity (just replace the IP address by address of default gateway).
I had check it in perl coding and there I got a result simular to real state.
I know this solution can't be a replacement for yours, but maybe it is a special for Openmoko.

BTW, the connect problem still open.

christian

Re: wicd on a Openmoko Neo Freerunner

Hi Adam, Dan,

to the wireless connect problem:
I found in wicd.log:
2008/08/14 07:55:33 :: Connecting to wireless network NETGEAR
2008/08/14 07:55:33 :: Putting interface down
2008/08/14 07:55:33 :: ifconfig eth0 down
2008/08/14 07:55:33 :: ifconfig usb0
2008/08/14 07:55:33 :: Releasing DHCP leases...
2008/08/14 07:55:33 :: Exception in thread Thread-1:
2008/08/14 07:55:33 :: Traceback (most recent call last):
2008/08/14 07:55:33 ::   File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
2008/08/14 07:55:33 ::     self.run()
2008/08/14 07:55:33 ::   File "/usr/lib/python2.5/site-packages/wicd/networking.py", line 651, in run
2008/08/14 07:55:33 ::     self.release_dhcp_clients(wiface, liface)
2008/08/14 07:55:33 ::   File "/usr/lib/python2.5/site-packages/wicd/networking.py", line 321, in release_dhcp_clients
2008/08/14 07:55:33 ::     wiface.ReleaseDHCP()
2008/08/14 07:55:33 ::   File "/usr/lib/python2.5/site-packages/wicd/wnettools.py", line 507, in ReleaseDHCP
2008/08/14 07:55:33 ::     cmd = self.DHCP_RELEASE + " " + self.iface + " 2>/dev/null"
2008/08/14 07:55:33 :: TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
2008/08/14 07:55:33 ::

I guess I have to check CheckDHCP

BTW: I modify wnettools.py (GetPluggedIn and CheckWiredTools) by that way, that the daemon now is running without reporting  problems. Wired and wireless LAN now determine fine.

Give me a eMail address, so I am able to send my wnettools.py to you.

christian

Re: wicd on a Openmoko Neo Freerunner

You can send it to wicd-devel@list.sourceforge.net if you want.

Glad you got it working smile

Re: wicd on a Openmoko Neo Freerunner

Hi,
I also have problems with wicd on my Neo Freerunner. I'm using with for a long long time now on my desktop-systems and never had any problems with it. So I wanted to installed the latest stable (*.all.deb) on my Freerunner (debian-image) and I can start it and it shows my network (wpa) but when I wanna connect, it always just shows: "Putting interface down..." and nothing happens after that.

Can you describe how you got it working? Which driver did you select? wext? with which version of wicd did you get it work? A little howto would be very nice!

Re: wicd on a Openmoko Neo Freerunner

Ping? No help?

Re: wicd on a Openmoko Neo Freerunner

Kill the tray and daemon, then restart the daemon from a terminal using the command "sudo wicd -foe".  Open up the tray from another terminal window using "wicd-client", and post any error output you see when you try to connect.  The GUI getting stuck in that state is indicative of a crash somewhere.

Re: wicd on a Openmoko Neo Freerunner

Hi,

here is a first attempt to port wicd to the freerunner.
With this patch wicd is able to use udhcpc.
You still need to compile ethtool for freerunner.

--- wicd-1.5.6.orig/wicd/misc.py    2008-12-29 15:00:25.000000000 +0100
+++ wicd-1.5.6/wicd/misc.py    2008-12-29 15:26:14.000000000 +0100
@@ -39,6 +39,7 @@
 DHCLIENT = 1
 DHCPCD = 2
 PUMP = 3
+UDHCPC = 4
 
 ETHTOOL = 1
 MIITOOL = 2
--- wicd-1.5.6.orig/wicd/wnettools.py    2008-12-29 18:20:36.000000000 +0100
+++ wicd-1.5.6/wicd/wnettools.py    2008-12-29 18:20:56.000000000 +0100
@@ -122,7 +122,7 @@
 
 def StopDHCP():
     """ Stop the DHCP client. """
-    cmd = 'killall dhclient dhclient3 pump dhcpcd-bin'
+    cmd = 'killall dhclient dhclient3 pump dhcpcd-bin udhcpc'
     misc.Run(cmd)
 
 def GetWirelessInterfaces():
@@ -228,6 +228,8 @@
                 client = "dhclient"
             elif cl in [misc.DHCPCD, "dhcpcd"]:
                 client = "dhcpcd"
+        elif cl in [misc.UDHCPC, "udhcpc"]:
+            client = "udhcpc"
             else:
                 client = "pump"
             return client
@@ -241,7 +243,7 @@
         if not self.DHCP_CLIENT or not dhcp_path:
             dhcp_client = None
             dhcp_path = None
-            dhcpclients = ["dhclient", "dhcpcd", "pump"]
+            dhcpclients = ["dhclient", "dhcpcd", "pump", "udhcpc"]
             for client in dhcpclients:
                 dhcp_path = self._find_client_path(client)
                 if dhcp_path:
@@ -263,6 +265,10 @@
             dhcp_client = misc.DHCPCD
             dhcp_cmd = dhcp_path
             dhcp_release = dhcp_cmd + " -k"
+        elif dhcp_client in [misc.UDHCPC, "udhcpc"]:
+        dhcp_client = misc.UDHCPC
+        dhcp_cmd = dhcp_path + ' -n'
+        dhcp_release = "killall -SIGUSR2 udhcpc"
         else:
             dhcp_client = None
             dhcp_cmd = None
@@ -444,6 +450,22 @@
             print line
 
         return self._check_dhcp_result(dhcpcd_success)
+    
+    def _parse_udhcpc(self, pipe):
+    udhcpc_complete = False
+    udhcpc_success = True
+
+    while not udhcpc_complete:
+       line = pipe.readline()
+       if line.endswith("failing"):
+          udhcpc_success = False
+          udhcpc_complete = True
+       elif line == '':
+          udhcpc_complete = True
+       print line
+
+    return self._check_dhcp_result(udhcpc_success)
+
 
     def _check_dhcp_result(self, success):
         """ Print and return the correct DHCP connection result.
@@ -483,11 +505,16 @@
             return self._parse_pump(pipe)
         elif DHCP_CLIENT == misc.DHCPCD:
             return self._parse_dhcpcd(pipe)
+        elif DHCP_CLIENT == misc.UDHCPC:
+        return self._parse_udhcpc(pipe)
 
     def ReleaseDHCP(self):
         """ Release the DHCP lease for this interface. """
         if not self.iface: return False
-        cmd = self.DHCP_RELEASE + " " + self.iface + " 2>/dev/null"
+        if self.DHCP_RELEASE.startswith("kill"):
+           cmd = self.DHCP_RELEASE
+        else:
+           cmd = self.DHCP_RELEASE + " " + self.iface + " 2>/dev/null"
         misc.Run(cmd)
 
     def FlushRoutes(self):

Re: wicd on a Openmoko Neo Freerunner

madmo: I would guess that since this thread is 5 months old, the original posters probably don't check it anymore. Since our forum email notifications don't work, it would probably be a good idea to post this on a Freerunner-related website for more attention smile