can someone help me please, how to send an ELM327 command to my OBDII dongle, connected via USB and fetch the answer in a $Var?
Kris Occhipinti made a great video on YouTube, where he show how to do this by the screen command. "ELM327 USB OBD2 Linux Videos Part #2"
But I am trying to use this data in a script, whether Python or Bash.
Something like
echo "01 01" > /dev/ttyUSB0 where the answer of the USB device should be in $VAR
2 Answers
There is a python library called python-OBD that can do most of this for you, if you don't want to build it from scratch. If you would prefer not to use a premade library, here is a quick tutorial on how to do it with pyserial.
You can use AT commands. You may use Python Serial Library. This might help -
1