Issue: New installation from a kit purchased from Adafruit. Trying to get a gateway setup on TTN. Everything seemed to go fine but gateway shows as Not Connected in web interface console and in the ttnctl cli. I checked /var/log/syslog and I see what looks like valid communication information but gateway still shows Not Connected.
Setup: Downloaded the Raspbian Image from RAK that was listed in the guide. Followed the information for registering the Gateway.
Details: Including some log information and anything else I can think of that might be relevant. Please let me know what else I can provide that may be helpful.
mike@tincan 03:01:33 0 :~$ ttnctl gateway status eui-b827ebfffeb39eb3
INFO Discovering Router…
INFO Connecting with Router…
INFO Connected to Router
FATAL Could not get status of gateway. GatewayID=eui-b827ebfffeb39eb3 error=Gateway eui-b827ebfffeb39eb3 not found
I was answering in the RAK forum but I’ll move the answer here:
The web console is not reliably showing the connection status, the acid test is are your nodes getting data through your gateway, or is your gateway showing any traffic.
The log, to my less tutored eye than some others on here, looks OK
In your excerpt I don’t see any lines that say valid packets were received. But that’s unrelated to getting that error with ttnctl gateway status eui-b827ebfffeb39eb3.
It’s sticky until one reads or discards it; it’s still sticky when you log out (or try in some incognito window).
Thank you @arjanvanb and @descartes for your response. It is very much appreciated. I marked the other thread as solved. I am not a fan of cross-posting either. I only cross-posted after I received zero response in the other forum after 24 hours or so. Perhaps I was too impatient. I would have deleted that other post but I don’t have permission so I just marked it solved. I am not sure why my account shows zero gateways. It looks properly registered to me. I am including a screenshot. I am still working on configuring my node properly, so it makes sense that no valid packets have been received. I am reading the documentation on how to send test packets from my feather m0 RFM95. If you have links to documentation that you think may be helpful that would be appreciated. I did read the sticky about the console not working properly, that is when I downloaded and attempted to verify with the ttnctl cli. When I received an error with that tool as well I decided perhaps it was time to seek help as I could find no other method to verify my gateway was working. Since it is also my first time configuring a node, I was trying to limit the number of variables when I begin testing the node. Thank you again for your help!
I am not sure how to “cross-check” connectivity. I assume you mean run the ttnctl tool using your eui to verify that a working gateway responds properly in the ttnctl but I am not sure how to find your eui from your forum username. Thank you for your help!
First, don’t sweat the details above, main thing is we’ve only got one place to answer questions - but it was the weekend when we were off doing other things, sunny here, Sunday roast with bottle of Margaux on the patio!
Cross-check in this context was double extra check the EUI you have on the site / using at the command line, yours fails at my end as well, but feel free to check eui-de5ca70000000000.
But of more interest is the continued refusal of the website to show that your profiles has a gateway - particularly as the map on the TTN home page is showing your gateway. Something must have gone wrong with the setup, it may be simpler to add a new one and see if the console complains there is already one registered.
Yes, very much agreed. While gateway Traffic in TTN Console is troublesome, using, e.g., the MQTT API for the device’s data has been rock solid for me. You’ll then also see which gateway(s) received the data. You can test the MQTT setup by simulating an uplink in TTN Console.
@descartes Thank you for your reply. I realize now that I was most certainly too impatient. I should have followed your example and gone to the patio with a drink. My tastes are not as refined as yours are. My drink is more likely to be a Leinenkugel’s Summer Shandy this time of year. Now that we have that out of the way, I did test with your EUI and received positive confirmation that it is working. I was close to deleting my gateway from the TTN but stopped when the console warned me that I would never be able to register the EUI again. I wasn’t sure if EUI’s are generated or if they are hardware specific like a MAC address so I didn’t want to make matters worse if the EUI is specific to the hardware. I am currently using a Rasberry Pi 3 B+ as that is what came with the kit I ordered. I do have a 4 but thought the three was sufficient for the gateway. This is the image I used when I originally configured the Pi. RAK2245_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202.img I did verify the image on the sdcard before booting the pi to it. I could redo it and go through the registration again if you think that would be helpful. If so, should I delete my gateway first?
I am going to try this process to see if I can use the MQTT API for testing as you suggested. I will also work on getting the Feather node running and try the simulating uplink step you linked to. I did try sending an uplink as you suggested in your post but not sure what I am looking for in the data. Perhaps I need to go through the documentation for MQTT API first. I am going to work on that and will let you know how that goes. Again I appreciate all the help.
I am not sure I understand this question. I believe I need to test with the MQTT API to view this URL. I will post back once I get that going.
Here is a screenshot of the “dummy device” I created in an attempt to follow your second link on simulating an uplink.
No, somewhere in the gateway configuration there is a setting for the URL to which the gateway sends the received packets, and its status messages like the following:
According to your logs, the above does succeed. But: where is it sending it to?
The Pi3 is more than adequate (I’ve RAK Pi Zero gateways that work just fine).
It may be worth re-installing as the URL Arjan is referring to is the one the the gateway talks to TTN - it needs to match the one the console page.
However, as ever, I’ve learn’t a new URL to check things and it does look like there may be an EUI entry issue as the location report above reveals a different EUI from the one you quoted.
When I run gateway-config on my gateway and choose “Edit packet forwarder config”, it references the file located at /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json. When I view the contents of that file there is a section at the bottom that has a couple of URLs in it. That section is as follows.
Is that the referenced URL to which you are referring? The examples seemed to indicate that the URL is from a node configuration. I don’t have that set up yet.
This is bizarre. These are my coordinates, but not my EUI. Not sure how that happened.
{“eui-b827ebfffee6cbe6”:{“id”:“eui-b827ebfffee6cbe6”,“location”:{“latitude”:41.56465148925781,“longitude”:-90.51200103759766,“altitude”:206},“country_code”:“us”,“attributes”:{“brand”:“Raspberry Pi based”,“frequency_plan”:“US_902_928”},“last_seen”:“2020-07-20T14:52:32Z”}}
Hmmm, the one in your conf file returns no info on the gateway-data url but there is that other one in the database for your location. Clearly the server has had a ‘moment’.
I think we need to get @arjanvanb to page the back room wizards to de-borf the entries so you can try again with a clean slate.
Beware: we cannot be sure that eui-b827ebfffee6cbe6 is not someone else’s, especially as it’s clearly connected. But eui-b827ebfffeb39eb3 surely seems to be in some troubled state within TTN.
Did you restart the gateway recently? Does the 6cbe6 one go offline when you switch off yours? (Aside: its coordinates and altitude seem to be changing a bit over time, suggesting a GPS.)
Those GPS coordinates point to my house. That is one heck of a coincidence. I think I would know if someone was breaking into my house and setting up a TTN gateway. I will power mine down to see if that change is reflected in the console. Thank you!
Now I have the power - if you’ve got a cheat sheet on the URLs you use for diagnosis, it would save me trawling through previous posts to make sure I’ve got them all!