Feeds:
Posts
Comments

Archive for February, 2014

 

Connman using systemctl

 

If you are dealing with Embedded systems or IVI systems running Tizen or Meego Linux OS.

This guide will help you to assign static IP address manually using Connman. It is nothing but Connection Manager for Etehrnet, Wifi, Bluetooth and Wifi Direct connections.

The following steps were experimented on

Dev Board: Intel x86 platform(i386 )

OS: Tizen + Meego for IVI Systems

Linux Kernel: 3.8.xx

 

1. Go to this directory: This directory contains may pythons scripts.

root@localhost:~> cd /usr/lib/connman/test

 

2. Check the Existing Ethernet Configuration 

root@localhost:/usr/lib/connman/test> ./list-services
[ ethernet_e840f2d1c0c6_cable ]
IPv6.Configuration = { Method=off }
AutoConnect = true
Name = Wired
Nameservers = [ ]
Provider = { }
Favorite = true
Domains.Configuration = [ ]
Timeservers.Configuration = [ ]
State = ready
Proxy = { Method=direct }
Nameservers.Configuration = [ ]
IPv4 = { Netmask=255.255.255.0 Method=dhcp Address=192.168.2.15 }
Timeservers = [ ntp.meego.com ]
IPv6 = { }
Domains = [ ]
Ethernet = { Interface=eth0 MTU=1500 Method=auto Address=E8:40:F2:D1:C0:C6 }
Security = [ ]
Proxy.Configuration = { }
Type = ethernet
Immutable = false
IPv4.Configuration = { Method=dhcp }

 

3. Assign Static IP address, Netmask and Gateway Addresses.

Here you should use the interface name from the above output, for Ethernet you should use  “ethernet_e840f2d1c0c6_cable” like this, for you it may different Ethernet name.

root@localhost:/usr/lib/connman/test>./set-ipv4-method ethernet_e840f2d1c0c6_cable manual 192.168.2.15 255.255.255.0 192.168.2.1
Setting method manual for ethernet_e840f2d1c0c6_cable
New IPv4.Configuration:  {‘Netmask’: dbus.String(u’255.255.255.0′, variant_level=1), ‘Gateway’: dbus.String(u’192.168.2.1′, variant_level=1), ‘Method’: dbus.String(u’manual’, variant_level=1), ‘Address’: dbus.String(u’192.168.2.15′, variant_level=1)}

 

4.Check the New IP Address

root@localhost:/usr/lib/connman/test> ./list-services
[ ethernet_e840f2d1c0c6_cable ]
IPv6.Configuration = { Method=off }
AutoConnect = true
Name = Wired
Nameservers = [ ]
Provider = { }
Favorite = true
Domains.Configuration = [ ]
Timeservers.Configuration = [ ]
State = ready
Proxy = { Method=direct }
Nameservers.Configuration = [ ]
IPv4 = { Netmask=255.255.255.0 Gateway=192.168.2.1 Method=manual Address=192.168.2.15 }
Timeservers = [ 192.168.2.1 ntp.meego.com ]
IPv6 = { }
Domains = [ ]
Ethernet = { Interface=eth0 MTU=1500 Method=auto Address=E8:40:F2:D1:C0:C6 }
Security = [ ]
Proxy.Configuration = { }
Type = ethernet
Immutable = false
IPv4.Configuration = { Netmask=255.255.255.0 Gateway=192.168.2.1 Method=manual Address=192.168.2.15 }

 

5. Assign Name-Servers Address

root@localhost:/usr/lib/connman/test> ./set-nameservers ethernet_e840f2d1c0c6_cable 192.168.2.5 192.168.2.6
Setting name-server to [‘192.168.2.5’, ‘192.168.2.6’]

 

6. Assign Proxy of XXXX Company
root@localhost:/usr/lib/connman/test> ./set-proxy ethernet_e840f2d1c0c6_cable auto url=http://xxx.yyyyy.co.jp/pac/proxy.pac

 

7. Check All the Configuration
root@localhost:/usr/lib/connman/test> ./list-services

Read Full Post »