Gateway discovery documentation

I stumbled over the Gateway discovery feature.
Is there any documentation about this topic?
How it works?

In the gateway screens I see this:

The configuration parameters are mentioned at the bottom of: https://docs.loraserver.io/lora-app-server/install/config/

What it does:
When correctly configured, each gateway broadcasts a periodical ping (received by other gateways nearby). This data is collected and rendered as a map, visualizing the signal strength of each receiving gateway.

I noticed the command line options too but configuring in the config-file is unclear in the documentation.

–gw-ping - enable sending gateway pings [$GW_PING]
–gw-ping-interval value - the interval used for each gateway to send a ping (default: 24h0m0s) [$GW_PING_INTERVAL]
–gw-ping-frequency value - the frequency used for transmitting the gateway ping (in Hz) (default: 0) [$GW_PING_FREQUENCY]
–gw-ping-dr value - the data-rate to use for transmitting the gateway ping (default: 0) [$GW_PING_DR]

What are, if there is one, syntaxes of the settings above in the config file?

–gw-ping is “GW_PING=60” in the config file for a ping at a interval at 60 seconds?
–gw-ping-frequency “GW_PING_FREQUENCY=868100000” in the config file for a frequency?

Thansk for your help.

Cu, Remko

Example:

lora-app-server --gw-ping --gw-ping-interval 24h --gw-ping-frequency 868100000 --gw-ping-dr 5

What’s the best way to add those parameters?
Can I add them in the end of the “/etc/default/lora-app-server” file ?

1 Like

Yes but then you need to use the environment variable name, see for example:
https://github.com/brocaar/lora-app-server/blob/master/packaging/deb/default#L62

1 Like

Great! thats the information I was looking for.
Thanks,
Cu, Remko

1 Like

Hi,

I configured accoriding to the previous post my lora app server on two local gateways I have in my workshop.

# enable sending gateway pings
GW_PING=true

# the interval used for each gateway to send a ping (default: 24h0m0s)
GW_PING_INTERVAL=1h0m0s

# the frequency used for transmitting the gateway ping (in Hz)
GW_PING_FREQUENCY=868100000

# the data-rate to use for transmitting the gateway ping
GW_PING_DR=5

After 24 hours running I find no change in information. See below.

Can you tell me where to look for debug info or what could have gone wrong?

Thanks in advance.
Cu, Remko

First place to look would be the logs :slight_smile:

To dive a bit deeper, you could look at the last_ping_id and last_ping_sent_at fields in the gateway table and at the gateway_ping and gateway_ping_rx records (LoRa App Server database).

I lookd in to the database but all fields are empty:
afbeelding

Did you add the config to /etc/default/lora-app-server? Also, did you restart LoRa App Server?

yes,

When I verified I found that the last command I entered was to restart loraserver so I cannot confirm that I restarted lora-app-server while I intended to do so.

I have restarted lora-app-server and I do see now a map.

Thanks for your help. I will now further look in to it.

When I verified I found that the last command I entered was to restart loraserver so I cannot confirm that I restarted lora-app-server while I intended to do so.

I have restarted lora-app-server and I do see now a map.

I think that was a no then :wink:

2 Likes

@brocaar I have observed that when I add 4 gateways to loraserver gateway discovery does not “start” on the new added gateways although I checked the box.

Is there any reason why this could happen?
Do you have a suggestion where to start for finding out what goes wrong?

Are they within reach of each others?

I lookd in to the database but all fields are empty

Are these values present for these gateways?

Yes, 3 gateways are seen by all others. The other 4 are not seen by any gateway

I looked in the database and pings are sent accoring to the values:
afbeelding

In that case, it looks like these gateways were unable to transmit (you might need to look at the packet-forwarder logs) or the other gateways were unable to receive (out of range?).

That is not the case. they have all line of sight to each other.

We will look in to that.

For debugging you might also be interesting in https://github.com/brocaar/lora-gateway-bridge/tree/gw_ack_and_tmms. This branch will be released soon and will publish packet-forwarder ACKs as JSON over MQTT. E.g. see https://github.com/brocaar/lora-gateway-bridge/blob/gw_ack_and_tmms/docs/content/use/data.md#gatewaymacack.

1 Like

Looking forward to testing this branch because verifying gateways is not an easy task when you have to administer them remotely trough resin.io.