I'm developing a parking control system in Python 3 which runs in headless mode at the Raspberry Pi startup and uses one RFID reader, one Barcode reader and many other devices but they really don't matter for this question.
Both the RFID and Barcode readers are HDI devices and I manipulate them using the following commands:
Open:
RFID_Reader = open((b'/dev/hidraw0'), 'tr')
Read:
buffer = RFID_Reader.read(10)
Some time in my control system I start displaying a HDMI fullscreen slideshow using fbi:
sudo fbi -a --noverbose -T 1 -t 1 /home/pi/Image1.jpg /home/pi/Image2.jpg /home/pi/Image3.jpg
So far, so good.
The problem happens when I receive an input from either the RFID reader or the Barcode reader. In that moment the slideshow stops and the command line is shown with the incoming data from the device :
pi@raspberrypi: ˜$ map: vt01 => fb0
00009183728473
-bash: 00009183728473: command not found
pi@raspberrypi: ˜$
Of course!
It is makes total sense to me. It's just like I'm typing some command in the command line. In this case the command is a 14 digits number plus "\n"
The question is:
How can I avoid quitting the fbi fullscreen slideshow to the command line when a card or a barcode is presented to the readers, or more simply, when anything is typed to the command line?