-
Couldn't load subscription status.
- Fork 13
520 termios.error: (22, 'Invalid argument')
The error most likely appears with Raspi 3 or 4 when ttyS0 gets opend more than once a boot/life time. Then the even parity setting causes trouble (see also here).
Solution is to use ttyAMA0 instead of ttyS0. Problem is that ttyAMA0 by default is bounded to BT, so you need to 'free' it (taken from the thread):
-
sudo nano /boot/config.txtor with later OS'ssudo nano /boot/firmware/config.txt - add
dtoverlay=disable-btto the bottom and save (this way the uart used for bluethooth is free and can be used for serial [at least that's my understanding]) sudo reboot now
On my Pi4 w. Debian GNU/Linux 12 (bookworm) i had to do:
sudo nano /boot/firmware/config.txt- add
dtoverlay=pi3-miniuart-btin the general section sudo reboot now
after that ttyAMA0 was available for my usage. Don't ask me where I got this from (probably googel), but for me it works.
perhaps in some cases you need to use dtoverlay=miniuart-bt. fu.. frequent changes of the system....
check for ttyAMA0 using ls /dev/tty* evtl with sudo