Qt 6.5: Problems When Reading From the Serial Port
-
I have been trying to read from the serial port using Boot to Qt 6.5 running on a Raspberry Pi 4B. I kept getting a "Resource Error" on the debug console every time I would try to send serial data to my code. Serial communication works just fine from the Pi to the terminal. So, I decided to load the Serial Terminal Example program within Qt Creator. Again. it writes to the serial port just fine and I can see all of the correct characters on the terminal (Windows COM port). However, when I try to send data to the Pi, it gives me a "Resource temporarily unavailable" error prompt. Please help! Thank You.
-
I found a fix. I had to disable the bluetooth module on the Raspberry Pi 4B allowing the use of ttyAMA0 for the UART I/O pins instead of ttyS0. Everything works now when using ttyAMA0.
The RPi4 bluetooth module can be disabled by adding the following line to config.txt:
dtoverlay=disable-bt
-