Send connman mailing list submissions to
        connman@lists.01.org

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
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: AW: AW: AW: AW: connmand[186]: Online check failed but
      running dhclient manually fixes this issue (Daniel Wagner)
   2. [PATCH] dbus.h: Update include/dbus.h to remove unused macro
      (Harish Jenny K N)
   3. Re: When BackgroundScanning = false, connman's Scan() dbus
      method is broken (Jonah Petri)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Aug 2017 12:47:28 +0200
From: Daniel Wagner <w...@monom.org>
To: "Eswaran Vinothkumar (BEG/PJ-IOT-EL)"
        <vinothkumar.eswa...@de.bosch.com>,  Christophe Ronco
        <c.ro...@kerlink.fr>
Cc: "connman@lists.01.org" <connman@lists.01.org>, "of...@ofono.org"
        <of...@ofono.org>
Subject: Re: AW: AW: AW: AW: connmand[186]: Online check failed but
        running dhclient manually fixes this issue
Message-ID: <11ad24fd-f5f9-fa4c-6be5-90ac6a9ff...@monom.org>
Content-Type: text/plain; charset=utf-8

>    Bus 001 Device 003: ID 1bc7:1201 Telit Wireless Solutions

Here is a compile tested 'fix'. I don't know if this works and\
obviously it doesn't follow the coding guide lines for this
project. If you could test this and report back the outcome
that would be really helpful. Then I can create a proper
patch for Denis.


>From de165e84a0d58aabb0dcdd46cd77eba751a3b407 Mon Sep 17 00:00:00 2001
From: Daniel Wagner <w...@monom.org>
Date: Thu, 10 Aug 2017 12:40:39 +0200
Subject: [PATCH] qmimodem: Do not add IP config for Telit 910 EUG

This modem reports wrong IP configuration back. It's safer not to
report a bogus configuration because the user has no chance to know if
this is broken configuration or not. The user can still fall back to
DHCP. This was also the default behaviour till 475b789f3de9 ("qmi:
retrieve GPRS context parameters").
---
 drivers/qmimodem/gprs-context.c | 5 ++++-
 plugins/udevng.c                | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index 9a22b89f1e54..d7c3ceba41e6 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -91,6 +91,7 @@ static void get_settings_cb(struct qmi_result *result, void 
*user_data)
 
        DBG("");
 
+       modem = ofono_gprs_context_get_modem(gc);
        if (qmi_result_set_error(result, NULL))
                goto done;
 
@@ -106,6 +107,9 @@ static void get_settings_cb(struct qmi_result *result, void 
*user_data)
        if (qmi_result_get_uint8(result, QMI_WDS_RESULT_IP_FAMILY, &ip_family))
                DBG("IP family %d", ip_family);
 
+       if (ofono_modem_get_boolean(modem, "IgnoreIPConfig"))
+               goto done;
+
        if (qmi_result_get_uint32(result,QMI_WDS_RESULT_IP_ADDRESS, &ip_addr)) {
                addr.s_addr = htonl(ip_addr);
                straddr = inet_ntoa(addr);
@@ -146,7 +150,6 @@ static void get_settings_cb(struct qmi_result *result, void 
*user_data)
                ofono_gprs_context_set_ipv4_dns_servers(gc, dns);
 
 done:
-       modem = ofono_gprs_context_get_modem(gc);
        interface = ofono_modem_get_string(modem, "NetworkInterface");
 
        ofono_gprs_context_set_interface(gc, interface);
diff --git a/plugins/udevng.c b/plugins/udevng.c
index aa28bcb8911e..460a6287367e 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -688,6 +688,10 @@ static gboolean setup_telitqmi(struct modem_info *modem)
 
        ofono_modem_set_boolean(modem->modem, "ForceSimLegacy", TRUE);
        ofono_modem_set_boolean(modem->modem, "AlwaysOnline", TRUE);
+
+       if (g_strcmp0(modem->model, "1012") == 0)
+               ofono_modem_set_boolean(modem->modem, "IgnoreIPConfig", TRUE);
+
        ofono_modem_set_driver(modem->modem, "gobi");
 
        return TRUE;
-- 
2.9.4


------------------------------

Message: 2
Date: Thu, 10 Aug 2017 19:51:20 +0530
From: Harish Jenny K N <harish_kand...@mentor.com>
To: <conn...@connman.net>
Subject: [PATCH] dbus.h: Update include/dbus.h to remove unused macro
Message-ID:
        <1502374880-4284-1-git-send-email-harish_kand...@mentor.com>
Content-Type: text/plain

CONNMAN_DEBUG_INTERFACE is not used anymore. Hence remove
this from include/dbus.h

---
 include/dbus.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/dbus.h b/include/dbus.h
index 26f94d6..d785d6d 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -31,7 +31,6 @@ extern "C" {
 #define CONNMAN_SERVICE                        "net.connman"
 #define CONNMAN_PATH                   "/net/connman"

-#define CONNMAN_DEBUG_INTERFACE                CONNMAN_SERVICE ".Debug"
 #define CONNMAN_ERROR_INTERFACE                CONNMAN_SERVICE ".Error"
 #define CONNMAN_AGENT_INTERFACE                CONNMAN_SERVICE ".Agent"
 #define CONNMAN_COUNTER_INTERFACE      CONNMAN_SERVICE ".Counter"
--
1.9.1




------------------------------

Message: 3
Date: Thu, 10 Aug 2017 10:51:14 -0400
From: Jonah Petri <jo...@sense.com>
To: Jose Blanquicet <blanqui...@gmail.com>
Cc: Daniel Wagner <w...@monom.org>, connman@lists.01.org
Subject: Re: When BackgroundScanning = false, connman's Scan() dbus
        method is broken
Message-ID: <3360fbfc-02c1-4ba6-a935-71db5b2a3...@sense.com>
Content-Type: text/plain; charset=utf-8

Hello!

> On Aug 10, 2017, at 4:19 AM, Jose Blanquicet <blanqui...@gmail.com> wrote:
> 
> Good morning,
> 
> On Wed, Aug 9, 2017 at 3:20 PM, Daniel Wagner <w...@monom.org> wrote:
>>>>> I want to report an issue with connman.  We set BackgroundScanning =
>>>>> false in main.conf.  However, I have found that this also causes connman 
>>>>> to
>>>>> give an erroneous empty response to the Scan() dbus call, potentially
>>>>> permanently disabling the device.
> 
> First of all, I think we need to clarify the differences between
> Background-Scan (Roaming) and Auto-Scan. Background-Scan is a
> parameter used to ask wpa_supplicant to perform background scans when
> we are connected for the purpose of roaming within an ESS, i.e. within
> a single network block with all the APs using the same SSID. You also
> need to have defined CONFIG_BGSCAN_SIMPLE=y in .config before
> compiling wpa_supplicant to enable this. On the other hand, Auto-Scan
> is indeed what is described in the main.conf as "BackgroundScanning"
> property and takes place when we are NOT connected:
> 
> "... Background scanning will start every 5 minutes unless the scan
> list is empty. In that case, a simple backoff mechanism starting from
> 10s up to 5 minutes will run."
> 
> However, "BackgroundScanning" property is used to enable/disable both
> features Background-Scan and Auto-Scan thus it creates confusion:
> 
> 52efb07a99e5 ('wifi: Specify bgscan parameters according to main.conf 
> settings')
> 616abe0abcbe ('wifi: Setup autoscan according to the main.conf settings')
> 
> It is important also to remark that the mentioned backoff mechanism is
> only triggered after a Technology.Scan(). It is not true such
> mechanism is triggered when scan list is empty, if
> "BackgroundScanning" is disabled then the scan list will remain empty
> until you actively perform a Scan(), instead if you enable it the
> backoff mechanism will take place. This could be Jonah's problem.

This is really great info to have.  Thanks!

I am definitely performing a Scan() request, and the active scan request is 
being sent to wpa_supplicant, but the result list is still empty.  See below 
for dbus logs.

> 
>>>>> The key preconditions seem to be:
>>>>> 1) wpa_supplicant reports a max_ssids > 1
> 
> This value is directly reported by your WiFi driver and could be 0 or
> greater than 2 according to what was done in 6af0579c4340
> ('gsupplicant: Return zero for max scan SSID parameter').
> 
>>>>> 3) as above, BackgroundScanning must be set to false
>>>>> This causes the logic of wifi.c:wifi_scan() to fail.  In particular:
>>>>> 1) wifi_scan_simple is not used, due to the above preconditions.
>>>>> 2) connman requests an active scan via wpa_supplicant for the ssids
>>>>> returned by get_latest_connections.
>>>>> 3) connman does not request a followup passive scan, as
>>>>> BackgroundScanning is turned off, which causes start_autoscan() to exit
>>>>> early.
> 
> So far I can follow you.
> 
>>>>> This means that in the scenario above, connman will never see any wifi 
>>>>> networks.  Scan() will always return an empty list, even if other SSIDs 
>>>>> are available.  This is potentially fatal for embedded systems, so in my 
>>>>> view this is a very serious issue.
> 
> I could not reproduce this or at least not what I understood you are
> suffering. From 802.11-2012 std: "Active scanning involves the
> generation of Probe request frames and the subsequent processing of
> received Probe Response frames" and from what I understood it should
> not affect the results of the scanning, you should get the same
> results.
> 

What I see empirically is that with the brcmfmac driver on a bcm 43430 chip, on 
linux 4.1.15, the max_ssids is reported as 10.  I am definitely a novice when 
it comes to anything below wpa_supplicant, but could it be that active scan 
only probes for the specifically-mentioned networks?  From my reading, this 
active scanning mechanism seems to be intended for finding specific SSIDs, e.g. 
hidden SSIDs.  However, empirically in my case, if the MAC can't see the 
requested network, it does not report any scan results at all.

> The question here is: if you perform a D-Bus call for
> Technology.Scan() from your client (Or connmanclt) you do not get any
> service as result or instead what you mean is that when you call
> Manger.GetServices() you do not get any service? Because these two
> things are very different according to what I explained at the
> beginning: If you disable "BackgroundScanning" and you do not actively
> make a Technology.Scan() call, the service list after a while will be
> empty and will remains so until you ask for another scan.

Seemingly both return empty.  Setup here is as follows:
* "BackgroundScanning = false" in main.conf
* Create a SSID ('SenseTest' in this case)
* Associate with network via connman
* Halt device
* Unplug SSID's AP
* Boot device

root:~# connmanctl scan wifi
method call time=1478194644.760560 sender=:1.18 -> destination=net.connman 
serial=2 path=/net/connman/technology/wifi; interface=net.connman.Technology; 
member=Scan
method call time=1478194644.760745 sender=:1.2 -> 
destination=fi.w1.wpa_supplicant1 serial=228 
path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=fi.w1.wpa_supplicant1.Interface; member=Scan
   array [
      dict entry(
         string "Type"
         variant             string "active"
      )
      dict entry(
         string "SSIDs"
         variant             array [
               array of bytes "SenseTest"
            ]
      )
      dict entry(  
         string "Channels"
         variant             array [
               struct {
                  uint32 2437
                  uint32 0
               }   
            ]
      )
   ]
method return time=1478194644.761180 sender=:1.3 -> destination=:1.2 serial=214 
reply_serial=228
signal time=1478194644.800336 sender=:1.3 -> destination=(null destination) 
serial=215 path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "fi.w1.wpa_supplicant1.Interface"
   array [
      dict entry(  
         string "Scanning"
         variant             boolean true
      )
   ]
   array [
   ]
signal time=1478194644.800806 sender=:1.3 -> destination=(null destination) 
serial=216 path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=fi.w1.wpa_supplicant1.Interface; member=PropertiesChanged
   array [
      dict entry(  
         string "Scanning"
         variant             boolean true
      )
   ]
signal time=1478194644.849944 sender=:1.3 -> destination=(null destination) 
serial=217 path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=fi.w1.wpa_supplicant1.Interface; member=ScanDone
   boolean true
method call time=1478194644.850835 sender=:1.2 -> 
destination=fi.w1.wpa_supplicant1 serial=229 
path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "fi.w1.wpa_supplicant1.Interface"
   string "BSSs"   
method return time=1478194644.851439 sender=:1.3 -> destination=:1.2 serial=218 
reply_serial=229
   variant       array [
      ]
signal time=1478194644.851594 sender=:1.3 -> destination=(null destination) 
serial=219 path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "fi.w1.wpa_supplicant1.Interface"
   array [
      dict entry(  
         string "Scanning"
         variant             boolean false
      )
   ]
   array [
   ]
signal time=1478194644.851968 sender=:1.3 -> destination=(null destination) 
serial=220 path=/fi/w1/wpa_supplicant1/Interfaces/10; 
interface=fi.w1.wpa_supplicant1.Interface; member=PropertiesChanged
   array [
      dict entry(  
         string "Scanning"
         variant             boolean false
      )
   ]

Scan completed for wifi

A few things to note on that sequence:

* As expected from the code, there is a SSID returned by 
get_latest_connections(), and max_ssids = 10, thus an active scan is performed.
* The result is empty.
* There is no followup passive scan.
* Additionally, connmanctl reports an empty services list afterwards:
root@:~# connmanctl services

root@:~# 

My 2?: If "Active" scanning will indeed only return results for the SSIDs 
mentioned in the scan parameters, then I think connman should *always* schedule 
a passive scan afterwards, perhaps by just calling wifi_scan_simple() in the 
scan_callback() of an active scan.

Thoughts?

Jonah



------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
connman@lists.01.org
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 22, Issue 10
***************************************

Reply via email to