Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: Ofono LTE modems and connman services (Denis Kenzior)
2. Re: [PATCH] supplicant: fixed return value of ssid getter
(Daniel Wagner)
3. Re: [PATCH] supplicant: fixed return value of ssid getter
(Vasyl Vavrychuk)
4. Re: [PATCH] supplicant: fixed return value of ssid getter
(Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Thu, 1 Mar 2018 10:11:02 -0600
From: Denis Kenzior <[email protected]>
To: Jonas Bonn <[email protected]>, [email protected],
"[email protected]" <[email protected]>
Subject: Re: Ofono LTE modems and connman services
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jonas,
>
> This is an explicit UMTS to LTE transition:
>
> {RadioSettings} [/quectelqmi_0] TechnologyPreference = lte
Okay, so you set the Technology preference and the modem goes into
disconnect and search mode
> {ConnectionManager} [/quectelqmi_0] Attached = False
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
> {NetworkRegistration} [/quectelqmi_0] Status = searching
So far so good
> {NetworkRegistration} [/quectelqmi_0] Technology = lte
> {NetworkOperator} [/quectelqmi_0/operator/24001] Status = available
> {NetworkRegistration} [/quectelqmi_0] Name =
> {ConnectionManager} [/quectelqmi_0] Attached = True
> {NetworkRegistration} [/quectelqmi_0] Status = roaming
> {NetworkRegistration} [/quectelqmi_0] LocationAreaCode = 65534
> {NetworkRegistration} [/quectelqmi_0] CellId = 26710796
> {NetworkOperator} [/quectelqmi_0/operator/24001] Status = current
> {NetworkRegistration} [/quectelqmi_0] Name = 24001
> {NetworkRegistration} [/quectelqmi_0] MobileCountryCode = 240
> {NetworkRegistration} [/quectelqmi_0] MobileNetworkCode = 01
> {NetworkRegistration} [/quectelqmi_0] Status = registered
> {NetworkRegistration} [/quectelqmi_0] Name = Orange F
> {NetworkOperator} [/quectelqmi_0/operator/24001] Name = TELIA
> {NetworkRegistration} [/quectelqmi_0] Strength = 20
> {NetworkRegistration} [/quectelqmi_0] Name = Orange F
> {NetworkOperator} [/quectelqmi_0/operator/24001] Name = 24001
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.172.219.235, Netmask =
> 255.255.255.248, Gateway = 10.172.219.236, DomainNameServers =
> 194.51.3.56 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
>
This actually looks fine. I do wonder what an actual modem roam looks
like, without the technology preference interference.
>
> Here's what connman does effects on the LTE to UMTS transition:
>
> {RadioSettings} [/quectelqmi_0] TechnologyPreference = umts
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
> {ConnectionManager} [/quectelqmi_0] Attached = False
So we get detached, okay...
> {NetworkRegistration} [/quectelqmi_0] LocationAreaCode = 11
> {NetworkRegistration} [/quectelqmi_0] CellId = 752047
> {NetworkRegistration} [/quectelqmi_0] Technology = umts
Switch technology
> {ConnectionManager} [/quectelqmi_0] Attached = True
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.160.218.173, Netmask =
> 255.255.255.252, Gateway = 10.160.218.174, DomainNameServers =
> 194.51.3.56 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
Reattach and get our settings back, so far so good...
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
This part looks bizarre, is the modem deactivating the context for some
reason?
> ^[[F{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface
> = wwp0s20u1i4, Method = static, Address = 10.167.137.164, Netmask =
> 255.255.255.248, Gateway = 10.167.137.165, DomainNameServers =
> 194.51.3.56 194.51.3.56
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
And back to active
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
Back to inactive
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.173.100.170, Netmask =
> 255.255.255.252, Gateway = 10.173.100.169, DomainNameServers =
> 194.51.3.56 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.160.115.172, Netmask =
> 255.255.255.248, Gateway = 10.160.115.173, DomainNameServers =
> 194.51.3.56 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.167.11.161, Netmask =
> 255.255.255.252, Gateway = 10.167.11.162, DomainNameServers =
> 194.51.3.56 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
> {ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface =
> wwp0s20u1i4, Method = static, Address = 10.173.65.6, Netmask =
> 255.255.255.252, Gateway = 10.173.65.5, DomainNameServers = 194.51.3.56
> 194.51.3.56 }
> {ConnectionContext} [/quectelqmi_0/context1] Active = True
> {ConnectionContext} [/quectelqmi_0/context1] Settings = {}
> {ConnectionContext} [/quectelqmi_0/context1] Active = False
>
> ....eventually that settles down and the connection is established.
>
I don't get this part actually. ConnMan is only activating the context
right? What is deactivating it?
Regards,
-Denis
------------------------------
Message: 2
Date: Thu, 1 Mar 2018 18:14:18 +0100
From: Daniel Wagner <[email protected]>
To: Vasyl Vavrychuk <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] supplicant: fixed return value of ssid getter
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi Vasyl,
On 28.02.2018 23:40, Vasyl Vavrychuk wrote:
> Hi, Daniel,
>
> I appears that my change is breaking one. I have two hidden networks
> in range and one (WEP one) survives this change but other (PSK)
> disappear after my change from `>services` in commanctl.
>
> I will investigate why...
Yeah, this hidden networks stuff is terrible nasty and needs to die.
Until then we have to cope with it.
> On Wed, Feb 28, 2018 at 9:37 AM, Daniel Wagner <[email protected]> wrote:
>> What about introducing a helper function which says, the SSID we have is a
>> valig, something like this
>>
>> bool ssid_is_valid(const unsigned char *ssid, unsigned int ssid_len)
>> {
>> /* empty ssid, that is "" */
>> if (ssid_len == 0 && !ssid && ssid[0] == '\0')
>> return true;
>>
>> if (ssid_len > 0)
>> return true;
>>
>> return false;
>> }
>>
>> and use it everyhwere we need. Open coding seems like a bad idea.
> From one side I like this function but from other side it bothers me
> if we can do ssid[0] when ssid_len==0. And also I am not sure how this
> function can help us. And also it needs many changes in existing code.
The idea is to annotate the places which try to figure out if the SSID
is valid or not. So this is in the first step only a refactoring step.
> I suggest go one of two ways. I prefer first if you are okay.
>
> 1. Simply remove noisy warning
> --- a/src/config.c
> +++ b/src/config.c
> @@ -1219,8 +1219,7 @@ static int try_provision_service(struct
> connman_config_service *config,
> ssid = connman_network_get_blob(network, "WiFi.SSID",
> &ssid_len);
> if (!ssid) {
> - connman_error("Network SSID not set");
> - return -EINVAL;> + return
> -ENOENT;
There is only one user of this function and it just checks if the return
value is != 0:
static int
find_and_provision_service_from_config(struct connman_service *service,
struct connman_config *config)
{
GHashTableIter iter;
gpointer value, key;
g_hash_table_iter_init(&iter, config->service_table);
while (g_hash_table_iter_next(&iter, &key,
&value)) {
if (!try_provision_service(value, service))
return 0;
}
return -ENOENT;
}
What's the point to change this line then?
> }
>
> if (!config->ssid || ssid_len != config->ssid_len)
>
> 2. Keep track of ssid_valid field over the code
> --- a/gsupplicant/supplicant.c
> +++ b/gsupplicant/supplicant.c
> @@ -225,6 +225,7 @@ struct _GSupplicantNetwork {
> char *name;
> unsigned char ssid[32];
> unsigned int ssid_len;
> + bool ssid_valid;
Yes, that makes sense and is a variation of the ssid_is_valid(). Don't
worry, I don't fear some code changes :)
Thanks,
Daniel
------------------------------
Message: 3
Date: Thu, 1 Mar 2018 19:27:42 +0200
From: Vasyl Vavrychuk <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] supplicant: fixed return value of ssid getter
Message-ID:
<CAGj4m+6kdSJSUsV0XLVGiBbHtxdXmo5srhp=yWF=vienotp...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
>> I suggest go one of two ways. I prefer first if you are okay.
>>
>> 1. Simply remove noisy warning
>> --- a/src/config.c
>> +++ b/src/config.c
>> @@ -1219,8 +1219,7 @@ static int try_provision_service(struct
>> connman_config_service *config,
>> ssid = connman_network_get_blob(network, "WiFi.SSID",
>> &ssid_len);
>> if (!ssid) {
>> - connman_error("Network SSID not set");
>> - return -EINVAL;> + return
>> -ENOENT;
>
> There is only one user of this function and it just checks if the return
> value is != 0:
>
> static int
> find_and_provision_service_from_config(struct connman_service *service,
> struct connman_config *config)
> {
> GHashTableIter iter;
> gpointer value, key;
>
> g_hash_table_iter_init(&iter, config->service_table);
> while (g_hash_table_iter_next(&iter, &key,
> &value)) {
> if (!try_provision_service(value, service))
> return 0;
> }
>
> return -ENOENT;
> }
>
> What's the point to change this line then?
The point is to not get noisy error in logs "Network SSID not set"
while connman tries to provision hidden network from config file.
------------------------------
Message: 4
Date: Thu, 1 Mar 2018 19:00:54 +0100
From: Daniel Wagner <[email protected]>
To: Vasyl Vavrychuk <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] supplicant: fixed return value of ssid getter
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
> The point is to not get noisy error in logs "Network SSID not set"
> while connman tries to provision hidden network from config file.
I overlooked the removal of the connman_error() message. Yes, I think
you can remove it. It is not something we can really control anyway.
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 29, Issue 2
**************************************