diff --git a/meshtastic/tunnel.py b/meshtastic/tunnel.py index 89b4f65..b08f55c 100644 --- a/meshtastic/tunnel.py +++ b/meshtastic/tunnel.py @@ -5,8 +5,9 @@ # sudo ip tuntap del mode tun tun0 # sudo bin/run.sh --port /dev/ttyUSB0 --setch-shortfast # sudo bin/run.sh --port /dev/ttyUSB0 --tunnel --debug +# ssh -Y root@192.168.10.151 (or dietpi), default password p -# FIXME: set MTU correctly +# FIXME: use a more optimal MTU from . import portnums_pb2 from pubsub import pub @@ -82,8 +83,8 @@ class Tunnel: logging.info(f"Node { nodeId } has IP address { ip }") logging.debug("creating TUN device") + # FIXME - figure out real max MTU, it should be 240 - the overhead bytes for SubPacket and Data self.tun = TapDevice(name="mesh", mtu=200) - # tun.create() self.tun.up() self.tun.ifconfig(address=myAddr,netmask=netmask) logging.debug(f"starting TUN reader, our IP address is {myAddr}") diff --git a/setup.py b/setup.py index 4521f8b..b832b85 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup( include_package_data=True, install_requires=["pyserial>=3.4", "protobuf>=3.13.0", "pypubsub>=4.0.3", "dotmap>=1.3.14", "pexpect>=4.6.0", "pyqrcode>=1.2.1", - "pygatt>=4.0.5"], + "pygatt>=4.0.5", "pytap2>=2.0.0"], python_requires='>=3.6', entry_points={ "console_scripts": [