Open5

Wi-Fi QRコード仕様のメモ

okuokuokuoku

どこ探しても公式仕様が見あたらなかった。。

WPA3の仕様に "Wi-Fi URI" の項があり、そこにABNFが載っている。

https://www.wi-fi.org/file/wpa3-specification

WIFI-qr =WIFI:” [type;”] [trdisable “;”] ssid “;” [hidden “;”] [id “;”] [password “;”] [public-key “;”] “;”
type =T:” *(unreserved) ; security type
trdisable =R:” *(HEXDIG) ; Transition Disable value
ssid =S:” *(printable / pct-encoded) ; SSID of the network
hidden =H:true; when present, indicates a hidden (stealth) SSID is used
id =I:” *(printable / pct-encoded) ; UTF-8 encoded password identifier, present if the password has an SAE password identifier
password =P:” *(printable / pct-encoded) ; password, present for password-based authentication
public-key =K:” *PKCHAR ; DER of ASN.1 SubjectPublicKeyInfo in compressed form and encoded in “base64” as per [6], present when the network supports SAE-PK, else absent
printable = %x20-3a / %x3c-7e ; semi-colon excluded
PKCHAR = ALPHA / DIGIT / %x2b / %x2f / %x3d

[6] IETF RFC 4648, The Base16, Base32 and Base64 Data Encodings, https://tools.ietf.org/html/rfc4648`

以前の内容

iOS 11以降のカメラアプリは WIFI: を読むとされていて、各フィールドの意味はzxingのWikiにある。

We propose a syntax like "MECARD" for specifying wi-fi configuration. Scanning such a code would, after prompting the user, configure the device's Wi-Fi accordingly. Example:

WIFI:T:WPA;S:mynetwork;P:mypass;;

Appleの動画の例とよく似ている。

このQRコードの画像はAndroidで生成できるので、できるようになったタイミングのドキュメントを探せば良いんだろうか。。

okuokuokuoku

雑多

アララ https://www.arara.com/ のQRコードリーダーはいつのまにか"公式"を名乗らなくなっていた。 まぁ全然公式でないもんな。。デンソーウェーブとの共同開発ではある。

https://www.denso-wave.com/ja/system/qr/info/detail__9847.html

https://www.denso-wave.com/ja/adcd/info/detail__14521.html

zxingは長いことメンテナンスモードだが積極的にpush自体はされているようだ。ネイティブコード移植はいくつかあったが結局 https://github.com/nu-book/zxing-cpp が生き残った。

okuokuokuoku

Win11 でもWi-Fi QRコードがサポートされた

https://blogs.windows.com/windows-insider/2023/10/18/announcing-windows-11-insider-preview-build-25977-canary-channel/

In Settings, when looking at your Wi-Fi password under the Wi-Fi properties, we now show a QR code so you can more easily share it with others. We also show a QR code when you set up a mobile hotspot to share your network connection.

こちらは表示のサポート('23年)

https://blogs.windows.com/windows-insider/2024/02/08/announcing-windows-11-insider-preview-build-26052-canary-and-dev-channels/

You can now use the Camera app to join a Wi-Fi network. Just scan a QR code with Wi-Fi details and a link will be provided that will open Settings to quickly get the new Wi-Fi profile added and connected. As a reminder, starting with Build 25977 in the Canary Channel you can create your own QR code for Wi-Fi and share it with others. This also works for mobile hotspots too.

こちらがカメラアプリでの読み取りのサポート。

... というか今までサポートされてなかったのか。

okuokuokuoku

1Password

1PasswordではWi-Fiルーターのエントリに "wireless security" と "wireless password" のエントリがあると、この仕様のQRコードを自動的に表示するようになった。 ...いやパスワードなんだからリクエストに応じてrevealじゃないとダメだろ。。例えばAndroidの標準UIでは生体認証かPINを必須としている。