RAK7243 could not get a valid message from GPS (no time)

pic-1, it is the version with LTE
4 antennas,
I have installed the correct firmware

The GPS antenna is placed indoors, but it is at the last floor of the building.
Even if that is the cause,
a. how does it set the correct coordinates?
b. why does periodically states coordinates and time and then spams the syslog with warnings?

I will try the module outside, but the main issue is how not to write hundreds of warnings into syslog.

I let (indoors) the
test_loragw_gps
run a little longer

Beginning of test for loragw_gps.c
*** Library version information ***
Version: 5.0.1;
***
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    Synchronization error.
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    Synchronization error.

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001263.000000000
    GPS reference time: 1251036480.999656661
    Internal counter reference value: 8354525
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 8854525
    Conversion to GPS: 1251036481.499656661
    Converted back: 8854525 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 8854525
    Conversion to UTC: 1567001263.500000000
    Converted back: 8854525 ==> 0µs
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001265.000000000
    GPS reference time: 1251036483.999656841
    Internal counter reference value: 11354525
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 11854525
    Conversion to GPS: 1251036484.499656841
    Converted back: 11854525 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 11854525
    Conversion to UTC: 1567001265.500000000
    Converted back: 11854525 ==> 0µs

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001265.000000000
    GPS reference time: 1251036484.999656901
    Internal counter reference value: 12354525
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 12854525
    Conversion to GPS: 1251036485.499656901
    Converted back: 12854525 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 12854525
    Conversion to UTC: 1567001265.500000000
    Converted back: 12854525 ==> 0µs
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001269.000000000
    GPS reference time: 1251036487.999657080
    Internal counter reference value: 15354526
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 15854526
    Conversion to GPS: 1251036488.499657080
    Converted back: 15854526 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 15854526
    Conversion to UTC: 1567001269.500000000
    Converted back: 15854526 ==> 0µs

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001269.000000000
    GPS reference time: 1251036488.999657139
    Internal counter reference value: 16354526
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 16854526
    Conversion to GPS: 1251036489.499657139
    Converted back: 16854526 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 16854526
    Conversion to UTC: 1567001269.500000000
    Converted back: 16854526 ==> 0µs

~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
    * Synchronization successful *
    UTC reference time: 1567001269.000000000
    GPS reference time: 1251036489.999657199
    Internal counter reference value: 17354526
    Clock error: 1.000000000
    * Test of timestamp counter <-> GPS value conversion *
    Test value: 17854526
    Conversion to GPS: 1251036490.499657199
    Converted back: 17854526 ==> 0µs
    * Test of timestamp counter <-> UTC value conversion *
    Test value: 17854526
    Conversion to UTC: 1567001269.500000000
    Converted back: 17854526 ==> 0µs
^C
End of test for loragw_gps.c

It seems like syncing time successfully and then warning a lot for not valid messages (just like syslog)

I am seeing the same thing.
It would appear (as far as I can see) to indicate data coming from the GPS module is being corrupted sometimes.
I have been using the previous generation RAK833 without any issue, and have just moved to the RAK7243 as I wanted to add cellular backhaul.

The difference with the RAK7243 is that the GPS is connected via i2c now rather than a serial interface.
There are also some SPI modification done to the reference libloragw code on the installed image.
$ cd /opt/ttn-gateway/lora_gateway
$ git status
The two main source code changes are shown by doing a diff of these two files
$ git diff libloragw/src/loragw_gps.c
$ git diff libloragw/src/loragw_spi.native.c

It would seem they have had to slow down the SPI interface 4x from default to get the interface to the SX1301 to work, but looks like there may be issues with the i2c too.

I noticed that the configuration they pass to the Ublox gps module is different too. The NAV-TIMEGPS msg has modified the iTOW configuration. If I change this back to standard then I don’t get the error messages, but I also never get a proper gps lock.

If anyone has any fixes they have found then please respond

Thanks for chipping in with some useful insight. I began to think it’s happening only to me. I suspected that was something to do with the poll frequency being too high for the gps module.
For me, the solution is still to disable the gps. I prefer it from huge log files with noise. NTP, I think, is enough for now (?).
For whomever the gps is critical I don’t know.
If I ever find the time to research further and find something useful, I will post it here.

Hello @d_c_h_w and @grk
Would you share the contents of the following files config.txt and cmdline.txt . They are located on /boot part on your RPi’s.

Regards
Todor Velev

Hi Todor,
Here mine. They are default as far as I can see, apart from the modifications done by your install scripts.

cmdline.txt

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=b5cb85fa-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether

config.txt

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm_baudrate=10000

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=pi3-disable-bt
dtoverlay=dwc2

Thank you! I will try to reproduce the situation. Will keep you informed.

Thanks Todor, have you managed to look into this any more

I’ve also tried using the latest code from https://github.com/RAKWireless/rak_common_for_gateway
and following the installation instruction there, and I still get the same gps errors

Could this be a problem with i2c clock stretching, as I believe the rpi 3 is buggy in its clock stretching implementation

Ublox 7 + RPI via i2c issues described here
https://portal.u-blox.com/s/question/0D52p00008HKCIGCA5/solved-raspberry-pi-and-neo7-reference-board-i2c-bus-access

Just a little message, to say that i just received and setuped following documentations. my RAK7243 and i get exactly the same message !

Oct  9 16:22:55 rak-gateway ttn-gateway[1403]: WARNING: [gps] could not get a valid message from GPS (no time)
Oct  9 16:22:55 rak-gateway ttn-gateway[1403]: WARNING: [gps] could not get a valid message from GPS (no time)
Oct  9 16:22:55 rak-gateway ttn-gateway[1403]: WARNING: [gps] could not get a valid message from GPS (no time)
Oct  9 16:22:55 rak-gateway ttn-gateway[1403]: WARNING: [gps] could not get a valid message from GPS (no time)

@netmonk
@grk
2019-10-10%2009%3A10%3A53

This is because the rak7243 uses the i2c interface to get gps data, the i2c interface sets a lower rate, but the polling gps frequency is faster.

Alright, any way to fix that ?

You can ignore this warning message.

Comment out the file /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/src/lora_pkt_fwd.c about 2752 lines, and execute "sudo make" in the /opt/ttn-gateway/packet_forwarder directory.

Then restart the gateway and the warning will disappear.

To be honest, this doesn’t fix the I2C issue, just hides the issue :slight_smile:

Yes, thank you very much for your advice.
Regarding the issue of i2c rate, we will solve it as soon as possible.

@netmonk

2019-10-10%2009%3A10%3A53
This problem can try this solution.

Change the value of i2c_arm_baudrate from 10000 to 100000 in the file /boot/config.txt.
2019-11-11%2018%3A11%3A54

Good evening, is it solved in latest firmware release ?
i mean RAK2245&RAK831_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202.zip

Yes, we have done this in V4.1.0 firmware.

I’m facing the same issue

WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)

have anyone got the solution for this problem

Thanks,
Prasad

image

value of i2c_arm_baudrate is 100000 in the file /boot/config.txt.