QrAndBarcodeScanner icon indicating copy to clipboard operation
QrAndBarcodeScanner copied to clipboard

[bug] Connecting to WiFi from QR code doesn't work

Open kyoforkshomebrews opened this issue 2 years ago • 3 comments

kyoforkshomebrews avatar Aug 22 '21 22:08 kyoforkshomebrews

It works, but it's strict.

This code (generated by my Nintendo Switch) works. WIFI:S:switch_9D04ED0100D;T:WPA;P:h79mcfxn;; 1636913009090

This code (generated by my Dad's Samsung S8+ on Android 9 in the WiFi menu) does not work because of the "Start of Heading" character at the end. WIFI:T:WPA;S:NETGEAR56-5G;P:perfectcello320;H:false; 1636913484582

RunningDroid avatar Nov 14 '21 18:11 RunningDroid

No way to fix this ? The WiFi connect feature works rarely for me too

ld892012 avatar Feb 27 '23 14:02 ld892012

This code (generated by my Dad's Samsung S8+ on Android 9 in the WiFi menu) does not work because of the "Start of Heading" character at the end.

Your issue seems to be different to what I meant, though i should've added that in the description. In this case the regex at https://github.com/wewewe718/QrAndBarcodeScanner/blob/a35d93047bdfe86e66a463d6689550865d60da7b/app/src/main/java/com/example/barcodescanner/model/schema/Wifi.kt is probably at fault. A quick fix would be "^WIFI:((?:.+?:(?:[^\\;]|\\.)*;)+);?�*$" which includes to match that specific heading character.

My issue however was that my WiFi QR codes are correctly parsed by the app but I can't connect to it. When I press "establish connection" it tells me "Connecting..." and then nothing happens. The ap is not added to wifi settings.

kyoforkshomebrews avatar Feb 28 '23 14:02 kyoforkshomebrews