Read datas after write on serial port
Hi everyone,
I'm currently developping a C program to drive a Telit GM862-GPS module using the serial port of an embedded board (SBC9261). The communication with the module is based on AT commands : I just send my command to the module, through the RS232 line, and the module answers immediately. Here's an example with a basic command returning the GPS's acquired position, sent with Minicom : Code:
AT$GPSACP Example : Code:
<Declaration and initialization of the file descriptor "fd" here...> Or do you think this could be a normal behaviour of the transmission ? Any suggestions appreciated ! Thank you for your answers ! |
It is normal behavior. The GPS module is configured to echo characters back to the terminal which is why you also see the command when using minicom. The module may have a configuration setting to disable echo back.
|
The echo may be coming from your local serial port, or from the GPS device itself. To determine which, use a known-good terminal emulator such as minicom or C-Kermit, and disable local-echo. Send a few commands by typing interactively, and observe the result. In most cases, the device will echo character-by-character (mimicking local-echo), or may echo the entire command prefixed to the reply. You can do this from a standard PC with a serial port; even a Windows PC running the terminal emulator that comes with Windows (can't recall what it is called).
My bet is that the device is doing the echoing, as postulated by michaelk. --- rod. |
Excerpt from the AT command reference guide
Quote:
|
Quote:
Thank you guys, I checked and that's the echo ! You easily get forget how things work when you use them everyday... Thank you again ! |
All times are GMT -5. The time now is 08:39 PM. |