L76 GPS High altitude balloon mode



  • I am browsing a the documentaion for L76 GPS. This is what's on the pytrack board if I am correct.
    The sensor working fine and micropyGPS saves a ton of work.
    What I recently found out that L-76 has some kind of ballonmode, which needs to be turn on, if the device travels above a certain altitude. How can I enable this?

    What I found out so far that i should edit this message some how: PMTK_FR_MODE
    I am not sure how to do that because I don't have the knowledge (yet) about this low level stuff.
    Thank you,



  • Thank you for the information provided, this is very helpful to me.



  • Have a look into the example. The Pycom sends some kind of init to the GPS with i2c.writeto. They use the bytearray reg.

    You have to build your own sequence and send it to the L76. Somewhere in the L76 manual they tell you how to build the checksum, which is important. It is a simple XOR of each byte between $ and *.

    For some command you may have to read the result and send an ACK message to the L76

    Here is my method to build the sentence. Please note that the checksum extraction is not optimized ;)

    # build a MTK sentence to configure the GPS chip. payload is content between $ and *
        def _buildMtkSentence(self, payload):
            _c = 0 # checksum
            _s = self._reg # buffer of sentence
            _p = 0 # index of actual sentence char
            _s[_p] = ord(b'$')
            _p += 1
            _i = 0 # index of payload
            _l = len(payload)
            while _i<_l:
                _c ^= ord(payload[_i])
                _s[_p] = ord(payload[_i])
                _p += 1
                _i += 1
            _s[_p] = ord(b'*');  _p += 1
            _s[_p] = ord("{0:02X}".format(_c)[0]); _p += 1
            _s[_p] = ord("{0:02X}".format(_c)[1]); _p += 1
            _s[_p] = ord(b'\r'); _p += 1
            _s[_p] = ord(b'\n')
    

    Example call

    self._reg = bytearray(64)
    self._buildMtkSentence("PMTK001,353,3,1,1,0,3"); # use GPS and GLONASS
    self.i2c.writeto(GPS_I2CADDR, self._reg)
    

    Have fun and tell me how to wake up the GPS, after you send the MTK messages for sleep modes ;)



Pycom on Twitter