Re: Pre-configuring an ethernet interface
On 18.02.2013 09:58, Patrik Flykt wrote: On Thu, 2013-02-14 at 13:38 +0100, Simon Busch wrote: I have a similar case where something like this is needed. Anyone already working on getting this implemented? AFAIK not at the moment. I have a few things to do before I have a chance to look at this. Patches are always welcome. I started to work on it, patches coming soon. Cheers, Jukka ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Thu, 2013-02-14 at 13:38 +0100, Simon Busch wrote: I have a similar case where something like this is needed. Anyone already working on getting this implemented? AFAIK not at the moment. I have a few things to do before I have a chance to look at this. Patches are always welcome. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Am 15.01.2013 16:00, schrieb Patrik Flykt: 1. Provide a default configuration .config file that sets the Ethernet defaults to something static instead of DHCPv4. This would be good to do some default factory configuration. This one is doable. I have a similar case where something like this is needed. Anyone already working on getting this implemented? regards, Simon -- Simon Busch - http://mm.gravedo.de/blog/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Hi, On Fri, 2013-01-11 at 14:36 +0100, Bach, Pascal wrote: 1. Provide a default configuration .config file that sets the Ethernet defaults to something static instead of DHCPv4. This would be good to do some default factory configuration. This one is doable. 2. Allow the user to configure the disconnected device the same way as if the device was connected. This means the user can change the settings of an unplugged device to a static configuration or to DHCP as he likes. As soon as the device gets connected this settings are used. This one requires quite a lot more; ConnMan would need a list of saved services and D-Bus object paths where these saved services could be edited. In most cases this is could be handled by the .config file above. If the .config file is changed, the changes are noticed by ConnMan... Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Hi Patrik, On Thu, Jan 10, 2013 at 11:02 PM, Patrik Flykt patrik.fl...@linux.intel.com wrote: On Wed, 2013-01-09 at 18:07 -0800, Justin Maggard wrote: Personally, it doesn't matter to me if it's in the service list, or in some other list. All I really want to do is find which interfaces connman is controlling (connected or disconnected), and configure them whether or not I have the cable plugged in. It seems to me that there should be a way to do this, but I can't find a way currently. Currently only the plugged in ethernet interfaces or scanned wifi networks show up as services with the interface information information made available in the 'Ethernet' property. There is no list that would show all interfaces in the device. What use case do you have in mind? I'm looking to use connman as the network manager for a small NAS device. The device could have a wireless adapter, and one or two ethernet adapters. I'd like to be able to show the user all the network interfaces on the box, and allow them to configure them with or without a network link. Sure, I can use getifaddrs() or similar to list all the interfaces, but since connman is controlling them already, and I can use connman dbus calls for all other network tasks, it would be nice to stick with that approach for everything. Configuring an ethernet device with no link may seem pointless, but it can be useful for situations like if you are preparing to move a network-only (headless) device to a different network with no DHCP server. In that case, you would probably want to configure your other, disconnected interface for the network which you plan to move your device to. -Justin ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: Pre-configuring an ethernet interface
Hello I'm looking to use connman as the network manager for a small NAS device. The device could have a wireless adapter, and one or two ethernet adapters. I'd like to be able to show the user all the network interfaces on the box, and allow them to configure them with or without a network link. Sure, I can use getifaddrs() or similar to list all the interfaces, but since connman is controlling them already, and I can use connman dbus calls for all other network tasks, it would be nice to stick with that approach for everything. Configuring an ethernet device with no link may seem pointless, but it can be useful for situations like if you are preparing to move a network- only (headless) device to a different network with no DHCP server. In that case, you would probably want to configure your other, disconnected interface for the network which you plan to move your device to. I'd be interested in a similar scenario. Connman is running on a device with display that shows some environmental information to the user. The system is usually installed by an installation engineer. However during the installation the network infrastructure is often not available. So it would be good if the user could already configure the device to his desire even without the network, this way when everything goes online the system is already mostly configured. I also noticed that if I don't show the Ethernet interface if the network is not plugged in the user gets confused. Regards Pascal ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Hi, On Fri, 2013-01-11 at 11:19 +0200, Jukka Rissanen wrote: implement provisioning support i.e., .config file support for ethernet devices This would be the way to go for pre-configuration of ethernet services. Connecting an ethernet cable gives a fully connected ethernet service using DHCP out of the box already today. You are saying that static IPv4 (or IPv6) address configuration is needed at startup? Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On 11/01/13 11:43, Patrik Flykt wrote: Hi, On Fri, 2013-01-11 at 11:19 +0200, Jukka Rissanen wrote: implement provisioning support i.e., .config file support for ethernet devices This would be the way to go for pre-configuration of ethernet services. Connecting an ethernet cable gives a fully connected ethernet service using DHCP out of the box already today. You are saying that static IPv4 (or IPv6) address configuration is needed at startup? Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman If I can just chime in to note that this would also be a useful use case for myself. In this case, I have a program that runs over a serial port which can configure the ethernet. The user may want to pre-configure the device over serial, before installing it on-site. -- Jack Mitchell (j...@embed.me.uk) Embedded Systems Engineer http://www.embed.me.uk -- ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Fri, 2013-01-11 at 11:56 +, Jack Mitchell wrote: In this case, I have a program that runs over a serial port which can configure the ethernet. The user may want to pre-configure the device over serial, before installing it on-site. Just to be sure: all of you above want to provision/configure static IPv4 (or IPv6) addresses before the ethernet cable is connected, right? DHCPv4 works out of the box already now when the cable is connected. Nothing is needed for that use case. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: Pre-configuring an ethernet interface
Just to be sure: all of you above want to provision/configure static IPv4 (or IPv6) addresses before the ethernet cable is connected, right? Provision is the most important use case for me. But I think there are two ways provision could be done. 1. Provide a default configuration .config file that sets the Ethernet defaults to something static instead of DHCPv4. This would be good to do some default factory configuration. 2. Allow the user to configure the disconnected device the same way as if the device was connected. This means the user can change the settings of an unplugged device to a static configuration or to DHCP as he likes. As soon as the device gets connected this settings are used. In our case the both would be helpful but the second case is more important. DHCPv4 works out of the box already now when the cable is connected. Nothing is needed for that use case. Yes DHCP is already working, but the problem here is that the user doesn't know how the device is configured if it is unplugged as it simply doesn't show up. So I think it would be nice if the device is in an unplugged state for example but the IPv4/6Configuration and still intact. Pascal ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Fri, Jan 11, 2013 at 5:36 AM, Bach, Pascal pascal.b...@siemens.comwrote: Just to be sure: all of you above want to provision/configure static IPv4 (or IPv6) addresses before the ethernet cable is connected, right? Provision is the most important use case for me. But I think there are two ways provision could be done. 1. Provide a default configuration .config file that sets the Ethernet defaults to something static instead of DHCPv4. This would be good to do some default factory configuration. 2. Allow the user to configure the disconnected device the same way as if the device was connected. This means the user can change the settings of an unplugged device to a static configuration or to DHCP as he likes. As soon as the device gets connected this settings are used. In our case the both would be helpful but the second case is more important. Same here. If provisioning through .config files was available, it would be useful; but we would still need to write code to detect all the network interfaces in case some of them have no link, and then write out a .config file for those interfaces if the user chooses to configure an offline interface. So, basically, we would need to re-implement some of the network configuration methods that connman has already done so well. DHCPv4 works out of the box already now when the cable is connected. Nothing is needed for that use case. Yes DHCP is already working, but the problem here is that the user doesn't know how the device is configured if it is unplugged as it simply doesn't show up. So I think it would be nice if the device is in an unplugged state for example but the IPv4/6Configuration and still intact. I'm in agreement here as well. We would like to show the user the same configuration info for a disconnected interface as we do for a connected interface, but inform them that it is in a offline/disconnected state. -Justin ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Hi, On Wed, 2013-01-09 at 18:07 -0800, Justin Maggard wrote: Personally, it doesn't matter to me if it's in the service list, or in some other list. All I really want to do is find which interfaces connman is controlling (connected or disconnected), and configure them whether or not I have the cable plugged in. It seems to me that there should be a way to do this, but I can't find a way currently. Currently only the plugged in ethernet interfaces or scanned wifi networks show up as services with the interface information information made available in the 'Ethernet' property. There is no list that would show all interfaces in the device. What use case do you have in mind? Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On 01/09/2013 11:17 AM, Justin Maggard wrote: I have a system with multiple ethernet interfaces, and I'm a bit confused as to how connman is expected to work with this. How can I get connman to give me a list of all interfaces, both with and without a carrier? The You need to use the dbus interfaces to do that. Try to use the scripts that comes with connman. to enable ethernet: test-connman enable ethernet lists all the services: test-connman services ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Wed, Jan 9, 2013 at 4:32 PM, Felipe Ferreri Tonello e...@felipetonello.com wrote: On 01/09/2013 11:17 AM, Justin Maggard wrote: I have a system with multiple ethernet interfaces, and I'm a bit confused as to how connman is expected to work with this. How can I get connman to give me a list of all interfaces, both with and without a carrier? The You need to use the dbus interfaces to do that. Try to use the scripts that comes with connman. to enable ethernet: test-connman enable ethernet lists all the services: test-connman services Most of this should work with the cli - connmanctl - which is part of the connman project source tree (you may have to convince the configure scripts to install it). You can statically configure interfaces and enable/disable them, setup dhcp, view link status etc. Auke ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Wed, Jan 9, 2013 at 4:39 PM, Kok, Auke-jan H auke-jan.h@intel.comwrote: On Wed, Jan 9, 2013 at 4:32 PM, Felipe Ferreri Tonello e...@felipetonello.com wrote: On 01/09/2013 11:17 AM, Justin Maggard wrote: I have a system with multiple ethernet interfaces, and I'm a bit confused as to how connman is expected to work with this. How can I get connman to give me a list of all interfaces, both with and without a carrier? The You need to use the dbus interfaces to do that. Try to use the scripts that comes with connman. to enable ethernet: test-connman enable ethernet lists all the services: test-connman services Most of this should work with the cli - connmanctl - which is part of the connman project source tree (you may have to convince the configure scripts to install it). You can statically configure interfaces and enable/disable them, setup dhcp, view link status etc. Thanks for the replies. I've actually tried every option available from connmanctl, and even all the python test scripts. None of them will show my ethernet interfaces until I plug in a cable and connman detects a carrier. -Justin ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: Pre-configuring an ethernet interface
Hi Justin, Thanks for the replies. I've actually tried every option available from connmanctl, and even all the python test scripts. None of them will show my ethernet interfaces until I plug in a cable and connman detects a carrier. I searched doc and found following sentence in overview-api.txt: The interfaces of Connection Manager will always export all services that are currently known. The Ethernet devices with no cable plugged are actually not included in this list. They will only show up once a carrier is detected. Bests Jeff ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
On Wed, Jan 9, 2013 at 5:48 PM, Zheng, Jeff jeff.zh...@intel.com wrote: Thanks for the replies. I've actually tried every option available from connmanctl, and even all the python test scripts. None of them will show my ethernet interfaces until I plug in a cable and connman detects a carrier. I searched doc and found following sentence in overview-api.txt: The interfaces of Connection Manager will always export all services that are currently known. The Ethernet devices with no cable plugged are actually not included in this list. They will only show up once a carrier is detected. Thanks for pointing that out. I did see that statement, but it seems to conflict with other information in other docs, and even within that same doc, in the Service order section. Perhaps I'm just misunderstanding, but here are some examples: For Ethernet the plugging of a cable makes it a favorite. ... Ethernet is special here since the unplugging of the network cable will remove the favorite selection. ... and other similar statements. Personally, it doesn't matter to me if it's in the service list, or in some other list. All I really want to do is find which interfaces connman is controlling (connected or disconnected), and configure them whether or not I have the cable plugged in. It seems to me that there should be a way to do this, but I can't find a way currently. -Justin ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: Pre-configuring an ethernet interface
-Original Message- From: connman-boun...@connman.net [mailto:connman-boun...@connman.net] On Behalf Of Justin Maggard Sent: Thursday, January 10, 2013 10:07 AM To: connman@connman.net Subject: Re: Pre-configuring an ethernet interface On Wed, Jan 9, 2013 at 5:48 PM, Zheng, Jeff jeff.zh...@intel.com wrote: Thanks for the replies. I've actually tried every option available from connmanctl, and even all the python test scripts. None of them will show my ethernet interfaces until I plug in a cable and connman detects a carrier. I searched doc and found following sentence in overview-api.txt: The interfaces of Connection Manager will always export all services that are currently known. The Ethernet devices with no cable plugged are actually not included in this list. They will only show up once a carrier is detected. Thanks for pointing that out. I did see that statement, but it seems to conflict with other information in other docs, and even within that same doc, in the Service order section. Perhaps I'm just misunderstanding, but here are some examples: For Ethernet the plugging of a cable makes it a favorite. ... Ethernet is special here since the unplugging of the network cable will remove the favorite selection. ... and other similar statements. Personally, it doesn't matter to me if it's in the service list, or in some other list. All I really want to do is find which interfaces connman is controlling (connected or disconnected), and configure them whether or not I have the cable plugged in. It seems to me that there should be a way to do this, but I can't find a way currently. Yes. They seem to be conflict. I will report a document bug. Thanks. Maybe you're interested in report a bug for your issue (or feature) at bug.meego.com? Bests Jeff ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman