raspberry-pisim800

How Can I send AT commands to GPS module connected to a raspberry pi


My GPS module doesn't automatically turn on its GPS to receive data. The module uses AT commands to turn on GPS and the the GPS shuts down when you remove it from its power source.

The problem is I can turn on the GPS with PUTTY serial monitor when connected directly to my laptop for testing, but I don't know how to turn it on when connected to my raspberry pi because I don't know how to send the AT command through the raspberry pi to power it up.

Is there a way i can send AT commands to a connected device on my raspberry

I have tried the cu method but it doesn't seem to work as I receive no response when I input the AT code


Solution

  • So if I understand it correctly, you can connect the GPS module to your laptop directly and send the AT commands to it but, you are unable to do the same with your RPi.

    Think of it like this, how is the computer being able to send the AT commands? Through a UART right? So that means you need a UART like connection between the 2 devices to be able to send AT commands.

    Now, lets just replace the computer with the RPi, again you would need a UART connection between the GPS module and the RPi module, lets say a simple RS232 connectivity. Once you have this connection established, you will have to program your RPi to send the appropriate commands to the GPS modem via this connection. So probably what you need to google now is "RS232 communication using RPi". And of course you will need the Tx and Rx connections to be proper between the two devices.