he issue has been discovered during work on other issue
https://lists.01.org/pipermail/connman/2018-November/023085.html

If connman does ACTIVE scan without adding a list of SSIDs
 interface_scan_params() in gsupplicant/supplicant.c calls 

supplicant_dbus_dict_append_array(&dict, "SSIDs",
DBUS_TYPE_STRING,
append_ssids,
data->scan_params);

which creates an empty entry for "SSIDs" without anything inside.

This dbus msg goes to wpa supplicant to dbus/dbus_new_handles.c  to wpas_dbus_handler_scan() which calls wpas_dbus_get_scan_ssids() because there is an entry "SSIDs".
Unfortunately wpas_dbus_get_scan_ssids() fails with an error.

Here are my logs:

Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes 
Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes 
Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes 
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes 
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes 
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]: wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes

The patch below is very simple. If there is no SSID in scan_parameters do not create "SSIDs". The adjacent function supplicant_add_scan_frequency() does such verification and does not create any empty "Channels".


==============================
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 0cb621b9..92941c63 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -4241,11 +4241,13 @@ static void interface_scan_params(DBusMessageIter *iter, void *user_data)
  supplicant_dbus_dict_append_basic(&dict, "Type",
  DBUS_TYPE_STRING, &type);
 
- supplicant_dbus_dict_append_array(&dict, "SSIDs",
- DBUS_TYPE_STRING,
- append_ssids,
- data->scan_params);
 
+ if (data->scan_params->ssids) {
+ supplicant_dbus_dict_append_array(&dict, "SSIDs",
+ DBUS_TYPE_STRING,
+ append_ssids,
+ data->scan_params);
+ }
  supplicant_add_scan_frequency(&dict, add_scan_frequencies,
  data->scan_params);
  } else

PS. I sent this patch from other unregistered email. I hope there is not going to be any duplicate.