diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/neighbours.d/wifi b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/neighbours.d/wifi
index bbe5fc966ac20bb16a2d9a90c319b3ed8dd2f306..1be59f8b13621a28076d9c9f4e6aed7634185bf5 100644
--- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/neighbours.d/wifi
+++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/neighbours.d/wifi
@@ -1,3 +1,4 @@
+local batman_adv = require 'gluon.batman_adv'
 local iwinfo = require 'iwinfo'
 
 function neighbours(iface)
@@ -16,8 +17,7 @@ end
 
 function interfaces()
   local interfaces = {}
-  local popen = io.popen('exec batctl if')
-  for ifname in popen:read('*a'):gmatch('([^%s]+): active') do
+  for ifname in batman_adv.interfaces('bat0') do
     pcall(function()
       local address = util.readline(io.open('/sys/class/net/' .. ifname .. '/address'))
       local wifitype = iwinfo.type(ifname)
@@ -26,7 +26,6 @@ function interfaces()
       end
     end)
   end
-  popen:close()
 
   return interfaces
 end
diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh/bat0/interfaces b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh/bat0/interfaces
index b1d30efe876e692549daf6371e99e50b2e5d4d1e..6f63af2fd7c88e0000f00ec64ba53161ed5eec79 100644
--- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh/bat0/interfaces
+++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh/bat0/interfaces
@@ -1,3 +1,5 @@
+local batman_adv = require 'gluon.batman_adv'
+
 local wireless = {}
 local tunnel = {}
 local other = {}
@@ -36,8 +38,7 @@ local function nil_table(t)
   end
 end
 
-local popen = io.popen('exec batctl if')
-for ifname in popen:read('*a'):gmatch('([^%s]+): active') do
+for ifname in batman_adv.interfaces('bat0') do
   if is_wireless(ifname) then
     get_address(wireless, ifname)
   elseif is_tuntap(ifname) then
@@ -46,7 +47,6 @@ for ifname in popen:read('*a'):gmatch('([^%s]+): active') do
     get_address(other, ifname)
   end
 end
-popen:close()
 
 return {
   wireless = nil_table(wireless),
diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh_interfaces b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh_interfaces
index c69ca4ef998518e0882d2a4769252e91607f70da..0d66d603a10407a814d078f877e6ac62546bae50 100644
--- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh_interfaces
+++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/nodeinfo.d/network/mesh_interfaces
@@ -1,13 +1,13 @@
+local batman_adv = require 'gluon.batman_adv'
+
 local interfaces = {}
 
-local popen = io.popen('exec batctl if')
-for ifname in popen:read('*a'):gmatch('([^%s]+): active') do
+for ifname in batman_adv.interfaces('bat0') do
   pcall(
     function()
       table.insert(interfaces, util.readline(io.open('/sys/class/net/' .. ifname .. '/address')))
     end
   )
 end
-popen:close()
 
 return interfaces
diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/statistics.d/gateway b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/statistics.d/gateway
index 67623b0c4670bad16ab7f883472b41b07f37bdac..b1909cf6ba9a6c36035b5a923b55973be0dfdd2b 100644
--- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/statistics.d/gateway
+++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/announce/statistics.d/gateway
@@ -1,13 +1,11 @@
 local gateway = ''
 
-local popen = io.popen("exec batctl -m bat0 gateways")
-for line in popen:lines() do
+for line in io.lines('/sys/kernel/debug/batman_adv/bat0/gateways') do
   if line:sub(1, 3) == '=> ' then
     gateway = line:sub(4, 20)
     break
   end
 end
-popen:close()
 
 if gateway ~= '' then
   return gateway
diff --git a/package/gluon-mesh-batman-adv-core/files/usr/lib/lua/gluon/batman_adv.lua b/package/gluon-mesh-batman-adv-core/files/usr/lib/lua/gluon/batman_adv.lua
new file mode 100644
index 0000000000000000000000000000000000000000..cd559fe5214af2aa49f231860828c642c0446edf
--- /dev/null
+++ b/package/gluon-mesh-batman-adv-core/files/usr/lib/lua/gluon/batman_adv.lua
@@ -0,0 +1,15 @@
+local nixio = require 'nixio'
+
+module 'gluon.batman_adv'
+
+function interfaces(bat_if)
+    local iter = nixio.fs.glob('/sys/class/net/' .. bat_if .. '/lower_*')
+    return function()
+            local path = iter()
+            if path == nil then
+                return nil
+            end
+            local ifname = path:match('/lower_([^/]+)$')
+            return ifname
+        end
+end