PyGate connect to The Things Stack v3 Community Edition

I am trying to connect my PyGate to The Things Stack community edition ( without luck.

Downloaded the global_conf.json from the v3 console, followed the Pygate (as close as possible) and the pygate logs do not contain any errors. But shows up as disconnected in the console and no traffic.

Unit works fine on the old ttn, but does not want to connect to the v3 stack. I see the v3 stack has removed the legacy forwarder, this is probably an issue. Do I need to set up the PyGate as a Basic Station and will a GPy be able to handle this with the memory limitations?

Anyone had any luck with this?

The UDP protocol used by PyGate is fully supported by V3.

As far as I know there is no BasicStation support for PyGate. Where did you find an implementation?

Have not found a Basic Station implementation, was reading through some v3 setup guides and the Basic Station kept popping up. So there should not be an issue connecting my PyGate to the v3 stack.

Managed to get it working, my error was to use the Gateway ID from the console when the I needed to add a Gateway EUI and use this as the gateway_ID in the config.json.

Seems to be working

Hopefully you are using a valid EUI as in one you ‘own’ and not something semi random that might conflict with an other gateway later on? The MAC address of a networked device you own is a great starting point. Just insert ff:fe in the middle.

Greetings. I have been running the Pygate on v2 and now trying to move to v3. I have some pretty basic questions as my understanding is still very limited… but if someone can help me, would be great. Is the Gateway EUI the same for v2 and v3? I have tried using the same as I have been having in the v2 in v3 and also adding the fffe to the middle but to no use, not connecting. The EUI that I am using is a self-invented one, and not something that came with the Pygate. Again, please be gentle with me, I might have big gaps in understanding the different EUIs even if I got the v2 working. Also, I do not understand why the v2 keeps working (connected to TTN) even if I have changed the address (…) and even if I try changing the EUI in the config.json - once again this must be a pretty basic issue but I am really more enthusiastic than skillful…

It has been a while since I did this but these are my notes on getting a PyGate up a running og the v3 cluster.

It is mostly following Pygate guide with a few modifications for the v3 cluster.

  • Create a gateway in the v3 console
  • Download the Global configuration from the gateway overview page in the console
  • Add the gateway_ID stuff to the bottom of the downloaded global_conf.json file as described in the PyCom guide
  • Change downloaded global_conf.json to config.json
  • Add a Gateway EUI in the console, I used the GPy´s mac address and added ff:fe in the middle to avoid using a semi random that might conflict with an other gateway later on.
  • Use the Gateway EUI (not the human readable Gateway ID from console) as the gateway_ID in the config.json
  • Reboot and it seems to be working

Hope this makes sense, if not let me know and we will figure it out together. We all had to start somewhere :slight_smile:

1 Like

Thank you, much appreciated! I think I am able to do the things you describe. But still the question that can I (or should I) use the same Gateway EUI as with the v2, or should I use a different one, and can invent it myself (With the ff:fe). Do I need to have one set of config.json and files for the v2 and another one for the v3, or as I am migrating, am I simply modifying the existing v2 files? Sorry these must be basic questions :smiley:

I do not see any good reason for reusing the v2 EUI or invent your own. The reason for using the PyCom chip´s MAC is that it is unique in the world and will hopefully save you from problems if someone invents the same gateway EUI.

I would just get the PyCom chips mac address and pad the middle part ff:fe in the middle to ensure the EUI is unique.

To get the Pycom chip´s MAC just run something like the code below on your PyCom device, I think.

import ubinascii

1 Like

Apologies @Vaajakoski, I seem to have avoided answering your entire question. I would just start fresh with new v3 PyGate code and config files following the guide.

I see no real reason to keep anything from your old v2 installation. Good luck

Greetings! I got it working, the v3. I am sure not many are as beginners as I am but the reason was that I “saved” the changes to the config.json file and thought that will do the trick, and did not “upload” them. Once I uploaded, it worked… Thanks again!