dragino / dragino2

dragino2 - MS14 and HE source code -- IoT / Mesh / VoIP version

Home Page:http://www.dragino.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RF Gateway error

tpimh opened this issue · comments

When I go to "RF Gateway" tab in web interface, I get this:

/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute cbi dispatcher target for entry '/admin/sensor/rfgateway'.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:75: Model 'admin_sensor/rfgateway' not found!
stack traceback:
    [C]: in function 'assert'
    /usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
    /usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

I have the same issue. The file rfgateway.lua is missing in directory /usr/lib/lua/luci/model/cbi/admin_sensor.
The file should have following content:

--[[
LuCI - Lua Configuration Interface

Copyright 2008 Steven Barth steven@midlink.org
Copyright 2008 Jo-Philipp Wich xm@leipzig.freifunk.net

Copyright 2013 Edwin Chen edwin@dragino.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

$Id: rfgateway.lua 5948 2010-03-27 14:54:06Z jow $
]]--

local uci = luci.model.uci.cursor()

m = Map("rfgateway", translate("RF Radio Gateway settings"), translate("Radio Se

s = m:section(NamedSection, "rfgateway", "rfgateway", translate("RF Radio Gatewa
local fre= s:option(ListValue, "frequency", translate("RF Frequency"))
fre:value("0","315Mhz")
fre:value("1","433Mhz")
fre:value("2","868Mhz")
fre:value("3","915Mhz")

local rf_module= s:option(ListValue, "module", translate("RF Module Type"))
rf_module.default="2"
rf_module:value("1","RFM12B")
rf_module:value("2","RFM69CW")

local rf_baud= s:option(Value, "speed", translate("RF Baud Rate"), translate("(1
rf_baud.datatype = "range(1,65535)"

local groupid= s:option(Value, "groupid", translate("Network Group ID"), transla
groupid.datatype = "range(1,255)"

local nodeid= s:option(Value, "nodeid", translate("Gateway ID"), translate("ID:
nodeid.datatype = "range(1,255)"

return m

commented

overlook the previous message from @tpimh , add back the rfgateway files now.