[PATCH 0/3] Improve VPN property saving and property management
by Jussi Laakkonen
These changes improve the saving of VPN properties in order to avoid
losing information if connman-vpnd crashes. Also new feature to multiple
values in one D-Bus call is added.
The first patch in this set addresses the issue of not saving VPN
provider values immediately after the value has been changed over D-Bus.
To avoid unnecessary writes to disk the value of the property is
compared to the existing one. To do this for user routes, the routes are
read into a sorted list to make the comparing of them more efficient. As
a result each successful value change will be written immediately to
provider settings.
The second patch adds a new feature to add multiple VPN provider
properties using one D-Bus call: SetProperties. This new function
accepts input in the same format as GetProperties returns. This changed
improves the performance when changing multiple values as the saving of
properties is done after the complete dict is processed, if there are
any changes to any of the values. Empty values are also allowed to be
able to set and clear certain values in one D-Bus method call. In case
there are errorous properties these are reported back as comma separated
property name list at the end of the appropriate error message.
The third patch adds documentation of the SetProperties D-Bus method and
also documents all errors for SetProperty and ClearProperty D-Bus
methods.
Jussi Laakkonen (3):
vpn-provider: Save configuration only when a property value is changed
vpn-provider: Implement setting of multiple VPN properties with one
call
doc: Document VPN connection SetProperties D-Bus method
doc/vpn-connection-api.txt | 28 +++
vpn/vpn-provider.c | 342 +++++++++++++++++++++++++++++++++----
2 files changed, 334 insertions(+), 36 deletions(-)
--
2.20.1
1 year
Re: Connection to WPA fails following connect-failed error
by Daniel Wagner
Hi Karine,
On Tue, Jan 07, 2020 at 08:10:27PM +0000, Karine Ouellet wrote:
> 4. Try to connect to the first service (used in the initial state above). We should be able to connect to the service without user input. However, we systematically receive the following error at the first attempt.
>
> connmanctl> connect <first_service>
> Agent ReportError <first_service>
> connect-failed
> Error /net/connman/service/<first_service>: Input/output error
> Agent request cancelled by ConnMan
>
> 5. Redo the previous operation. This time, the connection is done properly.
>
> $ connmanctl> connect <first_service>
> Connected <first_service>
>
> Any advice or guidance would be greatly appreciated!
This sounds like as if the agent code in ConnMan caches some state and
doesn't update it correctly. The state should be tracked by services,
so it's kind of unclear to me how the second service is able to
interfere with the first one. I suggest to enable the log for the
agent code and try to figure out what is going on, e.g. connmand -n -d
src/agent.c. Maybe you need to enable the logs (connmand -n -d) but
that might be too much info. Also if you don't see any interesting,
add more DBG() statements to see what the state machine is doing.
Thanks,
Daniel
1 year
Re: [PATCH v2 0/3] Simplify settings save code
by Daniel Wagner
Good Morning Thomas,
On Tue, Jan 07, 2020 at 09:40:56PM +0000, Thomas Green wrote:
> I've attached 4 files to this email. The one named connmanctl.out
> is the capture of the connmanctl output to reproduce the problem.
> The ones named settings.{orig,final} are the contents of the
> original and final states of the settings file for the ethernet
> service. The last file, debug.out, is the capture of the output
> from the command:
I think I cracked the problem. ipconfig.c stores the values in struct
ipconfig, which is the current applied configuration. Whenever we
disconnect a service service.c will call
__connman_ipconfig_address_remove(). This clears struct ipconfig and
after that we try to save it.
The values of ipconfig_ipv4 in struct service needs to be saved if the
method is manual and not dhcp.
Thanks,
Daniel
1 year
Re: [PATCH v2 0/3] Simplify settings save code
by Daniel Wagner
Hi Tom,
On Mon, Jan 06, 2020 at 08:59:30PM +0000, Thomas Green wrote:
> Sorry I was out so long. I was having shoulder surgery. I'm back now.
Uhh, hope it wasn't too bad. Speedy recovy!
> I've applied this patch and testing it in the use case we were looking at.
Thanks for giving the patches a try.
> Now, when at the end of the use case, the settings file for the ethernet
> controller have
>
> IPv4.method=manual
Uh, that's the only thing in the settings file left?
> But have saved none of the IPv4 information, so any attempt to reconnect
> to the ethernet fails with an Input/Output error.
Alright, so that explains something. The other settings were also lost
but we only the gateway differently. In fact all the manual config
get's lost.
> Any clues where to go to from here?
IIRC, the steps are
1) service configure manual
2) disconnect service
3) reconnect service
?
Thanks,
Daniel
1 year
Connection to WPA fails following connect-failed error
by Karine Ouellet
Can you help with the following issue? We are experiencing problem when connecting to a WPA service following a connect-failed error on another service.
We are using connman 1.37 with wpa_supplicant V2.9Initial state:
$ connmanctl> connect <first_service>
Passphrase = [ Type=wep, Requirement=mandatory ] Passphrase? <Enter RIGHT passphrase>
Connected <first_service>
To reproduce the issue:
1. Connect to another WPA service by issuing wrong passphrase. The connection is unsuccessful as the wrong key is entered (expected behaviour).
$ connmanctl> connect <second_service>
Passphrase = [ Type=wep, Requirement=mandatory ] Passphrase? <Enter WRONG passphrase>
Agent ReportError <second_service>
connect-failed
Error /net/connman/service/<second_service>: Input/output error
Agent request cancelled by ConnMan
2. Connect again to the same service, the agent doesn't ask for passphrase.
3. Remove the stored passphrase
connmanctl> config <second_service> --remove
*
4. Try to connect to the first service (used in the initial state above). We should be able to connect to the service without user input. However, we systematically receive the following error at the first attempt.
connmanctl> connect <first_service>
Agent ReportError <first_service>
connect-failed
Error /net/connman/service/<first_service>: Input/output error
Agent request cancelled by ConnMan
5. Redo the previous operation. This time, the connection is done properly.
$ connmanctl> connect <first_service>
Connected <first_service>
Any advice or guidance would be greatly appreciated!
1 year
[PATCH v2 00/10] Update iwd plugin
by Daniel Wagner
Still WIP
changes since v1:
- Added manual scan suppprt
- Added tethering support
- Fixed handling of KnownNetwork when disconnecting
Daniel Wagner (10):
iwd: Parse SupportedModes from adapter proxy
iwd: Update device object
iwd: Add KnownNetwork support
iwd: Add KnownNetwork property to struct iwd_network
iwd: Add Station API support
iwd: Add AdHoc API support
iwd: Add AccessPoint API support
iwd: Re-add update_signal_strenght()
iwd: Hookup manual scan trigger
iwd: Add support for tethering
plugins/iwd.c | 862 +++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 789 insertions(+), 73 deletions(-)
--
2.24.1
1 year
[HELP :-) ] 3g modem auto connect
by nick83ola
Dear Connman developers,
I have a telit HE910-D modem that I need to make it work inside yocto.
the modem is correctly recognized both by connman and ofono
connmanctl services
*AO Wired ethernet_0001c021c253_cable
3 cellular_272023119202599_context1
...
And it work fine if I issue the command
connmanctl connect cellular_272023119202599_context1
And it also reconnect after reboot
My issue is that the first time that you connect the modem
(if there's no configuration folder for it in /var/lib/connman) it doesn't
connect automatically
I need a way to say to connman that if there's any cellular modem connected
just connect to it.
there's an option or something that I can do without monitoring connman
through dbus?
Is this the correct connman behaviour?
Kind Regards
Nicola Lunghi
cat /var/lib/connman/cellular_272023119202599_context1/settings
[cellular_272023119202599_context1]
Name=3
Favorite=true
AutoConnect=true
Modified=2019-10-12T09:23:12.647297Z
IPv4.method=fixed
IPv4.netmask_prefixlen=32
IPv4.local_address=100.71.238.126
IPv6.method=off
IPv6.privacy=disabled
cat /etc/connman/main.conf
[General]
SingleConnectedTechnology=false
FallbackTimeservers=
NetworkInterfaceBlacklist=vmnet,vboxnet,virbr,ifb,ve-,vb-,wlanap
AllowHostnameUpdates=false
DefaultAutoConnectTechnologies=cellular,wifi,ethernet
AlwaysConnectedTechnologies=cellular,wifi
PreferredTechnologies=cellular,wifi,ethernet
1 year
How to set up cellular.config with AccessPointName?
by JH
Hi,
Hi,
I cannot find any document for cellular.config syntax, can I I set up
AccessPointName in cellular.config?
I tried following file, it did not work, I know if I have a correct
Name = <SIM service provider>, it will work, but i don't know the name
of the service provider, I only knows the AccessPointName for Aeris
which I think that APN is a gateway to connect to its network.
$ vi /var/lib/connman/cellular.config
[global]
Name = cellular
Description = Cellular
[service_cellular]
Type = cellular
AccessPointName = iot-eu.aer.net
Appreciate your advice.
Thank you.
Kind regards,
- jh
1 year
Why can't connman automatically enable and connect to cellular network interface?
by JH
Hi,
I installed oFono plugin to an embedded system where the cellular is
used, I suppose that the connman should automatically enable and
connect to cellular when it first time boot up, it didn't, I have to
manually run the connmanctl command to enable and to connect it. In a
product due to limited Flash storage size, I'll not install connmanctl
and there will be no manual interactive process, how can I set up
connman to automatically enable and connect to cellular network
interface?
Thank you.
Kind regards,
- jupiter
1 year
Re: wifi AP disconnect(disconnect reason code 1)
by Daniel Wagner
Hi Deepu,
On Mon, Jan 06, 2020 at 12:22:31PM +0000, Deepu Paul wrote:
> Hi Daniel,
>
> The previous mail got bounced back as the attachment size was greater than
> 500kb .
>
> Attaching the logs again.
Thanks for the logs. Really helpful.
> one thing i am noticing is every-time during disconnect, there is
> a (Reason: 3=DEAUTH_LEAVING)[line 6790] during the re association
> after (Reason: 1=UNSPECIFIED)[line 5752].
IIRC, deauth leaving means the local device has decided to leave the
network. Though this doesn't make any difference for ConnMan. It's the
same code path. Only reason code 6 is handled differently.
> I am not sure if this is the issue with wpa_supplicant, can you please
> check the logs and let me know if this is initiated by the wpa_supplicant?
From you previous email:
> In the second one it failed, in this scenario i don't see the interface state change to 2(disconnected), in this case the state change is (4, 5, 6, 8, 10)
> and seeing the message "Probably roaming right now! Staying connected..."
That is what I suspected. So wpa_supplicant doesn't tell us excactly
what it is doing. Suddenldy we see state transitions and we have to
guess what's happending.
But then we get a new message which it the disconnect reason:
connmand[3595]: ../connman-1.37/src/rtnl.c:rtnl_message() NEWLINK len 72 type 16 flags 0x0000 seq 0 pid 0
connmand[3595]: ../connman-1.37/gsupplicant/supplicant.c:signal_interface_changed()
connmand[3595]: ../connman-1.37/gsupplicant/supplicant.c:interface_property() DisconnectReason
connmand[3595]: ../connman-1.37/gsupplicant/supplicant.c:signal_bss_removed()
connmand[3595]: ../connman-1.37/gsupplicant/supplicant.c:update_network_signal() New network signal -90
connmand[3595]: ../connman-1.37/plugins/wifi.c:network_removed() name purpleline
Could it be, whenever it works you don't get an disconnect reason
after we assume wpa_supplicant is roaming?
Thanks,
Daniel
1 year