UDP does't send any data

Hi, I build a gateway by RHF0M & Raspberry pi. when I execute program by local ip, it’s OK. but when I use static IP or TTN’s URL, it does’t send any data by UDP, RPI’s internet connection is OK. also when I test this command, packet send successfully:
sudo nc -u 1700 test.txt
but when I change IP to static IP it does’t work.
please help me.

Where exactly are you setting the IP address or TTN URL?

How are you determining that is has not sent any UDP traffic?

when I test this command, packet send successfully:
sudo nc -u 1700 test.txt

What does the ability of a program that is not a packet forwarder to send a udp packet to a destination that is not a TTN server but something on a local subnet have to do with it?

I modify global_conf.json for change IP address.
when I enter local port, I can see the status packet:


but when I enter TTN URL, status does’t update.(Gateway ID is correct)
I think this problem is due to RPI’s inability to send UDP on the Internet, because as I said, when I send UDP packet manually to my IP static (I test the static IP. it’s OK) I can’t receive it.

Again, how are you determining that is has not sent anything to the remote server???

What exact syntax of what exact tool running on which exact host are you using to make this determination?

If UDP send, why gateway status does’t update?

If you mean the TTN console, I suspect that only updates when the gateway actually submits heard LoRa packets.

The status message you quote shows none received.

Do you have a node running in range of the gateway? If not you likely need to set one up.

(If you wanted to actually see that it is sending UDP traffic, you could run tcpdump or tshark on the pi, or on a router connecting it to the Internet. You cannot however run it on another host on the local subnet, as most modern network topologies don’t send traffic in a way that uninvolved hosts would see. You could also run the packet forwarder under strace, though as it is multi-threaded that may get a little messy)

No, when I use another gateway, it send a alive message to server about every 1 minutes.It does not depend on whether the nodes are sent or not.

As it would seem does the gateway in question - in fact most do.

But that doesn’t mean the TTN server pays any attention to the stats messages, versus those which actually contained uplinked LoRa packets.

You’ve yet to do anything which demonstrates that this is a failure to send UDP packets

As you said, It’s better that first I run tshark after that I will tell you the result. thank you

There are different types of alive messages and TTN does not update the status for one and it does for the other. Have you set fake gps and location information for this gateway? If not do so and check the status again.
BTW, the packet forwarder log should clearly show if there are poll responses, if there are poll responses logged the gateway is connected just fine.

1 Like

Dear Jac
I know that the UDP packet sent successfully and it return ACK packet.(by checking wireshark thanks for @cslorabox )
how can I set a fake GPS information? in which file?

Which model of RHF0M and which software are you using?

RHF0M301 model

Which file to change needs which software please …

I use this software.

Then use fake_gps and the coordinates in local_conf.json, the same file you configured the unique id. There are plenty of examples if you google, for instance this one.

It solved.
thank you Jac

I thought that fake_gps should (almost) never be used? At least, in May 2017 @htdvisser wrote:

It is the only way to force the right status packet to be transmitted to TTN for some packet forwarders. The non GPS version of the status packets somehow does not change the last seen status for the gateway. (Resulting in it not being reported on-line)

1 Like