<div dir="ltr">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....<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op zo 1 dec. 2019 om 21:06 schreef Anton Thomasson <<a href="mailto:antonthomasson@gmail.com">antonthomasson@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Slava,</div><div><br></div><div>Thanks, that was really helpful.</div><div>I have it working in a DBusInterface now, that should do well enough for my intents :)</div><div><br></div><div>Br,</div><div>Anton<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den sön 1 dec. 2019 kl 18:58 skrev Slava Monich <<a href="mailto:slava.monich@jolla.com" target="_blank">slava.monich@jolla.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Anton,<br>
<br>
I would say the easiest way is to find a connman service which matches <br>
the following criteria:<br>
<br>
1. "Type" property value is "wifi"<br>
2. "State" property value is "online" or "ready"<br>
<br>
Then the value of its "Name" property would be SSID of the AP you're <br>
connected to, converted to text assuming UTF-8 encoding.<br>
<br>
Note that if SSID is not a valid UTF-8, then connman still transforms it <br>
into something printable but you won't be able to reconstruct the actual <br>
SSID out of it. In your case it probably doesn't matter that much.<br>
<br>
This command gives you an idea what to expect from connman:<br>
<br>
dbus-send --system --print-reply --type=method_call --dest=net.connman / <br>
net.connman.Manager.GetServices<br>
<br>
libconnman-qt (<a href="https://git.sailfishos.org/mer-core/libconnman-qt" rel="noreferrer" target="_blank">https://git.sailfishos.org/mer-core/libconnman-qt</a>) might <br>
simplify things a bit, but keep in mind that it's not allowed in harbour <br>
and isn't particularly backward compatible (i.e. if you end up using it, <br>
you better compile in the required pieces of it statically).<br>
<br>
Cheers,<br>
-Slava<br>
<br>
<br>
> Hi list,<br>
> <br>
> How would i go about getting the current SSID in an app?<br>
> Is there even a "proper way"?<br>
> <br>
> The reason i'm asking is that i'm working on (IPP) printer support as <br>
> promised, and i'd like to "scope" saved printers with the SSID of the <br>
> network that they reside on.<br>
> No reason to look for things that aren't there and possibly leak some <br>
> information in the process, right?<br>
> <br>
> Br,<br>
> Anton "attah"<br>
> <br>
> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
> To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
> <br>
</blockquote></div>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></blockquote></div>