add pytap2 dependency

This commit is contained in:
Kevin Hester
2020-12-23 22:39:53 +08:00
parent b28749568a
commit 2cc10abcc3
2 changed files with 4 additions and 3 deletions

View File

@@ -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}")

View File

@@ -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": [