Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service tries to open GPS UART even if GPS is disabled with HAS_GPS=0 #11

Closed
xoseperez opened this issue Nov 13, 2023 · 1 comment
Closed

Comments

@xoseperez
Copy link
Contributor

As reported by a user (see https://forum.rakwireless.com/t/rak5146-gps-error/10760):

I have 2 RAK5146 concentrators in a RAK7391 server. I am using the UDP packet forwarder as I need the GPS location. I am running 2 UDP packet forwarders to make use of the 2 RAK5146’s installed. The configuration for packet forwarder 1 is as follows:

version: '2.0'

services:

  udp-packet-forwarder:
    image: rakwireless/udp-packet-forwarder:latest
    container_name: udp-packet-forwarder-c1
    restart: unless-stopped
    privileged: true
    network_mode: host
#    volumes:
#      - ./global_conf.json:/app/global_conf.json:ro
    environment:
      SERVER_HOST: localhost
      MODEL: "RAK5146"
      INTERFACE: "USB"
      HAS_GPS: 1
      RADIO_DEV: "/dev/ttyACM1"
      GPS_DEV: "/dev/ttyAMA0"
      GATEWAY_EUI_SOURCE: "chip"

The configuration of rhte second packet forwarder is as follows:

version: '2.0'

services:

  udp-packet-forwarder:
    image: rakwireless/udp-packet-forwarder:latest
    container_name: udp-packet-forwarder-c2
    restart: unless-stopped
    privileged: true
    network_mode: host
#    volumes:
#     - ./global_conf.json:/app/global_conf.json:ro
    environment:
      SERVER_HOST: localhost
      MODEL: "RAK5146"
      HAS_GPS: 0
      RESET_GPIO: 0
      GATEWAY_EUI: "0016c001ff1e54b3"
      RADIO_DEV: "/dev/ttyACM2"

However, both the packet forwarders wants to access the GPS on /dev/ttyAMA0. As a result I am getting the warning on both packet forwarders (only one log shown):

udp-packet-forwarder-c2  | WARNING: [gps] could not get a valid message from GPS (no time)
udp-packet-forwarder-c2  | WARNING: [gps] could not get a valid message from GPS (no time)
udp-packet-forwarder-c2  | WARNING: [gps] could not get a valid message from GPS (no time)

Why ido both packet forwarders want to access the GPS even though it is disabled in the one? How can a prevent one of the packet forwarders from trying to access the GPS device?

Any help or suggestions would be helpfull

@xoseperez
Copy link
Contributor Author

Solved in 2.2.0.
If the device is not known to have a GPS or HAS_GPS is set to 0 the GPS connection will be disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant