Location Area Code via AAF

I don’t know the offical way, but, if you hover the LAC/TAC variable on the webinterface it tells you something like this “lwm2m.10250.0.774”. The final item is the index. So you should be able to get it like the following:

assert(device.init())
print(device.get("aleos.774"))

Else sometimes I find it useful to see all the mapped variables directly, but, other that a couple items, most of the dump is documented on the link you gave.

local function print_dev_tree(path)
    local res, t = device.get(path)
    if res ~= nil then
    	print(path .. ": " .. tostring(res))
	elseif res == nil and t == nil then
		print(path .. ": nil")
    else
		for k,v in pairs(t) do
	    	print_dev_tree(v)
		end
	end
end

    -- Dump the entire device tree
    print_dev_tree("")
1 Like