Home Page Forums Raspberry Pi Shields How to use GPS?

This topic contains 0 replies, has 1 voice, and was last updated by  test2 1 week, 5 days ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37481

    test2
    Participant

    Hi I’m trying to figure out how to get GPS data. I notice there were nothing in the samples and tried to figure it out myself.

    I got close but then couldn’t reproduce it. What I did was open python3 and using the repl I copy/pasted these lines from “sendSMS.py”

    from cellulariot import cellulariot
    import time

    #node = cellulariot.CellularIoT() # for Sixfab CellularIoT HAT
    node = cellulariot.CellularIoTApp() # for Sixfab CellularIoT App. Shield
    node.setupGPIO()

    node.disable()
    time.sleep(1)
    node.enable()
    time.sleep(1)
    node.powerUp()

    node.getResponse(“RDY”)

    I had to hit ctrl+c since getResponse was hanging. Now the first time I wrote “node.turnOnGNSS()” and got the below

    AT+QGPS=1
    AT+QGPS=1
    OK

    I wrote “node.getLatitude()” and got

    ATE0
    ATE0
    OK

    AT+QGPSLOC=2

    +CME ERROR: 516

    0

    Googling the error code it appears the error is “Invalid length” however I found the code in the doc “Quectel_BG96_GNSS_AT_Commands_Manual_V1.0”. The location isn’t fixed. I have no idea how to check to get a fix for the location or if I need to send other commands to it. I then power cycled the pi and started with the same few commands but used node.sendATComm to send a bunch of at commands. I turned on autogps and did various other things. It looks like I could turn on and off the GPS successfully. Gowever it hangs whenever I try to get a location. I’m testing this indoors but IDK if that would matter.

Viewing 1 post (of 1 total)

The topic ‘How to use GPS?’ is closed to new replies.