Gateway (Rak 7249) Last seen: Never

Hello,

I’ve recently stood up Chirpstack via Docker. For a test I’ve moved a gateway I had on the TTN network over to my new Chirpstack instance. However, the gateway is not coming up on the Chirpstack site. When I do as tcpdump of port 1700 I see data from my gateway.

21:02:39.502194 IP 10.144.112.194.50238 > chirpstack : UDP, length 220
E…@.8…~
.p.
…>…)…`…vb.{“stat”:{“time”:“2024-06-25 04:02:39 UTC”,“lati”:,“long”:,“alti”:916,“rxnb”:6,“rxok”:3,“rxfw”:3,“ackr”:100.0,“dwnb”:0,“txnb”:0,“cpur”:0.0,“memr”:0.0, “gps”:“”, “utc”:“1719288159”}}

Next I’ve subbed to MQTT via mosquitto_sub -v -t “+/gateway/#” and also see data from my gateway there:

mosquitto_sub -v -t “+/gateway/#”
us915/gateway/60c5a8fffe7662ed/state/conn 60c5a8fffe7662ed

us915/gateway/60c5a8fffe7662ed/event/up
4�H.‘���>r���s��M�m�ub�b���@hٰ=��!��
O���@�’���1��ց�
�� (*M
60c5a8fffe7662ed��
nj�����"
ّ������0���������=33@Hj
?’ �
us915/gateway/60c5a8fffe7662ed/event/statsˌ� =
ףp@@�i��&�[��@ (�ց�z

Any idea on what to try next or look for? Everything I see tells me this should be working.

chirpstack-gateway-bridge:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
ports:
- 1700:1700/udp
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
environment:
- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/event/{{ .EventType }}
- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/state/{{ .StateType }}
- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/command/#
depends_on:
- mosquitto

chirpstack-gateway-bridge-basicstation:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
command: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-us915_1.toml

It looks like the stats messages are being sent so the gateway should show online. Are you receiving the packets from the device in the events tab?

If you subscribe to the MQTT topic:

mosquitto_sub -v -t “#”

You should be able to see the MQTT messages under “application/” which are the messages after they have been processed by Chirpstack, and use that to determine whether Chirpstack has acknowledged the gateway/uplinks yet.

Since this is a brand new setup, I don’t have any applications setup. I was testing to see if my gateway comes online first.

mosquitto_sub -v -t “#”
Error: Invalid subscription topic ‘“#”’, are all ‘+’ and ‘#’ wildcards correct?

Use ‘mosquitto_sub --help’ to see usage.

Must have had a typo:

mosquitto_sub -v -t “#”
us915/gateway/60c5a8fffe7662ed/state/conn 60c5a8fffe7662ed
us915/gateway/60c5a8fffe7662ed/event/up
��jvD�r7�,�^B�K$^�������
��(*L
60c5a8fffe7662ed�5
���ػ�v"
�����ܠv0���������=��@Hj’�4t�
us915/gateway/60c5a8fffe7662ed/event/stats��� ��N�`@@e6�$�[�8�@ (����z

��(�60c5a8fffe7662ed
us915/gateway/60c5a8fffe7662ed/event/up
@���D�c8��#0�)�j��s���
��(*O
60c5a8fffe7662ed��
����ä"
��������0���������=A@Hj)̀

Should this section be us915 or us915_1 ?

  • INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/event/{{ .EventType }}
  • INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/state/{{ .StateType }}
  • INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=us915/gateway/{{ .GatewayID }}/command/#

OR

  • INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=us915_1/gateway/{{ .GatewayID }}/event/{{ .EventType }}
  • INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=us915_1/gateway/{{ .GatewayID }}/state/{{ .StateType }}
  • INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=us915_1/gateway/{{ .GatewayID }}/command/#

us915_1 is the correct prefix. It also looks like the stats and uplinks are coming through fine, can you share photos of the events tab of the device and the events of the gateway through the UI?

One thing I messed up when configuring us915_1 for the first time is that Chirpstack uses 0-indexing for its subbands though typically for gateways / devices they use 1 as the first subband, if that is the case for you do you have your devices / gateway on us915 subband 2?

Looking back now, it seems that your gateway bridge was sending us915 topic prefixes, maybe changing that to us915_1 would be enough to solve the issue?

What do you mean? Sorry, I’m still new to setting up chirpstack.

use this ^ these are MQTT topics, the “topic prefix” is just the us915 vs us915_1

Oh, yeah I’ve already tried doing that, but it had no effect.

In your chirpstack.toml do you have us915_1 enabled?

  enabled_regions=[
    "us915_0",
    "us915_1",
  ]

this ^

Also please share the device and gateway events in the UI, if any.

From when you did this command, the gateway is posting the MQTT messages, but Chirpstack is not posting the typical “application/” messages back into the broker after it processes the messages. So probably chirpstack is not seeing these messages, most likely here that is because the topic prefix was us915. It would be worth doing the command again with the proper topic prefix us915_1

[ec2-user@chirpstack chirpstack-docker]$ mosquitto_sub -v -t “#”
us915/gateway/60c5a8fffe7662ed/state/conn 60c5a8fffe7662ed
us915/gateway/60c5a8fffe7662ed/event/up
��]�L�)9�~5f�щ�����
��
(*K
60c5a8fffe7662ed��
������"
��������0���������=���jUȢ�
us915/gateway/60c5a8fffe7662ed/event/up
@��D��;��!M3x�eUzVV�g����
��
(*L
60c5a8fffe7662ed�v
���Ȩ�"
��������0���������=��T�@jV9���

Like I said though, I don’t have any actual applications with devices attached yet. I was working on getting the gateway up and working before I run out with a device to try and connect.

Ah I see, the topic prefix is still wrong though. It should be us915_1 and make sure you have that enabled in the chirpstack.toml


Once you do that, If you go here can you see the messages?

hmm,

I don’t see a reference to topic in chirpstack.toml

[ec2-user@chirpstack chirpstack]$ grep -i topic chirpstack.toml
[ec2-user@chirpstack chirpstack]$

I see us915_0 and _1 under regions though.

Enabled regions.

Multiple regions can be enabled simultaneously. Each region must match

the ‘name’ parameter of the region configuration in ‘[[regions]]’.

enabled_regions=[
“as923”,
“as923_2”,
“as923_3”,
“as923_4”,
“au915_0”,
“cn470_10”,
“cn779”,
“eu433”,
“eu868”,
“in865”,
“ism2400”,
“kr920”,
“ru864”,
“us915_0”,
“us915_1”,
]

# Network related configuration.
[network]

  # Network identifier (NetID, 3 bytes) encoded as HEX (e.g. 010203).
  net_id="000000"

  # Enabled regions.
  #
  # Multiple regions can be enabled simultaneously. Each region must match
  # the 'name' parameter of the region configuration in '[[regions]]'.
  enabled_regions=[
    "us915_0",
    "us915_1",
  ]