What do I need to install on my gateway to use resin.io?

Hi all, I am building a Raspberry Pi 3 with a RisingRF concentrator. My question is do I need to install both the gateway software and the packet forwarder or will the gateway software from resin-io suffice?

Best!
-Jim Roche

I just went thru this a couple weekends ago following this guide, and it did everything for me:

I did have to add a couple other env variables I think from watching the resin.io log, but didn’t take too long at all.

Not sure if you are looking for more a DIY, in which case ignore me.

1 Like

The resin-io package contains the packet forwarder. Don’t forget to read the documentation and set the environment variables so the software gets configured for your hardware and for the TTN settings.

Thanks all…its working but need to figure out how to set the environment variables for US frequencies. Not sure how or where this is done unless I unplug the SD card and put back into my MacBook and copy if that way. But that doesnt sound like a clean way to accomplish this task.

When using resin.io the only time you insert an sdcard into another computer is to write the initial image. Afterwards everything (ok, almost everything) can be done on the resin.io website.

You set the environment variables on the resin.io website. Select the application, next select the gateway and now at the left you should have ‘Device Summary’, ‘Environment Variables’, ‘Device Configuration’ etc. Select ‘Environment Variables’ and add GW_ID with the ‘gateway id’ value in the TTN console and GW_KEY with the gateway key.
In the TTN console make sure to set the frequency plan of the gateway. (Gateway settings)
The software will pull the frequency plan specified in the TTN console using the gateway id and key.

1 Like

You may have to “restart application” on the resin.io website (upper right corner, one of the icons) for the forwarder to pull the config from the ttn console. If i remember right this is only done during startup of the application, or @kersing?

1 Like

You are right, the configuration is pulled when the application starts, now while it is running. In my experience resin.io restarts a container automatically whenever the environment variables are altered but restarting it manually once all settings are in place will not hurt.

ok great I got it figured out with your direction pointed me to this page which explains the steps.

Resin.io documentation

One other question if I may???

Lets assume the source files that built my resin.io is changed on git from my source location… jpmeijers/ttn-resin-gateway-rpi…Will Resin.io know enough to pull down the latest changes from Git from jpmeijers?

No, resin.io will not pull the build files. You will need to ‘watch’ them, update your local repository if anything changes and push the update to resin.io. That way you are in control.
(It will not notice changes to any of the repositories with sources for the packet forwarder either, if you want to keep up-to-date you will need to watch them to. Github sends notifications if you ‘watch’ a repo and new changes are committed)

1 Like

Is there a specific reason one can’t use a cloud repository?

You need to push the code (using git) to resin.io. I don’t know of any cloud solutions offering that option.

Also, what would be the advantage? You need git locally anyway to push modified files to a cloud service, why not directly to resin.io?
(There is no need to publish your build scripts on a public service, but nothing is stopping you as git is perfectly happy to push to multiple repositories)

1 Like

My local repository and ssh keys are gone after a reinstal of the computer i used for it. Basically if i’m going to use jpmeijers installation 1:1 I don’t see much use of manually updating my own repository over and over again. I’d just like to use his github repo as a source for my resin installation.

@TijnOnlijn There is an automated way to push github updates to resin.io, check https://resin.io/blog/travis-ci/. This depends on you ‘owning’ the repository on github because you need to integrate the build system. You could try if this works with forked repositories when you pull the upstream patches using https://www.sitepoint.com/quick-tip-sync-your-fork-with-the-original-without-the-cli/ . However just cloning, pulling and pushing seems a lot less convoluted to me…

Probably, and I guess I will. This may look like a silly problem for skilled developers but both github and the ssh keys are not that easy to use if you’re not really used to it. In particular because I don’t have a Linux system around anymore so I need to translate the tutorial to windows first, which is somewhat annoying when you don’t really know what you’re doing.

I think I’ll manage but since it’ll probably will take a few hours I’d be happy if it could be avoided :blush:

I have good news: Windows works fine too.