Scanning with Andorid 10+ integrated WLAN-QR-Scanner
Closed this issue · 5 comments
Hello @TeraTech,
while using your MMM-WiFiPassword I have noticed some scanning issue. Since Android 10 there is an option available to scan a QR-Code for accessing Network right underneath the Network section on for example a Smart Phone (attached Image). I tested scanning with this option on several Android devices, but it didn't worked for me. Using the scanner I can see the QR-Code created by your MMM-WiFiPassword but it wont show up any further reaction. Now I am using a third party app. Some worked just fine others not. Maybe there are some differences in the types of network QR-Codes.
Is there an opportunity you can change the MMM-WiFiPassword so we can use the integrated QR reader on Android? I would appreciate.
If I am right with the idea of different network QR Types maybe you can build a little switch so users can decide which Type do they need.
I don't know if this issue only happens to me, but I thought is still worth to share with you.
I have the same problem. Haven't really found out until now what the problem is. I tried other QR Wifi implementations (not on MM²) and they work just fine. F.e. qifi. The actual text send by the code seems to be just fine.
I suspect something with either the js lib used for this or maybe some color problem?
Will try to investigate more if I find the time.
After some testing I would definitely pin this on the "inverted" colors.
Also see reason nr. one on this site:
https://www.qrcode-monkey.com/6-reasons-why-your-qr-code-is-not-working
So would need to make it work with "normal" colors
Trying to hack colorDark
and colorLight
to use the opposite colors does not work either:
colorDark: "#fff",
colorLight: "#000",
Probably because of reason nr. 6 - no border space:
https://www.qrcode-monkey.com/6-reasons-why-your-qr-code-is-not-working
Fun fact btw: I am getting this error also on a one plus phone. Tried to replicate it with an huawei running android10 , but that does not seem to have this option (yet?).
At this point I would think about maybe switching to some other js library. The testings above where done with
https://github.com/kazuhikoarase/qrcode-generator/tree/master/js
explicitly the createSvgTag
function. It does not seem to have a nice feature to actually determine the width and height per pixel but it seems to do the job :)
Sorry for spamming, one last update from my side :)
I created a PR #6 for this. We actually don't need to switch to another library. Fixing this issue is done in two steps:
- don't use inverted colors as per default config
- add a padding to the QR image, so that scanners can pick it up easily