python: meshtastic --tunnel -> Read TUN in a Thread failure
Hi,
I’m trying to setip the tunnel for test purposes. I got an error about ifconfig.
I did the test on a VM Debian 10 and on a VM Ubuntu.
Followed the steps from pages:
- https://github.com/meshtastic/Meshtastic-python
- https://meshtastic.discourse.group/t/ip-over-meshtastic-kinda-implemented/1775/5
After a french install of ubuntu here are the command I used as root:
$apt install python3-pip
$pip3 install --upgrade pytap2
$pip3 install --upgrade meshtastic
$ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Sep 4 03:00 /dev/ttyUSB0
$meshtastic -h
(I get in return all help text)
$meshtastic --tunnel
Connected to radio
INFO:root:Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:
INFO:root:Node !f244c500 has IP address 10.115.197.0
INFO:root:Node !f244c480 has IP address 10.115.196.128
sh: 1: ifconfig: not found
Aborting due to:
After putting in debug I can identify the issue at line https://github.com/meshtastic/Meshtastic-python/blob/8380e57fa060b4cd5a46cfce7ec4fcc99019c3ed/meshtastic/tunnel.py#L102
If I do a small test.py
File
from pytap2 import TapDevice
tun = TapDevice(name="mesh")
tun.up()
tun.ifconfig(address="192.168.4.2", netmask="255.255.255.0", mtu=200)
Test
root@abeilleDev:~# python3 test.py
sh: 1: ifconfig: not found
Traceback (most recent call last):
File "test.py", line 3, in <module>
tun.up()
File "/usr/local/lib/python3.7/dist-packages/pytap2/__init__.py", line 213, in up
raise IfconfigError()
pytap2.IfconfigError
Identical error message.
Looks like there is an issue with the lib.
I just tested with Debian on a RPI3. Same issue.
Can’t any related discussion in the forum.
Any clue from anybody ?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (3 by maintainers)
I just tested between: RPI3 - USB - TBeam - Lora - TBeam - USB - VM Debian
Pings work in both directions.
Thanks a lot.
@geeksville please inject the PR in the Trunk.
I’m closing the issue.
@jdstroy
#106;, fixed the issue for me, thank you
Take a look at #106; see if that works for you.