Re: Network preference gsm is only working when allowing roaming?
On Mon, 2014-05-12 at 14:08 +0200, Niclas Karlsson wrote: Hi, The context was that SIM shows home network as 08 with the current network being 24. The device thinks it is roaming while the user, in this case Niclas Karlsson, knows the device should be in its home network. So org.ofono.NetworkRegistration is the correct one here and any change in roaming status must come from the network? So this boils down to simply being connected to the wrong network after all? This all depends. The operation in question might be an MVNO, or the operator has an agreement to roam on a network but all traffic be treated as home for billing purposes. There are very nasty details of how the operator name is presented in these circumstances. In certain 'roaming' conditions, the operator is presented just like it is a home network. See EFspn and EFspdi handling if you're curious. This is what might be happening here. The user is not connected to a home network; however for all intents and purposes he is not really roaming. The current roaming logic uses the registration status as reported by the modem firmware, which may not be satisfactory in this particular situation. I changed the network preference on my Android phone to GSM to see what happend. When the phone is set to GSM only, the network operator is 24024 (but Telenor SE is also visible, no roaming symbol). When the phone is in WCDMA mode, the network operator is Telenor SE. I think you need to get in touch with Denis Kenzior on the ofono ml, normal ml subscription policy applies to get mails through. This is out of ConnMan's domain to get correctly configured. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: adding settings that are independent of MAC address
On Mon, 2014-05-12 at 15:27 -0400, Tim Tisdall wrote: I'm trying to create images to flash to several different Cubieboard's with different wifi dongle hardware and was hoping to make it so I don't need to modify the settings files for each flashing. I've tried the following in /var/lib/connman/settings with no success: /var/lib/connman/settings and all directories in /var/lib/connman are the property of ConnMan. They follow their internal syntax not exposed externally. [service_engagelabs] Type=wifi Name=Engage Labs AutoConnect=true Passphrase=xxx IPv4=dhcp This is the syntax of a file /var/lib/connman/ whose suffix is .config. The .config files are use editable and documented in doc/config-format.txt. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: [PATCH 3/3] wifi: Check the returned code when registering the P2P technology driver
Hi, On Mon, 2014-05-12 at 16:12 +0300, Tomasz Bursztyka wrote: Reported by Daniel Wagner daniel.wag...@bmw-carit.de --- plugins/wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index e169692..2dd5dc4 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -2025,8 +2025,8 @@ static void p2p_support(GSupplicantInterface *interface) if (g_supplicant_interface_has_p2p(interface)) { g_supplicant_interface_set_p2p_device_config(interface, connman_utsname_get_hostname()); - connman_technology_driver_register(p2p_tech_driver); - connman_peer_driver_register(peer_driver); + if (connman_technology_driver_register(p2p_tech_driver) == 0) + connman_peer_driver_register(peer_driver); } } Applying: wifi: Check the returned code when registering the P2P technology driver error: patch failed: plugins/wifi.c:2025 error: plugins/wifi.c: patch does not apply Patch failed at 0003 wifi: Check the returned code when registering the P2P technology driver Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: [PATCH] test: Improve p2p-on-supplicant test script for P2P connection
On Mon, 2014-05-12 at 16:10 +0300, Tomasz Bursztyka wrote: - Provide a device name for the local p2p device - join or negociate for a group according to distant peer - GroupFinished signal handler added by Eduardo Abinader eduardo.abina...@openbossa.org Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH v3] rtnl: Don't watch slave interfaces
If you are using a bond interface, the bond interface and the slave interfaces will share the same MAC address. This can eventually cause connman to crash, because several things depend on a unique MAC address per interface. --- src/rtnl.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/rtnl.c b/src/rtnl.c index be1bce9..a46aa28 100644 --- a/src/rtnl.c +++ b/src/rtnl.c @@ -402,7 +402,6 @@ static void process_newlink(unsigned short type, int index, unsigned flags, unsigned change, struct ifinfomsg *msg, int bytes) { struct ether_addr address = {{ 0, 0, 0, 0, 0, 0 }}; - struct ether_addr compare = {{ 0, 0, 0, 0, 0, 0 }}; struct rtnl_link_stats stats; unsigned char operstate = 0xff; struct interface_data *interface; @@ -431,6 +430,12 @@ static void process_newlink(unsigned short type, int index, unsigned flags, address.ether_addr_octet[4], address.ether_addr_octet[5]); + if (flags IFF_SLAVE) { + connman_info(%s {newlink} ignoring slave, index %d address %s, + ifname, index, str); + return; + } + switch (type) { case ARPHRD_ETHER: case ARPHRD_LOOPBACK: @@ -442,9 +447,8 @@ static void process_newlink(unsigned short type, int index, unsigned flags, break; } - if (memcmp(address, compare, ETH_ALEN) != 0) - connman_info(%s {newlink} index %d address %s mtu %u, - ifname, index, str, mtu); + connman_info(%s {newlink} index %d address %s mtu %u, + ifname, index, str, mtu); if (operstate != 0xff) connman_info(%s {newlink} index %d operstate %u %s, -- 1.7.9.5 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 2/2] test: Arg parsing for p2p-on-supplication
Argument parsing functionality for commands and options. --- test/p2p-on-supplicant | 176 +++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 734396e..bc10ad2 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -1,12 +1,13 @@ #!/usr/bin/python from os import O_NONBLOCK -from sys import stdin, stdout, exit, version_info +from sys import stdin, stdout, exit, version_info, argv from fcntl import fcntl, F_GETFL, F_SETFL import glib import dbus import dbus.mainloop.glib import gobject +import argparse WPA_NAME='fi.w1.wpa_supplicant1' WPA_INTF='fi.w1.wpa_supplicant1' @@ -19,6 +20,10 @@ DBUS_PROPERTIES_INTF = 'org.freedesktop.DBus.Properties' P2P_GROUP_CAPAB_GROUP_OWNER = 1 0 +class ArgFields: +for i in ('help','metavar'): +exec('{}={}'.format(i,i)) + class InputLine: def __init__(self, handler): self.line = '' @@ -91,7 +96,7 @@ def print_tuple(t): print 'Element: %s' % e class Wpa_s: -def __init__(self, iface_name = None): +def __init__(self, bus, iface_name, command): self.wpa = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH), WPA_INTF) bus.add_signal_receiver(self.__wpa_property_changed, path=WPA_PATH, member_keyword='signal') @@ -100,37 +105,33 @@ class Wpa_s: bus.add_signal_receiver(self.__InterfaceRemoved, path=WPA_PATH, signal_name='InterfaceRemoved') self.__reset() + +self.debug = False + +self.bus = bus + self.debug = False self.line_in = InputLine(self.__command) -if self.iface_name != None: -self.create_if(self.iface_name) +if iface_name: +try: +self.create_if([iface_name]) +except: +print Error creating interface: %s % iface_name + +if len(command.strip(' ')): +self.__command(command) def help(self, args): -print 'Commands:' -print 'quit' -print 'enable_debug' -print 'disable_debug' -print 'create_if iface_name' -print 'get_if iface_name' -print 'del_if' -print 'scan' -print 'p2p_find' -print 'p2p_stop_find' -print 'p2p_flush' -print 'p2p_group_add' -print 'p2p_group_remove' -print 'p2p_group' -print 'p2p_peers' -print 'p2p_peer p2p device name' -print 'p2p_connect p2p device name' -print 'p2p_disconnect p2p device name' -print 'p2p_serv_disc_req' -print 'p2p_serv_disc_cancel_req identifier' -print 'p2p_service_add service type version/query service/response' -print 'p2p_service_del service type version/query [service]' -print 'p2p_service_flush' +list = self.command_list.keys() +list.sort() +for key in list: +help = '' +if (self.command_list[key].has_key(ArgFields.help)): +help = self.command_list[key][ArgFields.help] + +print %s\t%s % (key.rjust(25), help.ljust(50)) def __command(self, cmd_line): cmd = cmd_line.split(' ') @@ -172,7 +173,7 @@ class Wpa_s: def __DeviceFound(self, object_path): self.peers[object_path] = None -peer = bus.get_object(WPA_INTF, object_path) +peer = self.bus.get_object(WPA_INTF, object_path) peer_if = dbus.Interface(peer, DBUS_PROPERTIES_INTF) self.peers[object_path] = peer_if.GetAll(WPA_PEER_INTF) @@ -201,35 +202,36 @@ class Wpa_s: def __GroupStarted(self, properties): self.group_obj = properties['group_object'] -bus.add_signal_receiver(self.__PeerJoined, +self.bus.add_signal_receiver(self.__PeerJoined, dbus_interface=WPA_GROUP_INTF, path=self.group_obj, signal_name='PeerJoined') -bus.add_signal_receiver(self.__PeerDisconnected, +self.bus.add_signal_receiver(self.__PeerDisconnected, dbus_interface=WPA_GROUP_INTF, path=self.group_obj, signal_name='PeerDisconnected') self.group_iface_path = properties['interface_object'] -self.group_if = dbus.Interface(bus.get_object(WPA_INTF, +self.group_if = dbus.Interface(self.bus.get_object(WPA_INTF, self.group_iface_path), WPA_P2P_INTF) -bus.add_signal_receiver(self.__group_if_property_changed, +self.bus.add_signal_receiver(self.__group_if_property_changed, dbus_interface=WPA_IF_INTF, path=self.group_iface_path,
[PATCH 1/2] test: Minor typos removal in p2p-on-supplicant
Removed minor typo issues in p2p-on-supplicant. --- test/p2p-on-supplicant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index e845c88..734396e 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -185,7 +185,7 @@ class Wpa_s: print 'Peer %s joined' % object_path def __PeerDisconnected(self, object_path): -print 'Peer %s dictonnected' % object_path +print 'Peer %s disconnected' % object_path def __group_if_property_changed(*args, **kwargs): print 'Group - ', @@ -299,7 +299,7 @@ class Wpa_s: self.debug = True @checkarg() -def disable_debug(serf, args): +def disable_debug(self, args): self.debug = False @checkarg(nb_args=1) -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 2/2] test: Arg parsing for p2p-on-supplication
Argument parsing functionality for commands and options. --- test/p2p-on-supplicant | 176 +++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 734396e..7930242 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -1,12 +1,13 @@ #!/usr/bin/python from os import O_NONBLOCK -from sys import stdin, stdout, exit, version_info +from sys import stdin, stdout, exit, version_info, argv from fcntl import fcntl, F_GETFL, F_SETFL import glib import dbus import dbus.mainloop.glib import gobject +import argparse WPA_NAME='fi.w1.wpa_supplicant1' WPA_INTF='fi.w1.wpa_supplicant1' @@ -19,6 +20,10 @@ DBUS_PROPERTIES_INTF = 'org.freedesktop.DBus.Properties' P2P_GROUP_CAPAB_GROUP_OWNER = 1 0 +class ArgFields: +for i in ('help','metavar'): +exec('{}={}'.format(i,i)) + class InputLine: def __init__(self, handler): self.line = '' @@ -91,7 +96,7 @@ def print_tuple(t): print 'Element: %s' % e class Wpa_s: -def __init__(self, iface_name = None): +def __init__(self, bus, iface_name, command): self.wpa = dbus.Interface(bus.get_object(WPA_NAME, WPA_PATH), WPA_INTF) bus.add_signal_receiver(self.__wpa_property_changed, path=WPA_PATH, member_keyword='signal') @@ -100,37 +105,33 @@ class Wpa_s: bus.add_signal_receiver(self.__InterfaceRemoved, path=WPA_PATH, signal_name='InterfaceRemoved') self.__reset() + +self.debug = False + +self.bus = bus + self.debug = False self.line_in = InputLine(self.__command) -if self.iface_name != None: -self.create_if(self.iface_name) +if iface_name: +try: +self.create_if([iface_name]) +except: +print Error creating interface: %s % iface_name + +if len(command.strip(' ')): +self.__command(command) def help(self, args): -print 'Commands:' -print 'quit' -print 'enable_debug' -print 'disable_debug' -print 'create_if iface_name' -print 'get_if iface_name' -print 'del_if' -print 'scan' -print 'p2p_find' -print 'p2p_stop_find' -print 'p2p_flush' -print 'p2p_group_add' -print 'p2p_group_remove' -print 'p2p_group' -print 'p2p_peers' -print 'p2p_peer p2p device name' -print 'p2p_connect p2p device name' -print 'p2p_disconnect p2p device name' -print 'p2p_serv_disc_req' -print 'p2p_serv_disc_cancel_req identifier' -print 'p2p_service_add service type version/query service/response' -print 'p2p_service_del service type version/query [service]' -print 'p2p_service_flush' +list = self.command_list.keys() +list.sort() +for key in list: +help = '' +if (self.command_list[key].has_key(ArgFields.help)): +help = self.command_list[key][ArgFields.help] + +print %s\t%s % (key.rjust(25), help.ljust(50)) def __command(self, cmd_line): cmd = cmd_line.split(' ') @@ -172,7 +173,7 @@ class Wpa_s: def __DeviceFound(self, object_path): self.peers[object_path] = None -peer = bus.get_object(WPA_INTF, object_path) +peer = self.bus.get_object(WPA_INTF, object_path) peer_if = dbus.Interface(peer, DBUS_PROPERTIES_INTF) self.peers[object_path] = peer_if.GetAll(WPA_PEER_INTF) @@ -201,35 +202,36 @@ class Wpa_s: def __GroupStarted(self, properties): self.group_obj = properties['group_object'] -bus.add_signal_receiver(self.__PeerJoined, +self.bus.add_signal_receiver(self.__PeerJoined, dbus_interface=WPA_GROUP_INTF, path=self.group_obj, signal_name='PeerJoined') -bus.add_signal_receiver(self.__PeerDisconnected, +self.bus.add_signal_receiver(self.__PeerDisconnected, dbus_interface=WPA_GROUP_INTF, path=self.group_obj, signal_name='PeerDisconnected') self.group_iface_path = properties['interface_object'] -self.group_if = dbus.Interface(bus.get_object(WPA_INTF, +self.group_if = dbus.Interface(self.bus.get_object(WPA_INTF, self.group_iface_path), WPA_P2P_INTF) -bus.add_signal_receiver(self.__group_if_property_changed, +self.bus.add_signal_receiver(self.__group_if_property_changed, dbus_interface=WPA_IF_INTF, path=self.group_iface_path,
[PATCH 1/2] test: Minor typos removal in p2p-on-supplicant
Removed minor typo issues in p2p-on-supplicant. --- test/p2p-on-supplicant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index e845c88..734396e 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -185,7 +185,7 @@ class Wpa_s: print 'Peer %s joined' % object_path def __PeerDisconnected(self, object_path): -print 'Peer %s dictonnected' % object_path +print 'Peer %s disconnected' % object_path def __group_if_property_changed(*args, **kwargs): print 'Group - ', @@ -299,7 +299,7 @@ class Wpa_s: self.debug = True @checkarg() -def disable_debug(serf, args): +def disable_debug(self, args): self.debug = False @checkarg(nb_args=1) -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
[PATCH 0/2] Improvements for p2p-on-supplicant
Please consider this patchset, instead of previously sent patchset. Eduardo Abinader (2): test: Minor typos removal in p2p-on-supplicant test: Arg parsing for p2p-on-supplication test/p2p-on-supplicant | 180 +++-- 1 file changed, 130 insertions(+), 50 deletions(-) -- 1.9.1 ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman