Connecting RAK2287 gateway to TTN

Issue: RAK2287 won’t connect to TTN as a gateway

Setup: Raspberry Pi 4 Model B Rev 1.1, OS “10 (buster)”, 4.19.97-v7l+.
RAKWireless gateway RAK2287 version 4.2.3R install from firmware.
Gateway ID: DCA632FFFExxxxxx.

Server: TTN

Details: I’ve followed all the instructions here ( to connect my RAK2287 to TTN as a gateway. Unfortunately I don’t get the “Connected” in the TTN console. What might the issue be?

Thanks for your help.

Dear aal7,
Can you ensure that your RAK2287 is successfully connected to the Internet? Please tell me your connection method.

Hi @Nicholas

My RAK2287 is connected to the internet using an ethernet cable between it and a switch on my network. I ran sudo gateway-config and set the RAK2287 to an IP address on my network (using option 6).

I can ssh into the RAK2887 from a PC on my network and, having done that, I can ping external ip addresses such as and

It seems to have internet access (I think!)


Dear Aal7,
You can try ping

I have tried ping
It says “Temporary failure in name resolution”.
I’m guessing that’s not a good sign!

Ms Google came up with:

Those may not be the correct instructions for a RAK system image

Maybe, the downloaded firmware didn’t do DHCP out the box, so who knows how it deviates from the base Raspberry Pi OS - it was literally the first hit on Google as a gentle nudge towards asking our automated knowledge friend.

I’m just clearing my desk to try out mine to see what the crack is.

Dear Aal7,
I have a mistake ! You can try ping commonly used Web sites!
Please feedback the result to me!

Best regards!

Thank you @nmcc, I am connected now. The issue is the DNS setting (or, more specifically, the lack of DNS setting).

There are five lines at the bottom of the dhcpcd.conf file which say:

# WARNING:Do not delete or modify the following 5 lines!!!
# RAK_eth0_IP
interface eth0

(the xxx’s are mine!)

The reason you can’t edit these lines manually is that they are edited automatically by the gateway-config utility which is supplied as part of the SD card image (when you select option 6):

The problem seems to be that when you use Option 6 it sets ip_address and routers in dhcpcd.conf but does not set the dns address (domain_name_servers). There is nothing else in the dhcpcd.conf file which sets domain_name_servers either, so I assume all dns requests are unresolved, hence my ability to ping and but not or

To fix this I have added a line earlier in the dhcpcd.conf file which sets the dns address to the IP address of another Pi in my network, which is running pi-hole:
I assume I could equally set this to or or any other public dns server.

As soon as I did that and rebooted the RAK2287, the TTN page reported “Connected” for my gateway almost immediately.

I have used my node to send a message successfully through my RAK2287 and I can see it on my TTN console for both my gateway and my node.

Thanks to you all for you help. Have RAK forgotten about the dns server in their SD card image and gateway-config utility?

Do you mean DNS rather than DHCP?

No, meant DHCP - which can / is generally configured to provide DNS settings as well as the IP address.

1 Like

Does the RAK2287 keep a log of the packets it has forwarded? If so, where could I find it?

The hardware product that is the RAK2287 certainly does not.

The default software / pi system image offered for it may well log something - most packet forwarders log at least the fact that a packet has been received, but they may or may not log the actual payload base64 string, and log rotation typically means even what they do log will not be there eternally.

The typical legacy location is /var/log/syslog though on a systemd based system you should perhaps access it via sudo journalctl and variations for examining different portions of the history.