RAK2245 RasPi3 Hat TTN Not Connected

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

Excerpt from /var/log/syslog
Jul 18 15:21:01 tincan ttn-gateway[869]: ### [UPSTREAM] ###
Jul 18 15:21:01 tincan ttn-gateway[869]: # RF packets received by concentrator: 0
Jul 18 15:21:01 tincan ttn-gateway[869]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Jul 18 15:21:01 tincan ttn-gateway[869]: # RF packets forwarded: 0 (0 bytes)
Jul 18 15:21:01 tincan ttn-gateway[869]: # PUSH_DATA datagrams sent: 1 (157 bytes)
Jul 18 15:21:01 tincan ttn-gateway[869]: # PUSH_DATA acknowledged: 100.00%
Jul 18 15:21:01 tincan ttn-gateway[869]: ### [DOWNSTREAM] ###
Jul 18 15:21:01 tincan ttn-gateway[869]: # PULL_DATA sent: 6 (100.00% acknowledged)
Jul 18 15:21:01 tincan ttn-gateway[869]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Jul 18 15:21:01 tincan ttn-gateway[869]: # RF packets sent to concentrator: 0 (0 bytes)
Jul 18 15:21:01 tincan ttn-gateway[869]: # TX errors: 0
Jul 18 15:21:01 tincan ttn-gateway[869]: # BEACON queued: 0
Jul 18 15:21:01 tincan ttn-gateway[869]: # BEACON sent so far: 0
Jul 18 15:21:01 tincan ttn-gateway[869]: # BEACON rejected: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [JIT] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # SX1301 time (PPS): 3060641490
Jul 18 15:22:31 tincan ttn-gateway[869]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [GPS] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # Valid time reference (age: 1 sec)
Jul 18 15:22:31 tincan ttn-gateway[869]: # GPS coordinates: latitude 41.56507, longitude -90.51246, altitude 143 m
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### END #####
Jul 18 15:22:31 tincan ttn-gateway[869]: JSON up: {"stat":{"time":"2020-07-18 20:21:01 GMT","lati":41.56507,"long":-90.51246,"alti":143,"rxnb":0,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0}}
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [up] PUSH_ACK received in 60 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 60 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: Disabling GPS mode for concentrator's counter...
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: host/sx1301 time offset=(1595100600s:365857µs) - drift=-8µs
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: Enabling GPS mode for concentrator's counter.
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### 2020-07-18 20:21:31 GMT #####
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [UPSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets received by concentrator: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets forwarded: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA datagrams sent: 1 (157 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA acknowledged: 100.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [DOWNSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_DATA sent: 6 (100.00% acknowledged)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets sent to concentrator: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # TX errors: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON queued: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON sent so far: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON rejected: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [JIT] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # SX1301 time (PPS): 3090641498
Jul 18 15:22:31 tincan ttn-gateway[869]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [GPS] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # Valid time reference (age: 1 sec)
Jul 18 15:22:31 tincan ttn-gateway[869]: # GPS coordinates: latitude 41.56505, longitude -90.51249, altitude 147 m
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### END #####
Jul 18 15:22:31 tincan ttn-gateway[869]: JSON up: {"stat":{"time":"2020-07-18 20:21:31 GMT","lati":41.56505,"long":-90.51249,"alti":147,"rxnb":0,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0}}
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [up] PUSH_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 60 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### 2020-07-18 20:22:01 GMT #####
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [UPSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets received by concentrator: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets forwarded: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA datagrams sent: 1 (157 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA acknowledged: 100.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [DOWNSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_DATA sent: 6 (100.00% acknowledged)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets sent to concentrator: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # TX errors: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON queued: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON sent so far: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON rejected: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [JIT] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # SX1301 time (PPS): 3120641506
Jul 18 15:22:31 tincan ttn-gateway[869]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [GPS] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # Valid time reference (age: 1 sec)
Jul 18 15:22:31 tincan ttn-gateway[869]: # GPS coordinates: latitude 41.56504, longitude -90.51244, altitude 154 m
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### END #####
Jul 18 15:22:31 tincan ttn-gateway[869]: JSON up: {"stat":{"time":"2020-07-18 20:22:01 GMT","lati":41.56504,"long":-90.51244,"alti":154,"rxnb":0,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0}}
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [up] PUSH_ACK received in 60 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 74 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 62 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: [down] PULL_ACK received in 59 ms
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: Disabling GPS mode for concentrator's counter...
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: host/sx1301 time offset=(1595100600s:365845µs) - drift=-12µs
Jul 18 15:22:31 tincan ttn-gateway[869]: INFO: Enabling GPS mode for concentrator's counter.
Jul 18 15:22:31 tincan ttn-gateway[869]: ##### 2020-07-18 20:22:31 GMT #####
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [UPSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets received by concentrator: 1
Jul 18 15:22:31 tincan ttn-gateway[869]: # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets forwarded: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA datagrams sent: 1 (157 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PUSH_DATA acknowledged: 100.00%
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [DOWNSTREAM] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_DATA sent: 6 (100.00% acknowledged)
Jul 18 15:22:31 tincan ttn-gateway[869]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # RF packets sent to concentrator: 0 (0 bytes)
Jul 18 15:22:31 tincan ttn-gateway[869]: # TX errors: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON queued: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON sent so far: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: # BEACON rejected: 0
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [JIT] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # SX1301 time (PPS): 3150641515
Jul 18 15:22:31 tincan ttn-gateway[869]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Jul 18 15:22:31 tincan ttn-gateway[869]: ### [GPS] ###
Jul 18 15:22:31 tincan ttn-gateway[869]: # Valid time reference (age: 1 sec)

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

Found the link, it may have lost it’s sticky at the top of the forum:

My ttnctl currently reports the same as you for your eui but works for one of mine - can you cross-check it?

Did you register the gateway in TTN Console? Your TTN profile and the API show none, but maybe it’s registered using another account?

Can you show what you see in the Gateway part in TTN Console?

Asides:

@mpmackenna please report back here if someone answers there? I really dislike (hate is a better word) questions being posted in multiple places.

### [UPSTREAM] ###
# RF packets received by concentrator: 0
# CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 0 (0 bytes)
# PUSH_DATA datagrams sent: 1 (157 bytes)
# PUSH_DATA acknowledged: 100.00%

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!
TTN-Console

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.

It may be worth re-installing the gateway firmware: https://downloads.rakwireless.com/LoRa/RAK2245-Pi-HAT/Firmware/ or https://downloads.rakwireless.com/LoRa/Developer-LoRaWAN-Gateway-RAK7244%26RAK7244P/Firmware/ if you are using a Raspberry Pi 4

It will be flying blind, but it may help to get your Feather running as having something to talk to the gateway will assist with debugging.

Is it? Or is that eui-b827ebfffee6cbe6 as per the location, rather than eui-b827ebfffeb39eb3? (I did not check the map.)

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.

@mpmackenna, which URL is the gateway using?

@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.
dummy-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?

That’s for scorching hot days :wink:

DO NOT delete your gateway!

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.

    "gateway_conf": {
            "gateway_ID": "B827EBFFFEB39EB3",
            "server_address": "router.us.thethings.network",
            "serv_port_up": 1700,
            "serv_port_down": 1700,
            "ref_latitude": 41.56032933,
            "ref_longitude": -90.51737891,
            "ref_altitude": 182,
            "gps": true,
            "gps_tty_path": "/dev/ttyAMA0",
            "fake_gps": false,
            "contact_email": "<redacted>@gmail.com",
            "servers": [ {
                    "server_address": "router.us.thethings.network",
                    "serv_port_up": 1700,
                    "serv_port_down": 1700,
                    "serv_enabled": true
            } ]

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.

Yes and they appear correct - the examples you linked to are for the other end of the pipe - where your data comes out.

Can you confirm you are using the Legacy Semtech Packet forwarder on both the gateway and on the console.

It was pretty hot here on Saturday. I would call it a scorcher in my book.

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”}}

For here in the UK, that’s furnace level - I’d have spent the day in the bath.

If you try and create a new gateway using the EUI in your conf file, does the console complain about a duplicate?

1 Like

Yes it does.
gateway-exists

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.

I’ve no more power than you mortals. :wink: Anyone can try to summon, e.g., @KrishnaIyerEaswaran2 or @htdvisser:ghost:

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!

1 Like

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!