Does anyone have a “best practice” ie: using systemd/99-rules.com to send an AT command using minicom as a service (atcom can’t seem to communitcate with the serial port for some reason)?
I have a small script with:
As well as an escape.txt file for quitting minicom.
So my actual script i’d like to make a service is:
sudo minicom -b 115200 -D /dev/ttyUSB2 -S minicom.sh < escape.txt
And this is the service I’m attempting to create:
Description=Start Minicom and run AT#ECM=1,0
ExecStart=/usr/bin/env php /home/pi/minicom.sh
*the hashes are just there because i’m still trying to figure this out.
So my question is, how to i tell my system to wait for ttyUSB2 to be available before the script runs?