I¹d like to throw out another use case in support of Slava Monich¹s suggestion of upstreaming a D-Bus getter for configured services:
For stationary devices, (like connected home gadgets) there is usually a Setup mode in which the user is able to send network credentials to the device, either by having the device act as an AP, p2p group owner, etc. A decision needs to be made at boot on whether or not to enter this setup mode. Once configured, the device should not fall back into setup mode, even if it loses its connection to the AP or the internet. Otherwise, a connectivity problem could allow an evil neighbor to connect the device to their network. We therefore can¹t make the setup mode decision based on the connection state. The only way to get back into setup mode should be a factory reset or something requiring physical/secure access. Another way would be to search the results of GetServices and look for one with Favorite == true. This almost works, but if your AP is out of range or completely busted when the device reboots, the service won¹t be returned. Some kind of storage-based service getter is needed for these one-time config devices. At least for my scenario, something like this is sufficient: boolean HasStoredService() which I¹m happy to implement, as it¹s better than testing for the presence of internal files in /var/lib/connman. GetKnownServices, as proposed, would also work and have additional utility for the other use cases. Thanks, Adam Statement of Confidentiality The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any. _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman