GPS on Cisco Gateway with Chirpstack

Hi,

I am running Chirpstack and I have two gateways. One of my gateways is a Rak Wireless Raspberry Pi node and this provides the GPS coordinates of the gateway and the GPS time since epoch to Chirpstack nicely.

My other gateway is Cisco. The gateway appears to get data from plenty of satellites:

image

Note that I have changed my GPS coords for privacy reasons. The problem is that it feels like this is never passed to chirpstack:

Now it looks like the GPS time since epoch is being passed from the Cisco gateway, through the chirpstack-gateway-bridge to my Chirpstack in the cloud.

image

I would really appreciate it if someone could let me know where I should look to troubleshoot this. My feeling is that perhaps the GPS coordinate format needs to be dealt with in my chirpstack-gateway-bridge, but I cannot see anywhere in that config file that relates to GPS.

Thanks for your time,

Hi @roy_muzz ,
In your Cisco gateway config, do you have these commands?

gps ubx enable

common-packet-forwarder profile
  gps enable

Also, which firmware version are you using?

Regards,
chabral.

Hi @chabral,

Thanks so much for the response. So gps ubx enable was not present so I enabled it:

image

For the first time ever, that gateway went green in the chirpstack dashboard.

image

The issue is, that the location is 0,0 and that gateway is not sending any location data to Chirpstack:

This is a show ver:

image

To provide a bit of context, the Gateway does actually know where it is:

image

For some reason this is just not getting to the chirpstack application server in the the cloud. I run a local chirpstack gateway bridge and that runs basic-station to move the common-packet-forwarder Cisco outputs to the cloud. It feels like maybe that is where things are going wrong.

I have had a look at the logs when I restart the chirpstack-gateway-bridge. I can see that it looks like it is communicating time, but not a location.

Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.049294586+08:00" level=info msg="starting ChirpStack Gateway Bridge" docs="https://www.chirpstack.io/gateway-bridge/" version=3.12.0
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.566964067+08:00" level=info msg="integration/mqtt: connected to mqtt broker"
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.566976671+08:00" level=warning msg="[store]    memorystore wiped" module=mqtt
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.567877651+08:00" level=info msg="backend/basicstation: starting websocket listener" bind="[::]:3001" ca_cert= tls_cert= tls_key=
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.956034359+08:00" level=info msg="backend/basicstation: gateway connected" gateway_id=c4c4deadbeefc4c4 remote_addr="192.168.1.113:44402"
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.958196159+08:00" level=info msg="backend/basicstation: gateway version received" firmware=2.0.5 gateway_id=c4c4deadbeefc4c4 model=cisco package=2.0.5 protocol=2 station="2.0.5(cisco/std)"
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.96130425+08:00" level=info msg="backend/basicstation: router-config message sent to gateway" gateway_id=c4c4deadbeefc4c4
Sep 02 09:05:01 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:01.96980119+08:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="gateway/c4c4deadbeefc4c4/command/#"
Sep 02 09:05:02 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:02.118075792+08:00" level=info msg="integration/mqtt: publishing state" gateway_id=c4c4deadbeefc4c4 qos=0 state=conn topic=gateway/c4c4deadbeefc4c4/state/conn
Sep 02 09:05:06 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:06.508292293+08:00" level=info msg="backend/basicstation: uplink frame received" gateway_id=c4c4deadbeefc4c4 uplink_id=df3337f8-15d9-4f63-8f93-a9acf9a48bc2
Sep 02 09:05:06 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:06.512557143+08:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=gateway/c4c4deadbeefc4c4/event/up uplink_id=df3337f8-15d9-4f63-8f93-a9acf9a48bc2
Sep 02 09:05:09 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:09.647822097+08:00" level=info msg="backend/basicstation: uplink frame received" gateway_id=c4c4deadbeefc4c4 uplink_id=defc1f5f-8455-4ba0-9a6f-27d8a6fc1e09
Sep 02 09:05:09 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:09.648195114+08:00" level=info msg="integration/mqtt: publishing event" event=up qos=0 topic=gateway/c4c4deadbeefc4c4/event/up uplink_id=defc1f5f-8455-4ba0-9a6f-27d8a6fc1e09
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.417005329+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928416594 txtime=4078161049
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.501701396+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928501452 txtime=4078246094
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.587156466+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928586894 txtime=4078331472
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.672432788+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928672155 txtime=4078416839
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.757870202+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928757585 txtime=4078502244
Sep 02 09:05:10 NextMonWiFi chirpstack-gateway-bridge[1618]: time="2021-09-02T09:05:10.843289178+08:00" level=info msg="backend/basicstation: timesync message sent to gateway" gateway_id=c4c4deadbeefc4c4 gpstime=1314579928842995 txtime=4078587621

Thanks so much for your previous response.

Great news! I honestly started a POC with this gateway, and so far I see that for a Cisco product is very immature, lacking basic features like radius and snmp, and with poor documentation.

Anyways, a I can give you some tips I learned while hitting my head with this.

1.This is my cpf profile config with some comments:

common-packet-forwarder profile
ipaddr 10.2.2.203 port 3001
gps enable
antenna 1 omni gain 5 loss 1
antenna 2 omni gain 5 loss 1
gatewayid D34BBDFFFE9E0389
auth-mode none
country Argentina
region-cp AU915
board-freq 921500000
cpf enable
exit

So for the antenna gain and cable loss, I’m using ANT-LPWA-DB-O-N-5 as antennas, and AIR-CAB010LL-N=, and these seems to be the correct values.

Country and Region, apparently do nothing useful and the gateways seems to ignore them. Since I’m using a “900” gateway, it comes with a channel plan for US902 (written nowhere, I discovered it), so I had to put the board-freq command using the middle frequency for our region (so we have 64 channels available, that number is the average frequency of channels 31 and 32, (921400000 + 921600000) / 2).

This gateway has 2 radios, capable of 8 channels each, make sure you configure the gateway-bridge of ChirpStack to indicate the GW which channels you want. Then on the gateway run this command to verify the channel plan at the end:

show common-packet-forwarder log name config 250

Then, make sure you use sensors that allows you to use the channels you configured. I started using a Dragino sensor, I noticed that I was receiving some frames an loosing others, then I configured a parameter to make the sensor use channels 8-15 and I never lost a frame again.

I would recommend (based on my short experience) that on the Service-Profile that you use for this gateway on the GUI on ChirpStack, you enable “Add gateway meta-data” and “Enable network geolocation”. The first will add rssi and snr info to your frames, we consider it useful to give our users info for them to know if their sensors have poor signal (so they don’t ask us). The latter one will probably help you with the map, but anyways I think you need to place the GW on the map and the map will show you a small icon with its GPS location.

I hope this helps you.
chabral.

Thanks @chabral,

So ideally I want my gateway to position itself. I think I can see why it now is reporting at 0,0.

So I ran a:

show common-packet-forwarder log name config 250

show common-packet-forwarder log name config 250
station.conf{
    "radio_conf":[
    {
        "pps": true,
        "board_type": "MASTER",
        "board_rx_freq": 917500000, /* radio RX central frequency in Hz */
        "board_rx_bw": 13000000, /* radio RX bandwidth in Hz */
        "full_duplex": false, /* radio mode */
        "rf_chain_conf":[
        {
            "rx_enable": true,
            "tx_enable": true,
            "rssi_offset": -205.00,
            "rssi_offset_coeff_a": 20,
            "rssi_offset_coeff_b": 2925,
            "tx_lut":[
                { "rf_power": 23, "fpga_dig_gain": 5, "ad9361_atten": 50, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 673 },
                { "rf_power": 27, "fpga_dig_gain": 5, "ad9361_atten": 32, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -14, "ad9361_tcomp_coeff_b": 141 },
                { "rf_power": 10, "fpga_dig_gain": 5, "ad9361_atten": 106, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -16, "ad9361_tcomp_coeff_b": 871 },
                { "rf_power": 12, "fpga_dig_gain": 5, "ad9361_atten": 97, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 911 },
                { "rf_power": 14, "fpga_dig_gain": 5, "ad9361_atten": 88, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 951 },
                { "rf_power": 15, "fpga_dig_gain": 5, "ad9361_atten": 80, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 991 },
                { "rf_power": 18, "fpga_dig_gain": 5, "ad9361_atten": 71, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 1031 },
                { "rf_power": 20, "fpga_dig_gain": 5, "ad9361_atten": 63, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -19, "ad9361_tcomp_coeff_b": 1071 },
                { "rf_power": 22, "fpga_dig_gain": 5, "ad9361_atten": 53, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 805 },
                { "rf_power": 24, "fpga_dig_gain": 5, "ad9361_atten": 44, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -16, "ad9361_tcomp_coeff_b": 540 },
                { "rf_power": 26, "fpga_dig_gain": 5, "ad9361_atten": 34, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -15, "ad9361_tcomp_coeff_b": 274 },
                { "rf_power": 28, "fpga_dig_gain": 5, "ad9361_atten": 25, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -13, "ad9361_tcomp_coeff_b": 9 },
                { "rf_power": 30, "fpga_dig_gain": 5, "ad9361_atten": 16, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -12, "ad9361_tcomp_coeff_b": -257 }],
            "antenna_type": "omni",
            "txpow_adjust": 4.2
        },{
            "rx_enable": true,
            "tx_enable": true,
            "rssi_offset": -205.00,
            "rssi_offset_coeff_a": 20,
            "rssi_offset_coeff_b": 2925,
            "tx_lut":[
                { "rf_power": 23, "fpga_dig_gain": 5, "ad9361_atten": 49, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 673 },
                { "rf_power": 27, "fpga_dig_gain": 5, "ad9361_atten": 30, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -14, "ad9361_tcomp_coeff_b": 141 },
                { "rf_power": 10, "fpga_dig_gain": 5, "ad9361_atten": 103, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -16, "ad9361_tcomp_coeff_b": 871 },
                { "rf_power": 12, "fpga_dig_gain": 5, "ad9361_atten": 94, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 911 },
                { "rf_power": 14, "fpga_dig_gain": 5, "ad9361_atten": 86, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -17, "ad9361_tcomp_coeff_b": 951 },
                { "rf_power": 15, "fpga_dig_gain": 5, "ad9361_atten": 77, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 991 },
                { "rf_power": 18, "fpga_dig_gain": 5, "ad9361_atten": 69, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 1031 },
                { "rf_power": 20, "fpga_dig_gain": 5, "ad9361_atten": 61, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -19, "ad9361_tcomp_coeff_b": 1071 },
                { "rf_power": 22, "fpga_dig_gain": 5, "ad9361_atten": 51, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -18, "ad9361_tcomp_coeff_b": 805 },
                { "rf_power": 24, "fpga_dig_gain": 5, "ad9361_atten": 42, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -16, "ad9361_tcomp_coeff_b": 540 },
                { "rf_power": 26, "fpga_dig_gain": 5, "ad9361_atten": 33, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -15, "ad9361_tcomp_coeff_b": 274 },
                { "rf_power": 28, "fpga_dig_gain": 5, "ad9361_atten": 24, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -13, "ad9361_tcomp_coeff_b": 9 },
                { "rf_power": 30, "fpga_dig_gain": 5, "ad9361_atten": 15, "ad9361_auxdac_vref": 3, "ad9361_auxdac_word": 990, "ad9361_tcomp_coeff_a": -12, "ad9361_tcomp_coeff_b": -257 }]
        }],
        "SX1301_conf":[
        {
            "chip_enable": true,
            "chip_center_freq": 903000000,
            "chip_rf_chain": 0,
            "chan_multiSF_0": { "chan_rx_freq": 902300000, "spread_factor": "7-12" },
            "chan_multiSF_1": { "chan_rx_freq": 902500000, "spread_factor": "7-12" },
            "chan_multiSF_2": { "chan_rx_freq": 902700000, "spread_factor": "7-12" },
            "chan_multiSF_3": { "chan_rx_freq": 902900000, "spread_factor": "7-12" },
            "chan_multiSF_4": { "chan_rx_freq": 903100000, "spread_factor": "7-12" },
            "chan_multiSF_5": { "chan_rx_freq": 903300000, "spread_factor": "7-12" },
            "chan_multiSF_6": { "chan_rx_freq": 903500000, "spread_factor": "7-12" },
            "chan_multiSF_7": { "chan_rx_freq": 903700000, "spread_factor": "7-12" }
        },{
            "chip_enable": true,
            "chip_center_freq": 903000000,
            "chip_rf_chain": 1,
            "chan_multiSF_0": { "chan_rx_freq": 902300000, "spread_factor": "7-12" },
            "chan_multiSF_1": { "chan_rx_freq": 902500000, "spread_factor": "7-12" },
            "chan_multiSF_2": { "chan_rx_freq": 902700000, "spread_factor": "7-12" },
            "chan_multiSF_3": { "chan_rx_freq": 902900000, "spread_factor": "7-12" },
            "chan_multiSF_4": { "chan_rx_freq": 903100000, "spread_factor": "7-12" },
            "chan_multiSF_5": { "chan_rx_freq": 903300000, "spread_factor": "7-12" },
            "chan_multiSF_6": { "chan_rx_freq": 903500000, "spread_factor": "7-12" },
            "chan_multiSF_7": { "chan_rx_freq": 903700000, "spread_factor": "7-12" }
        }],
        "FSK_sync": "C194C1",
        "loramac_public": true,
        "nb_dsp": 1,
        "dsp_stat_interval": 10,
        "calibration_temperature_celsius_room": 22,
        "calibration_temperature_code_ad9361": 77
    }],
    "station_conf": {
        "routerid": "c4c4deadbeefc4c4",
        "euiprefix": "::0",
        "device": "/dev/spidev1.0",
        "log_file":  "/var/log/station.log",   /* "station.log" */
        "log_level": "WARNING",  /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */
        "log_size":  10000000,
        "log_rotate":  3,
        "gps": "/dev/ttyS1",
        "TX_AIM_GAP":"90ms",
        "TLS_SNI": false,
        "pps": "gps"
    },
    "gps_conf": {
        "gw_latitude": 0,
        "gw_longitude": 0,
        "gw_altitude": 0,
        "fixed_altitude": false
    }
}
======================================
station channel plan 
BRD#0: rx_freq_hz=917500000 rx_bw_hz=13000000
SX1301#0: enable=1 rf_chain=0 freq=917500000
SX1301#0 chan  0: enable=1 freq=916800000 bandwidth=3 modrate=126
SX1301#0 chan  1: enable=1 freq=917000000 bandwidth=3 modrate=126
SX1301#0 chan  2: enable=1 freq=917200000 bandwidth=3 modrate=126
SX1301#0 chan  3: enable=1 freq=917400000 bandwidth=3 modrate=126
SX1301#0 chan  4: enable=1 freq=917600000 bandwidth=3 modrate=126
SX1301#0 chan  5: enable=1 freq=917800000 bandwidth=3 modrate=126
SX1301#0 chan  6: enable=1 freq=918000000 bandwidth=3 modrate=126
SX1301#0 chan  7: enable=1 freq=918200000 bandwidth=3 modrate=126
SX1301#0 chan  8: enable=1 freq=917500000 bandwidth=1 modrate=4
SX1301#1: enable=1 rf_chain=0 freq=2147483647

So toward the bottom of that config there is the following.

"gps_conf": {
    "gw_latitude": 0,
    "gw_longitude": 0,
    "gw_altitude": 0,
    "fixed_altitude": false
}

I think this is where Chirpstack is receiving the location from… Now, as before, my Cisco gateway knows where it is, but it seems to be reporting those 0,0 values to Chirpstack.

Cheers

Hi @roy_muzz ,
The gps section of station.conf here is same as yours:

"gps_conf": {
    "gw_latitude": 0,
    "gw_longitude": 0,
    "gw_altitude": 0,
    "fixed_altitude": false
}

In the GUI, under [the organization] → Gateways → Your gateway, are you seeing “GPS coordinates”? I do see them, but not sure if because I place the GW or because it is communicating it.

I just did a quick check, changing the marshaler to json on chirpstack-gateway-bridge.toml and subscribing to the mqtt topic “gateway/d34bbdfffe9e0389/event/stats” and I see that “location” is null:

{"gatewayID":"1K29//6eA5g=","ip":"","time":"2021-09-03T11:51:12.273108983Z","location":null,"configVersion":"","rxPacketsReceived":0,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"metaData":{},"statsID":"sX3JdSXaRzO7h0+GYmo3iA==","txPacketsPerFrequency":{},"rxPacketsPerFrequency":{},"txPacketsPerModulation":[],"rxPacketsPerModulation":[],"txPacketsPerStatus":{}}

Also, I see that you enabled FSK, I haven’t yet, will research a bit more on that as my colleague was asking for that feature but I need to check if it is allowed with the local regulations. Are you using AU925 region as well? As per your channel plan it seems so.

Regards,
chabral.

Thanks @chabral, I am successfully using the AU915 band.

From what I can tell, the only section that seems important is this one

station channel plan 
BRD#0: rx_freq_hz=917500000 rx_bw_hz=13000000
SX1301#0: enable=1 rf_chain=0 freq=917500000
SX1301#0 chan  0: enable=1 freq=916800000 bandwidth=3 modrate=126
SX1301#0 chan  1: enable=1 freq=917000000 bandwidth=3 modrate=126
SX1301#0 chan  2: enable=1 freq=917200000 bandwidth=3 modrate=126
SX1301#0 chan  3: enable=1 freq=917400000 bandwidth=3 modrate=126
SX1301#0 chan  4: enable=1 freq=917600000 bandwidth=3 modrate=126
SX1301#0 chan  5: enable=1 freq=917800000 bandwidth=3 modrate=126
SX1301#0 chan  6: enable=1 freq=918000000 bandwidth=3 modrate=126
SX1301#0 chan  7: enable=1 freq=918200000 bandwidth=3 modrate=126
SX1301#0 chan  8: enable=1 freq=917500000 bandwidth=1 modrate=4

The stuff in ‘’’“SX1301_conf”:[’’’ seems to be ignored.