WireGuard QR issue OpenWrt 24.10.5

in Luci when I click Generate configuration doesn't show anything I recall used to show a QR code to setup the WireGuard on a mobile phone.

root@OpenWrt:~# opkg list | grep qr
libqrencode - 4.1.1-r1
luci-lib-uqr - 26.021.66732~4b823e3
qrencode - 4.1.1-r1

Maybe some one had similar issue or can help me to debug this problem, thank you

Does it bring up a box with a missing QR code image, or does the button do nothing at all?

Does the peer definition in this specific instance include the private key? This is required for the QR code to be generated. If it only has a public key, it can't send the proper configuration via the QR code method.

config interface 'wg'
	option proto 'wireguard'
	option private_key 'REDACTED'
	list addresses '10.0.0.1/24'
	option delegate '0'
	option listen_port '51820'

config wireguard_wg
	option description 'remote'
	option public_key 'REDACTED'
	option private_key 'REDACTED'
	option preshared_key 'REDACTED'
	list allowed_ips '10.0.0.2/32'
	option route_allowed_ips '1'
	option endpoint_host 'REDACTED'
	option endpoint_port '51820'

That looks fine.

Please try removing and reinstalling qrencode.

opkg update
opkg remove qrencode
opkg install qrencode

I found the problem, I did not have any WAN IP so can not generate the config, until I add some ip in WAN can generate the logic

You shouldn't need a wan IP (I have a setup with only a lan connection to my network), but you do need an endpoint host in that scenario.

It is not necessary to install qrencode.

Why do you believe that you don't need to install qrencode? If it's not installed, you can't encode data into a QR code.

The QR code is generated by the luci-lib-uqr package. Commit accordingly. I don't have the qrencode package installed and I can still generate QR codes in luci-proto-wireguard.

1 Like

I didn’t realize this had happened. I’ve been installing qrencode since before this commit, and it has just been part of my recipe.

Thanks for pointing that out!

1 Like