RE: MoveBefore/MoveAfter not working as expected
Hello Patrik, I tried checking behavior of MoveBefore/MoveAfter even without WiFi. It's not working as expected and service is not moving to top. 1. Connect Two DIFFERENT technologies(EX: WiFi BT/WiFi Ethernet/ Ethernet BT) in READY state 2. Call MoveBefore/MoveAfter 3. Check service order. Outcome: Service order if not changing. Note: This issue is coming only when both services are in ready state. But when data usage is on for both services (or one online and other ready) then MoveBefore/MoveAfter is working perfectly fine. Also in the case of 2 Ethernet devices connected in ready state, MoveBefore/MoveAfter is working fine. Really we cannot control service ordering in case of different technologies in ready state? Do you know any alternatives to achieve this? ==Test with Same technologies== 1.Connected USB1 in ready mode root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_026406750174_cable } 2.Connected USB2 in ready mode root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_026406750174_cable } *AR Wired{ ethernet_aabbccddeeff_cable } 3.movebefore for USB2 root@imx6x-std:~# dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/service/ethernet_aabbccddeeff_cable net. connman.Service.MoveBefore objpath:/net/connman/service/ethernet_026406750174_cable 4.connmanctl services root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_aabbccddeeff_cable } *AR Wired{ ethernet_026406750174_cable } 5.MoveBefore for USB1 dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/service/ethernet_026406750174_cable net.c onnman.Service.MoveBefore objpath:/net/connman/service/ethernet_aabbccddeeff_cable root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_026406750174_cable } *AR Wired{ ethernet_aabbccddeeff_cable } ==Test with Different technologies== 1.Connected BT and USB in ready mode root@imx6x-std:/lib/systemd/system# connmanctl services List of all services: *AR Wired{ ethernet_026406750174_cable } * R JPoonam { bluetooth_001eaeb40750_44d4e018fcc0 } 2.MoveBefore for BT root@imx6x-std:/lib/systemd/system# dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/service/bluetooth_001ea eb40750_44d4e018fcc0 net.connman.Service.MoveBefore objpath:/net/connman/service/ethernet_026406750174_cable 3. root@imx6x-std:/lib/systemd/system# connmanctl services List of all services: *AR Wired{ ethernet_026406750174_cable } * R JPoonam { bluetooth_001eaeb40750_44d4e018fcc0 } Note: Preferred technology list PreferredTechnologies = wifi,ethernet,Bluetooth -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Friday, February 6, 2015 7:27 PM To: connman@connman.net Subject: Re: MoveBefore/MoveAfter not working as expected Hi, On Wed, 2015-02-04 at 10:31 +, Priyaranjan Singh wrote: Call to MoveBefore/MoveAfter is not changing the default gateway where service moved to top is in ready state. Point I want to highlight is the outcome of moveBefore/moveAfter (outcome of step 5): moveBefore and moveAfter seem not to work at all as advertised. Every time the service order is updated, moveBefore and moveAfter actions are forgotten. The service order is updated quite often, especially when WiFi networks appear, disappear or change signal strength. This is in practise unfixable, so I'm going to update the documentation saying so instead... Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
MoveBefore/MoveAfter not working as expected
Hello All, Call to MoveBefore/MoveAfter is not changing the default gateway where service moved to top is in ready state. Point I want to highlight is the outcome of moveBefore/moveAfter (outcome of step 5): 1. Wifi is not becoming default gateway 2. Drop in connection status from 'online' to 'ready' for ethernet Note: Updated preferred technology list PreferredTechnologies = wifi,ethernet,Bluetooth Please let me know if this is expected output? Here is the test: 1.connected wifi datausage off(ready mode) root@imx6x-std:~# connmanctl services List of all services: *AR XT1033 8153 { wifi_001cc1a25dff_585431302038313533_managed_none } 2.USB connected with datausage off(ready mode) root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_aabbccddeeff_cable } *AR XT1033 8153{ wifi_001cc1a25dff_585431302038313533_managed_none } 3.call MoveBefore to take wifi to top dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/service/wifi_001cc1a25dff_585431302038313533_managed_none net.connman.Service.MoveBefore objpath:/net/connman/service/ethernet_aabbccddeeff_cable root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_aabbccddeeff_cable } *AR XT1033 8153{ wifi_001cc1a25dff_585431302038313533_managed_none } 4.disconnect USB and connect it again (data usage on) root@imx6x-std:~# connmanctl services List of all services: *AO Wired{ ethernet_aabbccddeeff_cable } *AR XT1033 8153{ wifi_001cc1a25dff_585431302038313533_managed_none } 5.call MoveAfter to take wifi to top dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/service/ethernet_aabbccddeeff_cable net.connman.Service.MoveAfter objpath:/net/connman/service/wifi_001cc1a25dff_585431302038313533_managed_none root@imx6x-std:~# connmanctl services List of all services: *AR Wired{ ethernet_aabbccddeeff_cable } *AR XT1033 8153{ wifi_001cc1a25dff_585431302038313533_managed_none } Best Regards, PriyaranjanS This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: Issue found in service connman ordering
Hello Patrik, Thanks for clarification. I made my assumption from: https://01.org/connman/documentation [General] PreferredTechnologies = ethernet,wifi,cellular With PreferredTechnologies enabled, the autoconnected services depend on the order in which they are created. Let's say there is one service for ethernet and another one for WiFi. If the WiFi service is detected before the ethernet one, both will get connected as ethernet, connected later, is preferred over WiFi. And as described above, WiFi can still have the default route if it goes to state 'online' while the ethernet one stays in 'ready'. If the ordering is the opposite with ethernet discovered first, the WiFi service will never be considered as ethernet is preferred over WiFi and already connected. -Converting this to my use case where: PreferredTechnologies = wifi,ethernet,Bluetooth With PreferredTechnologies enabled, the autoconnected services depend on the order in which they are created. Let's say there is one service for ethernet and another one for WiFi. If the Ethernet service is detected before the WiFi one, both will get connected as WiFi, connected later, is preferred over Ethernet. And as described above, Ethernet can still have the default route if it goes to state 'online' while the WiFi one stays in 'ready'. If the ordering is the opposite with WiFi discovered first, the ethernet service will never be considered as WiFi is preferred over ethernet and already connected. But as I understood from you, priority ordering is decided by: i) online service over ready service ii) In case of same connection status(online or ready), then PreferredTechnologies ordering will be considered. Sometime better connectivity state (better signal strength) also considered. Default gateway should not drop its connection status iii) Services of same technology will be ordered according to online status and then order in which they are created iv) Order in which service created really matters? Thanks in advance. Best Regards, PriyaranjanS -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Friday, January 30, 2015 1:49 PM To: connman@connman.net Subject: Re: Issue found in service connman ordering Hi, On Fri, 2015-01-30 at 07:55 +, Priyaranjan Singh wrote: PreferredTechnologies = wifi,ethernet,Bluetooth If the services end up with equal states, i.e. all in 'ready' or all can possbly go 'online' the order is wifi first, ethernet second and bluetooth third. The start of a documentation at https://01.org/connman/documentation tries to explain this. Step 2) Connect Ethernet device/phone (data usage on) with target Actual Service ordering: #connmanctl services List of all services: *AO Wired{ ethernet_22d3f9d281a8_cable } *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Expected Service ordering: #connmanctl services List of all services: *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } *AR Wired{ ethernet_22d3f9d281a8_cable } If the services had both stayed at 'ready' the expected service ordering would be the one used. But now ethernet successfully finished the online check, and entered 'online' state as a result. PreferredTechnologies is valid for services in the same state, and 'online' state is always preferred over 'ready'. If there are more than one services that can go 'online', PreferredTechnologies is consulted again and the most preferred technology type is the one that is selected as the one and only 'online' service at that time. So this case works as expected. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: Issue found in service connman ordering
Hello, Thanks for reply. Sorry, I pasted table from MS Word document. Here are the service ordering issues mentioned in my last email. Please confirm the failures or clarify in case my understanding is wrong. Test index: 1 i) Connect WiFi mobile phone (data usage on): wifi_001cc1a25dff_757474656a536972_managed_none State: Online Favorite: true Connected first time: Yes Data Usage: Enabled Service order: Wifi(AO) ii) Connect USB device in tether mode (data usage on): ethernet_020c1e7b6205_cable State: Ready Favorite: true Connected first time: Yes Data Usage: Enabled Service order: Wifi(AO), USB(AR) Test Result: Passed Test index: 2 i) connect WiFi mobile phone with data usage disable: wifi_001cc1a25dff_757474656a536972_managed_none State: Ready Favorite: true Connected first time: No Data Usage: Disabled Service order: Wifi(AR) ii) Connect USB device in tether mode (data usage on): ethernet_020c1e7b6205_cable State: Online Favorite: true Connected first time: No Data Usage: Enabled Service order: USB(AO), WiFi(AR) Test Result: Failed Test index: 3 i) connect WiFi mobile phone with data usage disable: wifi_001cc1a25dff_757474656a536972_managed_none State: Ready Favorite: true Connected first time: No Data Usage: Disabled Service order: Wifi(AR) ii) Connect USB device in tether mode (data usage off): ethernet_020c1e7b6205_cable State: Ready Favorite: true Connected first time: No Data Usage: Disabled Service order: USB(AR), WiFi(AR) Test Result: Failed Test index: 4 i) connect WiFi mobile phone with data usage disable: wifi_001cc1a25dff_757474656a536972_managed_none State: Ready Favorite: true Connected first time: No Data Usage: Disabled Service order: Wifi(AR) ii) Connect another USB device with data usage enable: ethernet_c66422b41680_cable State: Online Favorite: true Connected first time: Yes Data Usage: Enabled Service order: USB(AO), WiFi(AR) Test Result: Failed Tested on: Connman version: 1.23 Best Regards, PriyaranjanS -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Sven Schwedas Sent: Thursday, January 29, 2015 6:16 PM To: connman@connman.net Subject: Re: Issue found in service connman ordering On 2015-01-29 13:24, Priyaranjan Singh wrote: We are using Connman version: 1.23 1.27 is the last release, and the git master branch has a lot of additional fixes. You should re-test with either (and appropriately recent versions of wpa_supplicant et. al.) and report any still existing issues in a more readable format. -- Mit freundlichen Grüßen, / Best Regards, Sven Schwedas Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167 http://software.tao.at This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: Issue found in service connman ordering
Hello Tomasz Patrik, Thanks for your reply. Here is my configuration of connman: /etc/connman/main.conf DefaultAutoConnectTechnologies = ethernet,wifi PreferredTechnologies = wifi,ethernet,Bluetooth 1) Test 1: Assumption: Considering my Preferred Technologies (wifi ethernet), WiFi discovered first and preferred over Ethernet, the Ethernet service will never be considered as default gateway till WiFi disconnected. Basic steps: Step 1) First connect target device with WiFi mobile phone (portable host spot enabled in Access point mode: data usage off) # connmanctl services List of all services: *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Step 2) Connect Ethernet device/phone (data usage on) with target Actual Service ordering: #connmanctl services List of all services: *AO Wired{ ethernet_22d3f9d281a8_cable } *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Expected Service ordering: #connmanctl services List of all services: *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } *AR Wired{ ethernet_22d3f9d281a8_cable } 2) Test 2: Assumption: Considering my Preferred Technologies (wifi ethernet), WiFi discovered second but preferred over Ethernet. But ethernet can still have default route if it goes to state 'online' while the WiFi one stays in 'ready'. Basic steps: Step 1) Connect Ethernet device/phone (data usage on) with target ~# connmanctl services List of all services: *AO Wired{ ethernet_4afaf413be54_cable } Step 2) First connect target device with WiFi mobile phone (portable host spot enabled in Access point mode: data usage off) Actual Service ordering: ~# connmanctl services List of all services: *AR Wired{ ethernet_4afaf413be54_cable } *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Expected Service ordering: ~# connmanctl services List of all services: *AO Wired{ ethernet_4afaf413be54_cable } *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } There is a statement given in the documentation: After that the autoconnected service is continuously used and ConnMan won't select a new one until the network goes out of range. When the service goes out of range or gets disconnected from the network infrastructure side, autoconnect is re-run and another favorite and autoconnectable service is selected. The order in which services are considered can be modified by the PreferredTechnologies configuration in main.conf. As we have specified PreferredTechnologies, hence ordering should be modified. 2) Test 3: Assumption: Considering my Preferred Technologies (wifi ethernet), WiFi discovered first and preferred over Ethernet Basic steps: Step 1) First connect target device with WiFi mobile phone (portable host spot enabled in Access point mode: data usage off) # connmanctl services List of all services: *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Step 2) Connect Ethernet device/phone (data usage off) with target Actual Service ordering: # connmanctl services List of all services: *AR Wired{ ethernet_d2a3d4d7d613_cable } *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } Expected Service ordering: #connmanctl services List of all services: *AR uttejSir { wifi_001cc1a25dff_757474656a536972_managed_none } *AR Wired{ ethernet_22d3f9d281a8_cable } Note: Service ordering is as expected (WiFi default top: *AO uttejSir followed by ethernet) when WiFi mobile phone (portable host spot enabled in Access point mode: data usage on) Ethernet device/phone (data usage on) Yes, we will have to use Service.MoveAfter() or Service.MoveBefore() to make ordering user defined. But are these use cases a candidate for explicit service ordering? Please correct my understanding if my assumptions are wrong. Best Regards, PriyarannjanS -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Tomasz Bursztyka Sent: Thursday, January 29, 2015 6:45 PM To: connman@connman.net Subject: Re: Issue found in service connman ordering Hi, You are assuming the ordering based on the online state taking over the ready state. However that's flawed, because there is no way you can guaranty for a service to get such online state all the time. There is quite a lot of logic behind the internet connectivity check, and it's not 100% bullet proof. (if you dns servers fails, if the distant connectivity check website is down, etc etc...) After all, being ready does not mean you cannot access the internet. If you want to order service, you will have to order them by