I am using a Pi to communicate with a GPS module via pyserial. This works but displays characters going to the GPS module as well as the response, which I don't want. I only want the response.
The code I'm using is:
from time import sleep
# Set up serial port. Baud rate etc. are the default for the GPS module
port=serial.Serial("/dev/serial0", baudrate=115200, timeout=3.0)
# Determine if GPS module is talking to us
response=port.readline().decode('utf-8') # Read result
The result of this is:
==================== RESTART: /home/pi/Programmes/GPS.py ====================
The response to the AT command is "OK" which is what I'd expect and what I want to use. I can see the correct response if I use Minicom, which would show:
Any Ideas how to get rid of the sent stuff please?