Open matsujirushi opened 2 years ago
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.
https://github.com/eclipse/mraa/blob/046bdd0adbd0c7259ee0bd19e01091c25f043cde/src/uart/uart.c#L240
path == NULL
https://github.com/eclipse/mraa/blob/046bdd0adbd0c7259ee0bd19e01091c25f043cde/src/uart/uart.c#L217
plat->uart_dev[index].device_path == NULL
Does anyone know the cause?
Hi, When I try to use UART on Raspberry Pi 4, the following error occurs.
Error message:
Code:
It seems that device_path is not set.
https://github.com/eclipse/mraa/blob/046bdd0adbd0c7259ee0bd19e01091c25f043cde/src/uart/uart.c#L240
https://github.com/eclipse/mraa/blob/046bdd0adbd0c7259ee0bd19e01091c25f043cde/src/uart/uart.c#L217
Does anyone know the cause?