[SailfishDevel] Get current SSID?

Anton Thomasson antonthomasson at gmail.com
Sun Dec 1 20:51:30 UTC 2019


Indeed IPP does do discovery, which more precisely means it suggests
DNS-SD/Bonjour but mandates it only for "IPP Evereywhere".
This leave some usable printers, as well as default-configured CUPS
installations, non-discoverable from what i have found.
This lead me to wanting to save said printers by SSID.

Do let me know if i missed something.

Br,
Anton

Den sön 1 dec. 2019 kl 21:35 skrev E.S. Rosenberg <
es.rosenberg+sailfishos.org at gmail.com>:

> Doesn't IPP do discovery of some kind? As far as I understand my laptop
> rediscovers CUPS printers every time they come online on a network....
>
> Op zo 1 dec. 2019 om 21:06 schreef Anton Thomasson <
> antonthomasson at gmail.com>:
>
>> Hi Slava,
>>
>> Thanks, that was really helpful.
>> I have it working in a DBusInterface now, that should do well enough for
>> my intents :)
>>
>> Br,
>> Anton
>>
>> Den sön 1 dec. 2019 kl 18:58 skrev Slava Monich <slava.monich at jolla.com>:
>>
>>> Hi Anton,
>>>
>>> I would say the easiest way is to find a connman service which matches
>>> the following criteria:
>>>
>>> 1. "Type" property value is "wifi"
>>> 2. "State" property value is "online" or "ready"
>>>
>>> Then the value of its "Name" property would be SSID of the AP you're
>>> connected to, converted to text assuming UTF-8 encoding.
>>>
>>> Note that if SSID is not a valid UTF-8, then connman still transforms it
>>> into something printable but you won't be able to reconstruct the actual
>>> SSID out of it. In your case it probably doesn't matter that much.
>>>
>>> This command gives you an idea what to expect from connman:
>>>
>>> dbus-send --system --print-reply --type=method_call --dest=net.connman /
>>> net.connman.Manager.GetServices
>>>
>>> libconnman-qt (https://git.sailfishos.org/mer-core/libconnman-qt) might
>>> simplify things a bit, but keep in mind that it's not allowed in harbour
>>> and isn't particularly backward compatible (i.e. if you end up using it,
>>> you better compile in the required pieces of it statically).
>>>
>>> Cheers,
>>> -Slava
>>>
>>>
>>> > Hi list,
>>> >
>>> > How would i go about getting the current SSID in an app?
>>> > Is there even a "proper way"?
>>> >
>>> > The reason i'm asking is that i'm working on (IPP) printer support as
>>> > promised, and i'd like to "scope" saved printers with the SSID of the
>>> > network that they reside on.
>>> > No reason to look for things that aren't there and possibly leak some
>>> > information in the process, right?
>>> >
>>> > Br,
>>> > Anton "attah"
>>> >
>>> > _______________________________________________
>>> > SailfishOS.org Devel mailing list
>>> > To unsubscribe, please send a mail to
>>> devel-unsubscribe at lists.sailfishos.org
>>> >
>>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscribe at lists.sailfishos.org
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191201/c63924bc/attachment-0001.html>


More information about the Devel mailing list