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

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