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

UART initialization failed on Raspberry Pi 4 #1090

Open
matsujirushi opened this issue Jul 14, 2022 · 0 comments
Open

UART initialization failed on Raspberry Pi 4 #1090

matsujirushi opened this issue Jul 14, 2022 · 0 comments

Comments

@matsujirushi
Copy link

Hi,
When I try to use UART on Raspberry Pi 4, the following error occurs.

Error message:

$ sudo python3 uart-test.py
Traceback (most recent call last):
  File "/home/pi/work/uart-test.py", line 6, in <module>
    uart = mraa.Uart(0)
  File "/usr/local/lib/python3.9/dist-packages/mraa.py", line 601, in __init__
    _mraa.Uart_swiginit(self, _mraa.new_Uart(*args))
ValueError: Error initialising UART

Code:

#!/usr/bin/env python3

import mraa
import time

uart = mraa.Uart(0)

It seems that device_path is not set.

if (!path) {

path == NULL

mraa_uart_context dev = mraa_uart_init_raw((char*)plat->uart_dev[index].device_path);

plat->uart_dev[index].device_path == NULL

Does anyone know the cause?

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