https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT

Hello there
I created a python code that is supposed to send packets to a certain gateway with a certain EUI, it’s based on the packet forwarder in the link .
I got some data online and created my own stat and rxpk packets.
I have this line in my code "packet = bytes(2) + token + bytes(0) + binascii.unhexlify(“i have my gateway eui in here”) + data2 + data1 "
packet is the packet I’m sending to the eu.routers , the bytes(2) is the protocol version , the token is a random value of bytes, bytes(0) is the push_data identifier, plus the gateway eui in bytes , and finally my stat and rxpk packets.(data2 and data1).
I kept sending the data many times and I noticed on wireshark that I got a response once which I’m assuming is the push _ack , however I only received it once and not again without changing anything in my code.
I’ve tried pinging the eu.routers “52.169.76.203” and got no responses, but with ttn.opennetworkinfrastructure.org Switzerland (EU 433 and EU 863-870) got a ping should I switch and does it matter (I live in Egypt) .
My question is how can I receive an ack again (and again I did spam sending packets to the address I did not know whether it causes some consequences or not)

The TTN servers are behind a load balancer so you will not get a response to pings… sorry!

1 Like

Do you have a real gateway to test with?
You could look at the packets created by the real one and compare to your generated packets.

Or you could run the TTN stack locally and monitor the logs.

Have a looksy at the TTN stack udp handlers and tests.

1 Like

No, unfortunately I do not own a real gateway.

You are trying to emulate a packet forwarder in Python? Have you checked the LoPy nanogateway code? (The hardware target is unable to function as a packet forwarder, however the software seems to do a decent job of forwarding data to TTN)

When sending packets to TTN you need to keep in mind that that infrastructure is being used by thousands of people for their sensor data. Your attempts could interfere with that use.
Because in the past some people caused issues as well the TTN backend has some precautions in place to prevent specific issues from happening. One of them is a rate limiter, if you send too many packets in a short amount of time your IP will be blocked for some time.

BTW, please use the name gateway for a device between a node and the backend, not for the backend which you are referring to.

2 Likes

Yes this is what I’m mainly working on.

Could you please explain more ?
Thank you

Please check a diagram of components in a LoRaWAN setup, there are nodes, gateways and a backend. The software you are working on seems to impersonate a gateway and connect to the backend, not connect to a gateway. In your first message you write ‘ send packets to a certain gateway with a certain EUI ‘. The remainder of the message implies you are sending messages to the backend, not to a gateway. This is confusing for readers of the message.