-o5 = s:option(Flag, "trm_debug", translate("Enable verbose debug logging"))
-o5.default = o5.disabled
-o5.rmempty = false
+if fs.access("/usr/bin/qrencode") then
+ btn1 = s:option(Button, "btn1", translate("View AP QR-Codes"),
+ translate("Connect your Android or iOS devices to your router's WiFi using the shown QR code."))
+ btn1.inputtitle = translate("QR-Codes")
+ btn1.inputstyle = "apply"
+ btn1.disabled = false
+
+ function btn1.write()
+ luci.http.redirect(luci.dispatcher.build_url("admin", "services", "travelmate", "apqr"))
+ end
+end
+
+btn2 = s:option(Button, "btn2", translate("Manual Rescan"),
+ translate("Force a manual uplink rescan / reconnect in 'trigger' mode."))
+btn2:depends("trm_automatic", "")
+btn2.inputtitle = translate("Rescan")
+btn2.inputstyle = "find"
+btn2.disabled = false
+
+function btn2.write()
+ luci.sys.call("env -i /etc/init.d/travelmate start >/dev/null 2>&1")
+ luci.http.redirect(luci.dispatcher.build_url("admin", "services", "travelmate"))
+end