From 271489714d0d8e01e8a78c14889f76278632387d Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 15 Dec 2020 17:41:35 +0800 Subject: [PATCH] early notes/experiments for #35 --- extra/meshtastic_tun.rules | 4 ++++ extra/tuntest.py | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 extra/meshtastic_tun.rules create mode 100644 extra/tuntest.py diff --git a/extra/meshtastic_tun.rules b/extra/meshtastic_tun.rules new file mode 100644 index 0000000..44e5da5 --- /dev/null +++ b/extra/meshtastic_tun.rules @@ -0,0 +1,4 @@ +# for userspace access to the TUN network interface by meshtastic. Add your user to the netdev group. +# gives access via /dev/net/tun permissions +# install via sudo cp meshtastic_tun.rules /etc/udev/rules.d/ +KERNEL=="tun", GROUP="netdev", MODE="0660", OPTIONS+="static_node=net/tun" diff --git a/extra/tuntest.py b/extra/tuntest.py new file mode 100644 index 0000000..dffc14d --- /dev/null +++ b/extra/tuntest.py @@ -0,0 +1,6 @@ +# delete me eventually + +from tuntap import TunTap + +tun = TunTap(nic_type="Tun",nic_name="tun0") +tun.config(ip="10.115.1.2",mask="255.255.0.0") \ No newline at end of file