adrianomarto / soft_uart

Software-based serial port module for Raspberry Pi.
GNU General Public License v3.0
159 stars 83 forks source link

Can it work with Raspberry Pi 4 ? #23

Closed daniel-dlds closed 3 years ago

daniel-dlds commented 3 years ago

Hi,

I am trying to get it to work with a raspberry PI 4, but for my setup I am not getting any results. I open the serial port (I can see the open log in /var/log/messages), but when I write to it nothing happens. For now I don't need to read anything, just write. Can you direct me to some debugging strategies so I can figure out what's wrong with my setup ? I sort of new to programming serial ports. On a side note, in this application I am developing I am successfully writing to the hardware serial port on the PI. The code for the soft UART is similat.

Thanks, Regards

daniel-dlds commented 3 years ago

Hi, I have put some debug statements in the code to better see what is happening. The handle_rx(struct hrtimer* timer) function is being called a number of times. I noticed that the module is setting the baud rate to 4800. I had it at 9600. I recompiled my code, but I still get nothing on the other side.

Do you know what I could be doing wrong ?

Thanks, Regards

daniel-dlds commented 3 years ago

Hi, Found the problem. TX wire switched with the RX Wire. All ok. Thanks, Regards