Writing to the command line from a device on ttyUSB0 ?
by iCoder from LinuxQuestions.org on (#6P5AE)
Hi Guy's (that includes everyone),
Typical newbee question i suppose, but i have to start somewhere.
Setup: Pi4 (4GB) running headless, Python 3.11.2, Nextion Enhanced touch screen on ttyUSB0.
I can write Nextion HMI files to create/add/alter the actual screen and its output. However i have been going around in circles for days with the linux side of the equation.
I want to touch a button on the screen that i have configured to send specific commands. I want to have those commands arrive at the command line of the raspberry pi and be executed.
So for example, I touch a button that is configured to output ; "sudo ./run_me.sh"
I have already setup the "send" side and that command is entering the pi4 via a usb to ttl serial adapter in ttyUSB0.
What do i need to do to "route' it to the command line please?
Typical newbee question i suppose, but i have to start somewhere.
Setup: Pi4 (4GB) running headless, Python 3.11.2, Nextion Enhanced touch screen on ttyUSB0.
I can write Nextion HMI files to create/add/alter the actual screen and its output. However i have been going around in circles for days with the linux side of the equation.
I want to touch a button on the screen that i have configured to send specific commands. I want to have those commands arrive at the command line of the raspberry pi and be executed.
So for example, I touch a button that is configured to output ; "sudo ./run_me.sh"
I have already setup the "send" side and that command is entering the pi4 via a usb to ttl serial adapter in ttyUSB0.
What do i need to do to "route' it to the command line please?