CodeReader: Cannot use WIFI-Code (not supported)

I think the clipboard solution is a good trade-off for now.

I scanned this code from the computer screen for testing, using Code Reader on Xperia 10 / SFOS 4.5.0.19, and content is displayed in the line below, but cut right. Tap on the decoded string opens a screen where it is displayed in full length. I can select and copy it and paste it into a note. Then I could setup the WIFI manually in theory…

Hmmm the string starts with wifi:.
It should be possible to register a protocol handler for it in a .desktop file.

This could then open the Settings app (or that wifi selection popup) where one can add a wifi connection manually.

Sounds doable.

1 Like

I can confirm that a desktop file with x-scheme-handler/wifi does pick up the not-quite uri when launched from CodeReader. I also found a thing or three about how the network settings avoid dbus when launching the settings app. Maybe swing by IRC and we can sync efforts?

2 Likes

Halfway there…
this is after clicking ‘Open URL’:

7 Likes

Congrats @nephros !
How did you come to the option ‘Add WIFI Network’?
I could only see the page like yours but without the options to add WIFI.

He’s hacking the QML :slight_smile: Yeah!

I was just looking at the openconnect-import.desktop (and vpn import) desktop files and wondered about whether there is wifi import method like: X-Maemo-Method=com.jolla.settings.ui.importVpn I don’t think so?

I also wondered about GitHub - sailfishos/connectionagent which has a qml declarative interface(s) but it’s marked tba in the docs. I haven’t tried:

[root@VollaPhone harbour-barcode]# /usr/lib64/qt5/bin/qdbus --system fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1/Interfaces/53 | grep AddNetwork
method QDBusObjectPath fi.w1.wpa_supplicant1.Interface.AddNetwork(QVariantMap args)

Why am I doing this again? I have never used a QR Wifi tag in my life and don’t plan to.

Anyway, it is doable, and done. Many thanks to @attah and @poetaster for the brainstorming session on IRC.

PoC. Very hacky, definitely full of bugs and I haven’t actually tested pushing OK in the dialog or using the Wifi afterwards - but here we go: Releases · nephros/wifi-qr-handler · GitHub

After installing you have to activate the new Patch in Patchmanager, restart Settings and Lipstick.

4 Likes

Yeah, there’s a lot of DBus stuff around, but as usual overengineered and painful to use. (see e.g.: the connman DBus API).

And I think having a GUI is a requirement, so why not use Jolla’s :slight_smile:

Absolutely! I’ve been working on fixing a notifications dbus bug (in tooter) which is why I went down the rabbit hole. Thanks for all the effort!

That’s very kind of you to work on that, thank you very much.

Maybe a very simple question for you, but so far I didn’t work with Patchmanager.
Now I’ve installed Patchmanager for Sailfish via Chum.
How can I process to test your patch, what are the steps more in detail?

You open PM, and if you never had a patch installed before, there should appear only a single patch in the list in PM’s main window.

Activate that by either tapping on the glowy thing on the left, or by long-pressing its name. If it indicates success, use the Pulley Menu to “restart preloaded services”.

(This is assuming you have already installed the RPM package from my link above. If not, download and install that, and restart Lipstick via Sailfish Utilities.)

3 Likes

Just tested (manual patch apply). Works like a charm. Now to shoe horn it into the camera app :slight_smile:

1 Like

Looking at the camera app, not so straight, but lead me to read: GitHub - sailfishos/qr-filter-qml-plugin

Well most of the work is done, but we can’t make a PR against the jolla camera source.

Looks pretty nifty @nephros. Thank you.
Maybe @jovirkku and @flypig can point this out to the right Jolla devs?

1 Like

I’ll make a Community Meeting topic about it.

3 Likes

Hi nephros, “works like charm”, have no better words for it.

In this context, I would like to remember the → The big Thank You & Coffee thread.
How can I spend you a coffee, nephros?

Regards

1 Like

Thanks, and glad you like what I did.

But I find more rewarding things that help keeping SFOS and Free Software afloat.
So, donate to e.g. OpenRepos, one of the organizations like FSF(e), EFF, noyb, Mozilla (!) if you please.

And of course, help the success of SFOS. Submit Bugs, find solutions, learn to hack things and make some apps, join the SailMates, stop asking about BT support in AD or when the next update comes out, the possibilities are all but endless …

4 Likes