Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializing pymodi gives SerialException #449

Closed
m-spitfire opened this issue Nov 10, 2022 · 1 comment
Closed

Initializing pymodi gives SerialException #449

m-spitfire opened this issue Nov 10, 2022 · 1 comment

Comments

@m-spitfire
Copy link

m-spitfire commented Nov 10, 2022

Issue Description

Connect to the network module via serial(usb) through my linux machine, however it gives me SerielException error. I think it's due that I use linux machine, because it works just fine in the Windows OS.

What I Did

Use linux, and connect to modi network module through usb.

school/coe202/playground  13svenv ❯ python -m modi --debug
Running PyMODI (v1.2.0)
>>> bundle = modi.MODI()
Traceback (most recent call last):
  File "/home/muradb/.pyenv/versions/3.8.14/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/muradb/.pyenv/versions/3.8.14/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/muradb/school/coe202/playground/venv/lib/python3.8/site-packages/modi/__main__.py", line 183, in <module>
    bundle = Debugger()
  File "/home/muradb/school/coe202/playground/venv/lib/python3.8/site-packages/modi/util/debugging_util.py", line 30, in __init__
    super().__init__(verbose=True, *args, **kwargs)
  File "/home/muradb/school/coe202/playground/venv/lib/python3.8/site-packages/modi/modi.py", line 51, in __init__
    self._exe_thrd = ExeThrd(
  File "/home/muradb/school/coe202/playground/venv/lib/python3.8/site-packages/modi/_exe_thrd.py", line 13, in __init__
    conn_task.open_conn()
  File "/home/muradb/school/coe202/playground/venv/lib/python3.8/site-packages/modi/task/ser_task.py", line 49, in open_conn
    raise SerialException("No MODI port is available now")
serial.serialutil.SerialException: No MODI port is available now

Further information:

school/coe202/playground venv ❯ lsusb           
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 003 Device 005: ID 2fde:0002 LUXROBO MODI Network Module
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 322e:202c Sonix Technology Co., Ltd. USB2.0 HD UVC WebCam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

as you can see, the OS detects network module, however pymodi cannot.

Expected Behavior

Connect just fine

System Info

  • PyMODI version: latest develop branch and v1.2.0
  • Python version: 3.8
  • Operating System: Pop OS 22.04 LTS
@m-spitfire
Copy link
Author

The error is due to permissions, running as root resolves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant