1
0

travelmate.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. -- Licensed to the public under the Apache License 2.0.
  2. m = Map("travelmate", translate("Travelmate"),
  3. translate("Configuration of the Travelmate package to enable travel router functionality. ") .. [[</p>]] ..
  4. translate("Brief advice: Create a wwan interface, configure it to use dhcp and " ..
  5. "add it to the wan zone in firewall. Create the wifi interfaces to be used ('client' mode, " ..
  6. "assigned to wwan network, left as disabled). Travelmate will try " ..
  7. "to connect to the known wifi client interfaces in the defined order. ") ..
  8. [[<a href="https://github.com/openwrt/packages/tree/master/net/travelmate/files/README.md" target="_blank">]]
  9. .. translate("Link to detailed advice")
  10. .. [[</a>]] )
  11. -- General options
  12. s = m:section(NamedSection, "global", "travelmate", translate("Global options"))
  13. o = s:option(Flag, "trm_enabled", translate("Enable Travelmate"))
  14. o.rmempty = false
  15. o.default = 0
  16. o = s:option(Value, "trm_maxwait", translate("Max. timeout in seconds for wlan interface reload"),
  17. translate("Default 20, range 10-60"))
  18. o.rmempty = false
  19. o.default = 20
  20. o.datatype = "range(10,60)"
  21. o = s:option(Value, "trm_maxretry", translate("Max. number of connection retries to an uplink"),
  22. translate("Default 3, range 1-10"))
  23. o.rmempty = false
  24. o.default = 3
  25. o.datatype = "range(1,10)"
  26. -- Extra options
  27. e = m:section(NamedSection, "global", "travelmate", translate("Extra options"))
  28. a = e:option(Flag, "trm_debug", translate("Debug logging"))
  29. a.rmempty = true
  30. a.default = a.disabled
  31. a = e:option(Value, "trm_iface", translate("Restrict reload trigger to certain interface(s)"),
  32. translate("Space separated list of wwan interfaces that trigger reload action. To disable reload trigger set it to 'false'. Default: empty"))
  33. a.rmempty = true
  34. a.default = ""
  35. a.datatype = "uciname"
  36. a = e:option(Flag, "trm_iw", translate("Use iw for scanning"),
  37. translate("Disable this if you want to use iwinfo instead of iw"))
  38. a.rmempty = true
  39. a.default = a.enabled
  40. return m