Re: connect to internet via android phone as usb-modem

2011-04-14 Thread Torsten Spindler
I've reverted the udev usage and test now for 'easytether' when checking
for the driver and assign driver to 'easytether' if so. I've diff'ed vs
latest git, but tested vs 0.8.4 rc1 and it works fine for me.

Torsten

diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c
index 853c4fe..f20fe78 100644
--- a/src/nm-udev-manager.c
+++ b/src/nm-udev-manager.c
@@ -385,8 +385,12 @@ device_creator (NMUdevManager *manager,
 	}
 
 	if (!driver) {
-		nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
-		goto out;
+if (g_str_has_prefix (ifname), "easytether") {
+driver = "easytether";
+} else {
+		nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
+		goto out;
+}
 	}
 
 	ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex");
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: ANN: Release of NetworkManager 0.8.3.998 (0.8.4-rc1)

2011-03-28 Thread Torsten Spindler
Hi,

I tried to compile 0.8.4-rc1 on Ubuntu 10.04 LTS. For me the autogen.sh
script fails upon the tools directory:

tools/Makefile.am:1: required directory tools/tools does not exist
Makefile.am: installing `./INSTALL'
autoreconf: automake failed with exit status: 1

When removing that directory from tools/Makefile.am the compile fails
here: 
make[3]: Entering directory
`/home/spindler/Work/nm/0.8.4/nm-test/tools/marshallers'
make[3]: *** No rule to make target `all'.  Stop.

I simply removed the tools directory from the top level Makefile.am and
then it builds fine. 

Regards,
Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Copied system-connection: 'secrets cache invalid'

2011-03-23 Thread Torsten Spindler
Hello,

I try to 'clone' a wireless system connection to several machines. My
naive attempt was to copy the file
from /etc/NetworkManager/system-connections/ on a master machine
to a package and then install the package on the cloned systems. While
the connection can be seen, when I try to edit it with
nm-connection-editor the error 'Error initializing editor'
'nm-sysconfig-connection.c.202 - Internal error; secrets cache invalid.'
is shown. This happened on Ubuntu 10.04 LTS with the somewhat aged
network-manager 0.8-0ubuntu3.

What is the recommended way to pre-install a system connection via a
package?

Regards,
Torsetn


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: connect to internet via android phone as usb-modem

2011-03-18 Thread Torsten Spindler
Hello,

I've changed the hack to now check for a udev environment variable
'NM_PSEUDODRIVER'. If set, the lack of a driver is ignored.
The /etc/udev/rules.d/easytether.rules declares this if an easytether0
device is detected.

If need be I can revert it to check for 'easytether' in the code, but I
think the udev rule based approach is better.

Bye,
Torsten



diff -ruN NetworkManager/src/nm-udev-manager.c NetworkManager-easytether/src/nm-udev-manager.c
--- NetworkManager/src/nm-udev-manager.c	2011-03-10 23:38:01.298038845 +0100
+++ NetworkManager-easytether/src/nm-udev-manager.c	2011-03-18 19:27:06.893019906 +0100
@@ -385,8 +385,12 @@
 	}
 
 	if (!driver) {
-		nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
-		goto out;
+		if (g_udev_device_has_property (udev_device, "NM_PSEUDODRIVER"))
+			driver = g_udev_device_get_property(udev_device, "NM_PSEUDODRIVER");
+		else {
+			nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
+			goto out;
+		}
 	}
 
 	ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex");
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", 
ATTR{idProduct}=="41da", RUN+="/usr/local/bin/easytether"
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="easytether0", 
ENV{NM_PSEUDODRIVER}="easytether"
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: connect to internet via android phone as usb-modem

2011-03-16 Thread Torsten Spindler
On Wed, 2011-03-16 at 15:50 -0500, Dan Williams wrote:
...
> That said, the best way to go about this is likely to use udev scripts
> to initially create the easytether0 interface, and then we could add
> some custom code to NM to recognize the easytether0 interface as a
> normal ethernet device and run DHCP on it.  That wouldn't be *too* hard,
> probably < 30 lines of code.  It would involve using g_str_has_prefix()
> looking for easytether in the nm-udev-manager.c code, and if so,
> bypassing some of the udev /sysfs hierarchy checks that determine
> hardware relationships and device attributes like driver and
> description.  That's not something we should be doing for most "virtual"
> network interfaces, but it's probably OK in the case of easytether.

Thanks for the advice where to patch network manager. Attached is a very
first version, plus a basic udev rule for a Motorola Milestone and
connect script. It works fine on my Ubuntu 10.04 machine right now,
though it could use some polishing.

Torsten

diff -ruN NetworkManager/src/nm-device-ethernet.c NetworkManager-easytether/src/nm-device-ethernet.c
--- NetworkManager/src/nm-device-ethernet.c	2011-03-16 14:25:18.834800697 +0100
+++ NetworkManager-easytether/src/nm-device-ethernet.c	2011-03-16 22:19:58.388510568 +0100
@@ -567,7 +567,10 @@
 {
 	g_return_val_if_fail (udi != NULL, NULL);
 	g_return_val_if_fail (iface != NULL, NULL);
-	g_return_val_if_fail (driver != NULL, NULL);
+	if (strcmp("easytether0", iface))
+		g_return_val_if_fail (driver != NULL, NULL);
+	else
+		nm_log_warn (LOGD_HW, "Ignoring driver = NULL for easytether");
 
 	return (NMDevice *) g_object_new (NM_TYPE_DEVICE_ETHERNET,
 	  NM_DEVICE_INTERFACE_UDI, udi,
diff -ruN NetworkManager/src/nm-udev-manager.c NetworkManager-easytether/src/nm-udev-manager.c
--- NetworkManager/src/nm-udev-manager.c	2011-03-10 23:38:01.298038845 +0100
+++ NetworkManager-easytether/src/nm-udev-manager.c	2011-03-16 22:06:32.976528041 +0100
@@ -386,7 +386,10 @@
 
 	if (!driver) {
 		nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
-		goto out;
+		if (!strcmp("easytether0", ifname))
+			nm_log_warn (LOGD_HW, "%s: is an easytether device, ignorning device driver not found", ifname)
+else
+			goto out;
 	}
 
 	ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex");
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", 
ATTR{idProduct}=="41da", RUN+="/usr/local/bin/easytether"


easytether
Description: application/shellscript
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
Following up on this, I go further with running the auto toolchain
commands:
* Run autogen.sh with --gtkver=2 and other autotools to get there:
-  aclocal
-  autoconf
-  autoheader
-  automake -a

The network-manager-applet package is being upload to the PPA now,
hopefully it will build.

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
On the gtk+3 dependency, I've found the --with-gtkver=2 option for
autogen.sh. Unfortunately the command errs with this message:

$ ./autogen.sh --with-gtkver=2You should add the contents of
'/usr/share/aclocal/intltool.m4' to 'aclocal.m4'.
configure: WARNING: unrecognized options: --enable-maintainer-mode
./configure: line 2140: syntax error near unexpected token `1.10'
./configure: line 2140: `AM_INIT_AUTOMAKE(1.10 subdir-objects
no-dist-gzip dist-bzip2)'

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
On Sun, 2011-03-06 at 17:12 +, Phil Thompson wrote:
> On Sun, 2011-03-06 at 16:11 +0100, Torsten Spindler wrote:
> > After some hacking at the debian files the Network Manager built in
> > the PPA for Lucid, though the applet is still outstanding. It depends
> > on gtk+3 >= 2.91.4, which seems to be quite a huge dependency. 
> 
> I take it this means I shouldn't bother trying it as I won't get the
> applet ?

To be honest, I don't know where to progress from here with the applet.
Backporting gtk+3 seems like quite an undertaking. Maybe the
dependencies on it can be patched out of the applet?

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
On Sun, 2011-03-06 at 17:14 +, Phil Thompson wrote:
...
> it did move me forward to the next glitch :-
> 
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for DBUS... yes
> checking for GLIB... yes
> checking for GMODULE... yes
> checking for GUDEV... no
> configure: error: Package requirements (gudev-1.0) were not met:
> 
> No package 'gudev-1.0' found

It's on my machine, coming from lucid-updates:
ii  libgudev-1.0-01:151-12.3
GObject-based wrapper library for libudev

Did you install the build dependencies for network-manager, e.g. $ sudo
apt-get build-dep network-manager?

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
After some hacking at the debian files the Network Manager built in the
PPA for Lucid, though the applet is still outstanding. It depends on gtk
+3 >= 2.91.4, which seems to be quite a huge dependency.

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-06 Thread Torsten Spindler
Hello Phil,


On Sun, 2011-03-06 at 09:48 +, Phil Thompson wrote:
...
> I now have the am PPA and still the same error
> 
> checking for DBUS... yes
> checking for GLIB... no
> configure: error: Package requirements (gthread-2.0 glib-2.0 >= 2.26
> gobject-2.0) were not met:
> 
> Requested 'glib-2.0 >= 2.26' but version of GLib is 2.24.1
> 
> I need a bit more newbie help to progress this please

I've setup another PPA with a newer glib version: 
https://launchpad.net/~tspindler/+archive/glib-2.26-lucid
This is completely untested, though I've installed it now on my main
machine. I'll hope it causes no problems, but I advise you to test this
on an expendable machine first, maybe on a virtual machine.

I've also setup another PPA for nm-0.9 and trying to build it there:
https://launchpad.net/~tspindler/+archive/nm-0.9
However, not sure if the build will go through.

Torsten

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-05 Thread Torsten Spindler
On Sat, 2011-03-05 at 20:06 +0100, Torsten Spindler wrote:
...
> You can get a backported dbus-glib from this PPA on Launchpad:
> https://launchpad.net/~mathieu-tl/+archive/ppa/
> 
> Works fine for me.

I discovered I had already installed the following packages from
Maverick on my test machine:

libglib2.0-dev
libglib2.0-bin
libglib2.0-0
This is version 2.26.1-0ubuntu1.

With those packages and disabling wimax (--disable-wimax), Network
Manager 0.8.995 compiled for me.

Sorry for the confusion,
Torsten

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Testing 0.8.995 (0.9.0-beta1) on Ubuntu 10.04

2011-03-05 Thread Torsten Spindler
Hello Phil,

On Sat, 2011-03-05 at 17:46 +, Phil Thompson wrote:
> I've resolved a few of the errors that came up running ./configure
> but not sure what to do with this one :-
> 
> 
> checking for GLIB... no
> configure: error: Package requirements (gthread-2.0 glib-2.0 >= 2.26
> gobject-2.0) were not met:
> 
> Requested 'glib-2.0 >= 2.26' but version of GLib is 2.24.1

You can get a backported dbus-glib from this PPA on Launchpad:
https://launchpad.net/~mathieu-tl/+archive/ppa/

Works fine for me.

Bye,
Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Modem gone after suspend/resume

2010-08-06 Thread Torsten Spindler
Hello,

a 3G modem is no longer recognized by modem-manager when the system
resumes. It seems the USB identification changes upon resume, from
usb6/6-1 to usb6/6-2. This might be caused by udev rules?

I've collected some logs here on Launchpad:
dmesg after resume:
http://launchpadlibrarian.net/53157289/dmesg
find in the sys directory after resume:
http://launchpadlibrarian.net/53157295/find
debug output for modemmanager:
http://launchpadlibrarian.net/53157338/mm.log

Any chance to get modem-manager/networkmanager to rescan the device tree
to find the modem again?

Torsten


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: gui design of nm-applet

2010-04-01 Thread Torsten Spindler
Hello,

On Thu, 2010-04-01 at 20:52 +1300, Simon Geard wrote:
...
> Your link doesn't seem to be publicly accessible - I get "You are not
> allowed to view this page" when I click on it...

you are right. My wrong for sending out an internal link. I guess the
work results will be published some time on the public Ubuntu wiki.
Sorry for the mis-information.

Regards,
Torsten

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: gui design of nm-applet

2010-04-01 Thread Torsten Spindler
On Wed, 2010-03-31 at 21:35 -0400, Yclept Nemo wrote:
> ... Furthermore ubuntu just implemented a
> complete interface redesign after a lengthy evaluation of many
> individual components and applications. I'm sure you could find
> someone on one of the ubuntu teams to provide a much more professional
> design evaluation of nm-applet.

Work on a re-design of a network connectivity applet has already been
started and some information can be found here:
https://wiki.canonical.com/Ubuntu/NetworkMenu

I do not know of any schedule that will bring this enhanced network menu
on the desktop though.

Regards,
Torsten


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Stopping modemmanager from auto probing?

2010-03-09 Thread Torsten Spindler
Hello,

Alex and I have submitted a patch for the blacklisting in ModemManager
in this bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=608022

If you have some time, can you please let us know if it can be included.
Is there anything else we can do to move this forward?

Regards,
Torsten


On Fri, 2010-01-22 at 14:42 -0800, Dan Williams wrote:
> On Fri, 2010-01-22 at 11:49 +0100, Torsten Spindler wrote:
> > Hello,
> > 
> > there seems to be a problem for some devices which modemmanager probes
> > over the serial line. Namely Palm devices [1] and a Smart Card reader
> > [2]. Is there any possibility to make the probing configurable?
> > 
> > There seems to be a work around available by removing 
> > /usr/lib/ModemManager/libmm-plugin-generic.so. This seems to prevent
> > modemmanager from doing the autoprobing.
> 
> If there are certain devices that are known to handle probing badly,
> then we can probably blacklist those.  We did that for a few devices
> with NM 0.7.x but that did not get carried over to ModemManager.  We
> would however need to get unique identifiers for those devices like USB
> vid/pid.  Serial devices are harder since legacy serial ports don't
> really have identifying information.  Be aware that PCMCIA-based cards
> (like the Sierra 860) will report as ttyS0 using the "serial" driver and
> thus aren't very distinguishable from legacy serial ports either.  Needs
> a bit of investigation.
> 
> when you get a bug like this, try getting the user to (1) stop NM and
> MM, (2) plug the device in, and (3) run the "lsudev" utility included in
> the modem-manager sources in test/ like so:
> 
> sudo lsudev tty
> 
> and then hit Ctrl+C and get the log into gnome bugzilla.  If we get
> enough logs we can see if there's a good way to handle legacy serial
> ports.  If the devices are USB, then that's quite a bit easier.
> 
> Dan
> 
> 


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: dhcp client support broken on karmic with latest NM build

2010-03-02 Thread Torsten Spindler
On Tue, 2010-03-02 at 09:43 +0100, Alessandro Bono wrote:
...
> -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf 
> /var/run/dhclient-eth0.pid -lf 
> /var/lib/dhcp3/dhclient-7ee3e5ee-deb8-46e7-9440-86db49cfdcdd-eth0.lease -cf 
> /var/run/nm-dhclient-eth0.conf eth0

Seems that the -4 is not known by the dhclient version 3 on Ubuntu.

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: dhcp client support broken on karmic with latest NM build

2010-02-25 Thread Torsten Spindler
Hello Alessandro,

the latest network-manager needs dhclient version 4, Ubuntu only ships
version 3. I tried to compile network-manager with the options
--with-dhclient=no --with-dhcpcd=yes
but it still seems to want to use dhclient. As a test I packaged
dhclient version 4 and it seems to work. Albeit packaging it properly is
beyond my debian packaging capabilities ...

Regards,
Torsten

On Thu, 2010-02-25 at 14:04 +0100, Alessandro Bono wrote:
> Hi all
> 
> Today my machine it's not able to take an ip from either wifi or
> ethernet, looking at log there is this message
> 
> Feb 25 10:08:41 champagne NetworkManager: Activation (eth0) Beginning DHCPv4 
> transaction (timeout in 45 seconds)
> Feb 25 10:08:41 champagne dhclient: Internet Systems Consortium DHCP Client 
> V3.1.2  
> Feb 25 10:08:41 champagne dhclient: Copyright 2004-2008 Internet Systems 
> Consortium.
> Feb 25 10:08:41 champagne dhclient: All rights reserved.  
>   
> Feb 25 10:08:41 champagne dhclient: For info, please visit 
> http://www.isc.org/sw/dhcp/  
> Feb 25 10:08:41 champagne dhclient: Usage: dhclient [-1dqrx] [-nw] [-p 
> ] [-s server]  
> Feb 25 10:08:41 champagne dhclient: [-cf config-file] [-lf 
> lease-file][-pf pid-file] [-e VAR=val]
> Feb 25 10:08:41 champagne dhclient: [-sf script-file] 
> [interface]
> Feb 25 10:08:41 champagne NetworkManager:   dhclient started with pid 
> 8817 
> Feb 25 10:08:41 champagne NetworkManager:   Activation (eth0) Stage 4 
> of 5 (IP6 Configure Get) scheduled...
> Feb 25 10:08:41 champagne NetworkManager:   Activation (eth0) Stage 3 
> of 5 (IP Configure Start) complete.  
> Feb 25 10:08:41 champagne NetworkManager:   Activation (eth0) Stage 4 
> of 5 (IP6 Configure Get) started...  
> Feb 25 10:08:41 champagne NetworkManager:   Activation (eth0) Stage 4 
> of 5 (IP6 Configure Get) complete.   
> 
> 
> so seems that yesterday update broke dhcp support
> 
> 
> ii  network-manager0.8-0ubuntu4~nmt4~karmic   
> network management framework daemon
> ii  network-manager-dev0.8-0ubuntu4~nmt4~karmic   
> network management framework (development fi
> ii  network-manager-gnome  0.8-0ubuntu3~nmt2~karmic   
> network management framework (GNOME frontend
> ii  network-manager-openconnect
> 0.8~rc1-0ubuntu1~nm1~karmicnetwork management 
> framework (Openconnect pl
> ii  network-manager-openvpn
> 0.8~rc1-0ubuntu1~nm1~karmicnetwork management 
> framework (OpenVPN plugin
> ii  network-manager-pptp   0.8-0ubuntu2~nmt1~karmic   
> network management framework (PPTP plugin)
> ii  network-manager-strongswan 1.1.1-2ubuntu1 
> network management framework (strongSwan plu
> ii  network-manager-vpnc   0.8-0ubuntu2~nmt1~karmic   
> network management framework (VPNC plugin)
> 
> 


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Stopping modemmanager from auto probing?

2010-01-25 Thread Torsten Spindler

On Fri, 2010-01-22 at 14:42 -0800, Dan Williams wrote:
...
> when you get a bug like this, try getting the user to (1) stop NM and
> MM, (2) plug the device in, and (3) run the "lsudev" utility included in
> the modem-manager sources in test/ like so:
> 
> sudo lsudev tty
> 
> and then hit Ctrl+C and get the log into gnome bugzilla.  If we get
> enough logs we can see if there's a good way to handle legacy serial
> ports.  If the devices are USB, then that's quite a bit easier.

Done and submitted as bug report here:
https://bugzilla.gnome.org/show_bug.cgi?id=608022


Thanks,
Torsten


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Stopping modemmanager from auto probing?

2010-01-22 Thread Torsten Spindler
Hello,

there seems to be a problem for some devices which modemmanager probes
over the serial line. Namely Palm devices [1] and a Smart Card reader
[2]. Is there any possibility to make the probing configurable?

There seems to be a work around available by removing 
/usr/lib/ModemManager/libmm-plugin-generic.so. This seems to prevent
modemmanager from doing the autoprobing.

Regards,
Torsten

[1] https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/421673
[2]
https://answers.launchpad.net/ubuntu/+source/network-manager/+question/98187


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list