Global distribution of a program


#1

Hello,
let’s say I have developed a program that runs on the raspberry pi and I want to distribute it to a number of customers around the world. Moreover I want them to get the latest updates of my program whenever I develop a new feature.
From the resin.io dashboard, if I create a new application, before downloading the resinOS I need to specify the network by selecting between ethernet or wifi. So for the wifi option, does it mean that I must provide the wifi details of each customer’s wifi network and upload it to each customer’s raspberry pi myself?
What if the customer is in another country and this is not possible?

Finally on the dashboard I will be seeing a number of devices for the same application.
So if I develop a new release, will all devices be automatically updated by issuing the command “git push resin master” or I need to do it separately for each device?

Thank you for your support.


#2

@stratosb

for the wifi option, does it mean that I must provide the wifi details of each customer’s wifi network and upload it to each customer’s raspberry pi myself?

You have a few options here. In order of user-friendliness:

  • You can embed resin-wifi-connect in your application. This project starts up a wifi hotspot when it can’t connect to the internet, and users can join the hotspot and add their wifi credentials, and the device will automatically reconfigure itself to use them.
  • You can add code to your application that knows - potentially by communicating with the customer, or checking in some database you manage - how to connect to its local network, and reconfigures the device itself to do so on startup. Be careful doing this - it’s easy to break a device’s connection to the internet during configuration and fail to recover, if you’re not careful, and that will effectively lock you out of the device entirely, as it will never come back online.
  • Your customers can mount the SD card of the device on their computers, and install & use resin-cli which includes a resin local configure command that can reconfigure a connected device with new settings.
  • Your customers can mount the SD card of the device on their computers, and edit the network configuration by hand in the system-connections folder there.

I’d strongly recommend the 1st option, if that works for you, as it’s the easiest, most user-friendly and most reliable. The others may be useful in some specific cases though.

I develop a new release, will all devices be automatically updated by issuing the command “git push resin master” or I need to do it separately for each device?

Yes, when you git push code to an application, the resulting build is distributed to all devices in the application.