Not receiving MQTT message for Gateway status topic

I’m new to MQTT and I try to subscribe to gateway status topic from my local running typescript program but it doesn’t receive any message for gateway status topic at all. This program also subscribe to another topic and messages for that topic is properly received. I login to TTN console to check gateway information and found that gateway status is published every 30 seconds. I thought it maybe because of permission problem, so I added Grant all current and future rights to API Key of Application but still no message for gateway status topic have received.
This is the topic I use to subscribe to gateway status v3/<gateway-id>@ttn/status. I get gateway-id from TTN console.



Additional Info:
I found that there is no View gateway status right in API Key for Application but Gateway and Organization’s API Key. So I generated Organization’s API Key with Grant all current and future rights and tried to connect with <Organization ID>@ttn as an username and Organization’s API Key as a password but rejected. So I Tried to connect with <Application ID>@ttn as an username and Organization’s API Key as a password then it was successfully connected but still having same result. Receiving only messages for another topic but message for gateway status is still not received :frowning:

There is no such thing as a “gateway status” topic on our MQTT API. The documentation lists the different topics you can subscribe to.

The “Live data” for gateways that you see in the Console is retrieved using the Events API, which is a gRPC API (with an HTTP SSE API trough our gRPC gateway). These kind of events are not and will not be available over MQTT.

In here it talks about “gateway status” topic. I cannot subscribe to it? Or to subscribe to it, I need to let my gateway publish v3/<gateway-id>@ttn/status topic first? then I can subscribe to it?

That is for gateways that use MQTT to send messages to the Gateway Server rather than using Packet Forwarder or Basic Station software. It’s between the gateway & the TTI stack only.

1 Like

I wrote a Java program to connect to the gateway event API, receive events and log them to a CSV file. This is not MQTT though. Basically it receives the same kind of events that you see in the gateway live view in the console. Perhaps that can help/inspire you to create what you need. Code is at:

To read the event stream, you need the id of the gateway and an API key with permission ‘Read gateway traffic’.

1 Like

There are two other API but they are more basic information around gateways.


This is to find all gateways from latitude & longitude with in a distance (distance units is meters)[latitude]=53.57500181643252&distanceWithin[longitude]=-2.4573224889439444&distanceWithin[distance]=15000&netID=000013&tenantID=ttn



This is to get a bit of details of a gateway.,tenantID=ttn,id=g-s3-testgw042-ttig-bl3-hp10


1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.