Pytrack not sending GLL
my pytrack running a LoPy with 1.19.0.b4 sends *GLL sentences only for a very short time. After this it sends only GSA, GSV and RMC. This may explain why some users never get a fix with pycoms demo lib, when their GPS needs some time as well
RMC will be fine too, but I like to know why I get GLL sentences only seldom on startup. I paused developing for some time and can't remember this behaviour on the 1.18.x branch. I have not updated the pytrack firmware since then. I guess ist the *.7 and not .8 version. Has something changed in the init code of the GPS in 1.19.0. and I have to send config messages by myself?
PS: I can't type into the index textbox and the control contains only "bugs"
I tried to send a lot of MTK messages, but without any success. But I get now GLL sentences at irregular intervals.
The communication between the GPS and the LoPy seems to be the problem. I read the data from the GPS into a fix buffer
self._lenBuffer = 64 self._buffer = bytearray(self._lenBuffer) while True: self.i2c.readfrom_into(GPS_I2CADDR, self._buffer) build_sentence_from_buffer() parse_sentence()
This seems to work for less then 10sec. Then it starts to send a lot of \n at the end of each sentence. A few seconds later it also adds \n inbetween a sentence.
bytearray(b'1,1,02,25,,,16,06,,,14*78\r\n$GLGSV,1,1,00*65\r\n$GPGLL,,,,,221320\n\n') bytearray(b'.307,V,N*7E\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n') bytearray(b'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')
My workaround is simple: ignore all \n
But I like to fix the cause. I tried to sleep for 250ms between each read. This reduced the amount of buffers containing only \n, but there still exist sentences with \n inbetween.
Has someone an idea how to fix the communication between GPS and LoPy?
@crumble I can't say for sure, but I would be surprised if the LoPy firmware or even the Pytrack firmware had anything to do with the configuration of the GPS chip. My impression is that it all happens in the relevant library only. To be confirmed by the powers that be...