mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
60 stars 30 forks source link

GPS PPS Not Working #42

Open tkerby opened 3 years ago

tkerby commented 3 years ago

I'm using an IMST Lite gateway with an upgraded Pi and I've attached the PPS in on the IC880a board to the PPS output from a USB GPS.

In the docker-compose file, I set GW_GPS to true but when the gateway starts, it shows PPS capture as disabled

basicstation | 2021-11-02 17:25:59.407 [RAL:VERB] SX130x LBT not enabled basicstation | 2021-11-02 17:25:59.407 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled) basicstation | 2021-11-02 17:26:02.468 [RAL:VERB] Concentrator started (3s60ms) basicstation | 2021-11-02 17:26:02.468 [S2E:INFO] Configuring for region: EU863 -- 863.0MHz..870.0MHz

Any ideas how to get PPS up and running?

tkerby commented 3 years ago

I think this is because the GW_GPS environment variable doesn't update the gps and pps options in https://github.com/lorabasics/basicstation/blob/master/examples/live-s2.sm.tc/station.conf

Should be

{
   "station_conf": {
     ...
     "gps": "DEVICEFILE" | "FIFO"
     "pps": "gps" | "fuzzy"
   }
}

We probably need an environment variable to point to the gps device on the Pi and then to set pps to gps mode. Perhaps GW_GPS should be false or the device address?

mpous commented 2 years ago

Hello @tkerby I never looked at the GPS variable. Feel free to suggest a solution :)

tkerby commented 2 years ago

See the time synchronisation configuration in https://doc.sm.tc/station/conf.html

We want to set pps to gps and point the gps variable to the port the gps is connected to

E.g.

“gps”: “/dev/ttyUSB0”, “pps”: “gps”,

It would be good if we could make both of these available through the docket conf

tkerby commented 2 years ago

I think gw_gps should either be false or the gps device path and we perhaps need another gw_pps variable that allows us to enable the pps from a gps or fuzzy source

mafrmt00 commented 2 years ago

In the v2 image from (https://github.com/jpmeijers/ttn-resin-gateway-rpi.git) there already was a env variable GW_GPS_PORT so this would be a good name for compatibility.