RAK5146 mPCIe GPS not working with RAK7391

Hi everyone,

I’m currently working with both ChirpStack V4 and the UDP Packet Forwarder, running them in containerized environments. I’ve encountered an issue where the logs repeatedly show the message: no valid GPS coordinates available yet.

 ✔ Container udp-packet-forwarder  Recreated                                                                                                                                                                           0.1s 
Attaching to udp-packet-forwarder
udp-packet-forwarder  | ------------------------------------------------------------------
udp-packet-forwarder  | UDP Packet Forwarder Container v2.4.6
udp-packet-forwarder  | (c) RAKWireless 2022-2024
udp-packet-forwarder  | 
udp-packet-forwarder  | Based on:
udp-packet-forwarder  |  * lora_gateway v5.0.1
udp-packet-forwarder  |  * packet_forwarder v4.0.1
udp-packet-forwarder  |  * sx1302_hal v2.1.0
udp-packet-forwarder  |  * picoGW_hal v0.2.3
udp-packet-forwarder  |  * picoGW_packet_forwarder v0.1.0
udp-packet-forwarder  |  * gateway_2g4_hal v1.1.0
udp-packet-forwarder  | ------------------------------------------------------------------
udp-packet-forwarder  | 
udp-packet-forwarder  | Protocol
udp-packet-forwarder  | ------------------------------------------------------------------
udp-packet-forwarder  | Mode:          DYNAMIC
udp-packet-forwarder  | Protocol:      UDP
udp-packet-forwarder  | Server:        localhost:1700
udp-packet-forwarder  | Band:          eu_863_870
udp-packet-forwarder  | Gateway EUI:   D83ADDFFFE37A116
udp-packet-forwarder  | EUI Source:    eth0
udp-packet-forwarder  | 
udp-packet-forwarder  | Radio
udp-packet-forwarder  | ------------------------------------------------------------------
udp-packet-forwarder  | Model:         RAK5146
udp-packet-forwarder  | Concentrator:  SX1303
udp-packet-forwarder  | Design:        CORECELL
udp-packet-forwarder  | Interface:     USB
udp-packet-forwarder  | Radio Device:  /dev/ttyACM0
udp-packet-forwarder  | 
udp-packet-forwarder  | Extra
udp-packet-forwarder  | ------------------------------------------------------------------
udp-packet-forwarder  | Stat interval: 10
udp-packet-forwarder  | Push timeout:  100
udp-packet-forwarder  | GPS Device:    /dev/ttyAMA0
udp-packet-forwarder  | Use fake GPS:  FALSE
udp-packet-forwarder  | 
udp-packet-forwarder  | *** Packet Forwarder ***
udp-packet-forwarder  | Version: 2.1.0
udp-packet-forwarder  | *** SX1302 HAL library version info ***
udp-packet-forwarder  | Version: 2.1.0;
udp-packet-forwarder  | ***
udp-packet-forwarder  | INFO: Little endian host
udp-packet-forwarder  | INFO: found configuration file global_conf.json, parsing it
udp-packet-forwarder  | INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
udp-packet-forwarder  | INFO: com_type USB, com_path /dev/ttyACM0, lorawan_public 1, clksrc 0, full_duplex 0
udp-packet-forwarder  | INFO: antenna_gain 0 dBi
udp-packet-forwarder  | INFO: Configuring legacy timestamp
udp-packet-forwarder  | INFO: SX1261 spi_path is not configured in global_conf.json
udp-packet-forwarder  | INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
udp-packet-forwarder  | INFO: radio 0 enabled (type SX1250), center frequency 867500000, RSSI offset -215.399994, tx enabled 1, single input mode 0
udp-packet-forwarder  | INFO: radio 1 enabled (type SX1250), center frequency 868500000, RSSI offset -215.399994, tx enabled 0, single input mode 0
udp-packet-forwarder  | INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 5 to 12
udp-packet-forwarder  | INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7, Explicit header
udp-packet-forwarder  | INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
udp-packet-forwarder  | INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
udp-packet-forwarder  | INFO: gateway MAC address is configured to D83ADDFFFE37A116
udp-packet-forwarder  | INFO: server hostname or IP address is configured to "localhost"
udp-packet-forwarder  | INFO: upstream port is configured to "1700"
udp-packet-forwarder  | INFO: downstream port is configured to "1700"
udp-packet-forwarder  | INFO: downstream keep-alive interval is configured to 10 seconds
udp-packet-forwarder  | INFO: statistics display interval is configured to 10 seconds
udp-packet-forwarder  | INFO: upstream PUSH_DATA time-out is configured to 100 ms
udp-packet-forwarder  | INFO: packets received with a valid CRC will be forwarded
udp-packet-forwarder  | INFO: packets received with a CRC error will NOT be forwarded
udp-packet-forwarder  | INFO: packets received with no CRC will NOT be forwarded
udp-packet-forwarder  | INFO: GPS serial port path is configured to "/dev/ttyAMA0"
udp-packet-forwarder  | INFO: Reference latitude is configured to 0.000000 deg
udp-packet-forwarder  | INFO: Reference longitude is configured to 0.000000 deg
udp-packet-forwarder  | INFO: Reference altitude is configured to 0 meters
udp-packet-forwarder  | INFO: Beaconing period is configured to 0 seconds
udp-packet-forwarder  | INFO: Beaconing signal will be emitted at 869525000 Hz
udp-packet-forwarder  | INFO: Beaconing channel number is set to 1
udp-packet-forwarder  | INFO: Beaconing channel frequency step is set to 0Hz
udp-packet-forwarder  | INFO: Beaconing datarate is set to SF9
udp-packet-forwarder  | INFO: Beaconing modulation bandwidth is set to 125000Hz
udp-packet-forwarder  | INFO: Beaconing TX power is set to 27dBm
udp-packet-forwarder  | INFO: global_conf.json does contain a JSON object named debug_conf, parsing debug parameters
udp-packet-forwarder  | INFO: got 2 debug reference payload
udp-packet-forwarder  | INFO: reference payload ID 0 is 0xCAFE1234
udp-packet-forwarder  | INFO: reference payload ID 1 is 0xCAFE2345
udp-packet-forwarder  | INFO: setting debug log file name to loragw_hal.log
udp-packet-forwarder  | INFO: found configuration file local_conf.json, parsing it
udp-packet-forwarder  | INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
udp-packet-forwarder  | INFO: gateway MAC address is configured to D83ADDFFFE37A116
udp-packet-forwarder  | INFO: server hostname or IP address is configured to "localhost"
udp-packet-forwarder  | INFO: upstream port is configured to "1700"
udp-packet-forwarder  | INFO: downstream port is configured to "1700"
udp-packet-forwarder  | INFO: statistics display interval is configured to 10 seconds
udp-packet-forwarder  | INFO: upstream PUSH_DATA time-out is configured to 100 ms
udp-packet-forwarder  | INFO: packets received with a valid CRC will be forwarded
udp-packet-forwarder  | INFO: packets received with a CRC error will NOT be forwarded
udp-packet-forwarder  | INFO: packets received with no CRC will NOT be forwarded
udp-packet-forwarder  | INFO: GPS serial port path is configured to "/dev/ttyAMA0"
udp-packet-forwarder  | INFO: Reference latitude is configured to 0.000000 deg
udp-packet-forwarder  | INFO: Reference longitude is configured to 0.000000 deg
udp-packet-forwarder  | INFO: Reference altitude is configured to 0 meters
udp-packet-forwarder  | INFO: fake GPS is disabled
udp-packet-forwarder  | This is uart for GPS.
udp-packet-forwarder  | INFO: [main] TTY port /dev/ttyAMA0 open for GPS synchronization
udp-packet-forwarder  | INFO: [main] concentrator started, packet can now be received
udp-packet-forwarder  | INFO: concentrator EUI: 0x0016c001f1563b2e
udp-packet-forwarder  | INFO: [down] PULL_ACK received in 0 ms
udp-packet-forwarder  | INFO: [up] payload (29 bytes): 40AD32440080CDE9056344D66B4B4AEA1EE93C23B1D93DC2383963240B
udp-packet-forwarder  | INFO: [up] pkt from mote: 0x004432AD (netid=0x000000, fcnt=59853)
udp-packet-forwarder  | 
udp-packet-forwarder  | JSON up: {"rxpk":[{"jver":1,"tmst":6678430,"chan":2,"rfch":1,"freq":868.500000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","rssis":-68,"lsnr":10.0,"foff":12687,"rssi":-67,"size":29,"data":"QK0yRACAzekFY0TWa0tK6h7pPCOx2T3CODljJAs="}]}
udp-packet-forwarder  | INFO: [up] PUSH_ACK received in 1 ms
udp-packet-forwarder  | 
udp-packet-forwarder  | ##### 2024-08-02 13:19:46 GMT #####
udp-packet-forwarder  | ### [UPSTREAM] ###
udp-packet-forwarder  | # RF packets received by concentrator: 1
udp-packet-forwarder  | # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
udp-packet-forwarder  | # RF packets forwarded: 1 (29 bytes)
udp-packet-forwarder  | # PUSH_DATA datagrams sent: 1 (255 bytes)
udp-packet-forwarder  | # PUSH_DATA acknowledged: 100.00%
udp-packet-forwarder  | ### [DOWNSTREAM] ###
udp-packet-forwarder  | # PULL_DATA sent: 1 (100.00% acknowledged)
udp-packet-forwarder  | # PULL_RESP(onse) datagrams received: 0 (0 bytes)
udp-packet-forwarder  | # RF packets sent to concentrator: 0 (0 bytes)
udp-packet-forwarder  | # TX errors: 0
udp-packet-forwarder  | ### SX1302 Status ###
udp-packet-forwarder  | # SX1302 counter (INST): 11119576
udp-packet-forwarder  | # SX1302 counter (PPS):  0
udp-packet-forwarder  | # BEACON queued: 0
udp-packet-forwarder  | # BEACON sent so far: 0
udp-packet-forwarder  | # BEACON rejected: 0
udp-packet-forwarder  | ### [JIT] ###
udp-packet-forwarder  | src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
udp-packet-forwarder  | #--------
udp-packet-forwarder  | src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
udp-packet-forwarder  | ### [GPS] ###
udp-packet-forwarder  | # Invalid time reference (age: 1722604786 sec)
udp-packet-forwarder  | # no valid GPS coordinates available yet
udp-packet-forwarder  | ##### END #####
udp-packet-forwarder  | INFO: [down] PULL_ACK received in 0 ms
udp-packet-forwarder  | 
udp-packet-forwarder  | JSON up: {"stat":{"time":"2024-08-02 13:19:46 GMT","rxnb":1,"rxok":1,"rxfw":1,"ackr":100.0,"dwnb":0,"txnb":0,"temp":30.0}}
udp-packet-forwarder  | INFO: [up] PUSH_ACK received in 1 ms
udp-packet-forwarder  | INFO: [up] payload (15 bytes): 405BB78300806DD405EBD002F37913
udp-packet-forwarder  | INFO: [up] pkt from mote: 0x0083B75B (netid=0x000000, fcnt=54381)
udp-packet-forwarder  | 
udp-packet-forwarder  | JSON up: {"rxpk":[{"jver":1,"tmst":12330855,"chan":2,"rfch":1,"freq":868.500000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","rssis":-35,"lsnr":9.2,"foff":12199,"rssi":-35,"size":15,"data":"QFu3gwCAbdQF69AC83kT"}]}
udp-packet-forwarder  | INFO: [up] PUSH_ACK received in 2 ms
udp-packet-forwarder  | INFO: [up] payload (29 bytes): 40AD32440080CDE9056344D66B4B4AEA1EE93C23B1D93DC2383963240B
udp-packet-forwarder  | INFO: [up] pkt from mote: 0x004432AD (netid=0x000000, fcnt=59853)
udp-packet-forwarder  | 
udp-packet-forwarder  | JSON up: {"rxpk":[{"jver":1,"tmst":13382171,"chan":2,"rfch":1,"freq":868.500000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","rssis":-68,"lsnr":10.8,"foff":12687,"rssi":-68,"size":29,"data":"QK0yRACAzekFY0TWa0tK6h7pPCOx2T3CODljJAs="}]}
udp-packet-forwarder  | INFO: [up] PUSH_ACK received in 0 ms
udp-packet-forwarder  | 
udp-packet-forwarder  | ##### 2024-08-02 13:19:56 GMT #####
udp-packet-forwarder  | ### [UPSTREAM] ###
udp-packet-forwarder  | # RF packets received by concentrator: 2
udp-packet-forwarder  | # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
udp-packet-forwarder  | # RF packets forwarded: 2 (44 bytes)
udp-packet-forwarder  | # PUSH_DATA datagrams sent: 3 (616 bytes)
udp-packet-forwarder  | # PUSH_DATA acknowledged: 100.00%
udp-packet-forwarder  | ### [DOWNSTREAM] ###
udp-packet-forwarder  | # PULL_DATA sent: 1 (100.00% acknowledged)
udp-packet-forwarder  | # PULL_RESP(onse) datagrams received: 0 (0 bytes)
udp-packet-forwarder  | # RF packets sent to concentrator: 0 (0 bytes)
udp-packet-forwarder  | # TX errors: 0
udp-packet-forwarder  | ### SX1302 Status ###
udp-packet-forwarder  | # SX1302 counter (INST): 21129650
udp-packet-forwarder  | # SX1302 counter (PPS):  0
udp-packet-forwarder  | # BEACON queued: 0
udp-packet-forwarder  | # BEACON sent so far: 0
udp-packet-forwarder  | # BEACON rejected: 0
udp-packet-forwarder  | ### [JIT] ###
udp-packet-forwarder  | src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
udp-packet-forwarder  | #--------
udp-packet-forwarder  | src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
udp-packet-forwarder  | ### [GPS] ###
udp-packet-forwarder  | # Invalid time reference (age: 1722604796 sec)
udp-packet-forwarder  | # no valid GPS coordinates available yet
udp-packet-forwarder  | ##### END #####
udp-packet-forwarder  | INFO: [down] PULL_ACK received in 1 ms
udp-packet-forwarder  | 
udp-packet-forwarder  | JSON up: {"stat":{"time":"2024-08-02 13:19:56 GMT","rxnb":2,"rxok":2,"rxfw":2,"ackr":100.0,"dwnb":0,"txnb":0,"temp":30.0}}
udp-packet-forwarder  | INFO: [up] PUSH_ACK received in 1 ms
udp-packet-forwarder  | INFO: [up] payload (29 bytes): 40088C8600809CEE05423EA325F23B733B864884BB91C9155E51ECBC2B
udp-packet-forwarder  | INFO: [up] pkt from mote: 0x00868C08 (netid=0x000000, fcnt=61084)

Below is docker-compose.yml for udp packet forwarder.

version: '2'

services:

  udp-packet-forwarder:
    

    image: rakwireless/udp-packet-forwarder:latest
    container_name: udp-packet-forwarder
    restart: unless-stopped
    privileged: true         # set this to true or define the required devices to share with the container under the `devices` tag below
    network_mode: host       # required to read host interface MAC instead of virtual one, you don't need this if you set the GATEWAY_EUI manually

    devices: 
      - /dev/ttyACM0

    environment:
      MODEL: "RAK5146"
      INTERFACE: "USB"
      DEVICE: "/dev/ttyACM0"
      GATEWAY_EUI_SOURCE: "AC1F09FFFE0CCF97"
      SERVER_HOST: localhost
      SERVER_PORT: 1700
      HAS_GPS: "1"
      GPS_DEV: "/dev/ttyAMA0"
      STAT_INTERVAL: 10

I am using RPi CM4 Lite with Intel WiFi6 AX210 PCIe Module and RAK5146 Module with below internal view for modules assembly.

My Setup:

  • ChirpStack V4 is being used.
  • Hardware: Raspberry Pi Compute Module 4 (RPi CM4).
  • GPS Configuration: I have connected Ublox GPS antenna outside the window where I can see from my mobile multiple satellites available.

What I’ve Tried:

  • Ensured the GPS module is connected properly and functioning.
  • Checked the serial port settings and permissions.
  • Verified that the GPS data can be read outside the container.

Questions:

  1. Has anyone faced a similar issue where the packet forwarder does not receive valid GPS coordinates?
  2. What steps should I take to diagnose and resolve this problem?
  3. Are there specific configurations or dependencies I might be overlooking?

Any guidance or suggestions would be greatly appreciated!

Thanks in advance!

Any solation so far???

Hi @sufianabrar @Tech_Atreyo
Might be related to an upstream issue: Issue with GPS Synchronization in LoRa Packet Forwarder-waveshare SX1302 pi Hat · Issue #116 · Lora-net/sx1302_hal · GitHub.
I will do some tests once I’m back to the office.

Hi @xoseperez,

have you got the chance to regenerate this issue or any guidelines for me? The link you mentioned above, is not helping me to resolve my issue.

Thanks

Hello,


As per the documentation, you should mount your concentrator on MPCIe slots 1 or 2.

Please try this so your GPS will have a UART interface to report to.

Nikola Semov

Hi,

Thanks for the reply. I have already attached the Concentrator on slot#2. Please check the assembly photo in the post.

Thanks

Hi @sufianabrar
Can you check the output of /dev/ttyAMA0? Something like cat /dev/ttyAMA0 and see if it is NEMA sentences?
It works fine on MiniPCIe slot #1 since it has the main UART wired on /dev/ttyS0 (you have to disable login shell and enable serial port using raspi-config).

Hi @xoseperez,

I have connected the Module on Slot#2 and disabled the login shell for serial port. But Still no results for GPS. I have attached the photos.

Also, for me its not ttyS0, it is ttyAMA0.

Thanks,
Sufian

Hi @sufianabrar
UART is wired to slot #1 in the RAK7391. Try again moving the concentrator to that slot.

Hi @xoseperez,
I tried it in Slot#1 and I can see the NMEA messages. Chirpstack Gateways Location has also been updated.

I wonder if this already documented anywhere for GPS to use slot#1?

Thanks for the support.

Hi @sufianabrar
Glad it worked.
We will add more info about this to the documentation center. Thank you for the feedback!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.