API Issue Im Having

35 views
Skip to first unread message

Dennis Penn

unread,
Jun 30, 2020, 6:28:43 PM6/30/20
to Meshtastic-Alpha-Testers
Python is not my native language. I was born into Basic  Assemble Language and machine code. That said, here is the issue I am getting:
OS is Linux Mint
Python 3.6ish using IDLE

Meshtastic on Heltec Wireless Stick and TTGO OLED.

Traceback (most recent call last):
  File "/home/dennis/.local/lib/python3.6/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dennis/Desktop/gob.py", line 3, in <module>
    interface=meshtastic.StreamInterface()
  File "/home/dennis/.local/lib/python3.6/site-packages/meshtastic/__init__.py", line 365, in __init__
    devPath, 921600, exclusive=True, timeout=0.5)
  File "/home/dennis/.local/lib/python3.6/site-packages/serial/serialutil.py", line 240, in __init__
    self.open()
  File "/home/dennis/.local/lib/python3.6/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'



Yes...I installed PYSERIAL and uninstalled Serial.

The program is Three Line starting with Import Meshtastic. It just beacon HELLO every 60 sec for the purpose of seeing how far I can get using Meshtastic.

Note: I have written many Arduino Apps with LoRa and Ive gotton DX of 10 mile LOS.









Wesley Ferrell

unread,
Jun 30, 2020, 9:49:52 PM6/30/20
to Meshtastic-Alpha-Testers
Try "sudo python /home/dennis/Desktop/gob.py"

Jeremy Allison

unread,
Jun 30, 2020, 10:17:26 PM6/30/20
to Wesley Ferrell, Meshtastic-Alpha-Testers
If you need to not run as root you can also add the user to the dialout group:

sudo adduser <username> dialout

On Tue, Jun 30, 2020, 7:49 PM Wesley Ferrell <ferr...@gmail.com> wrote:
Try "sudo python /home/dennis/Desktop/gob.py"

--
You received this message because you are subscribed to the Google Groups "Meshtastic-Alpha-Testers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meshtastic-alpha-t...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meshtastic-alpha-testers/9e3326e0-36be-4071-98aa-0646dc86ee14o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages