Follow

Deploying remot3.it services on multiple devices

If you are interested in deploying the same set of remot3.it enabled services onto a number of ARM/Debian embedded devices, e.g. Raspberry Pis, you should use these instructions to edit and run the remot3it_register script included in the weavedconnectd Debian installer package to help streamline setup.  64-bit Debian on Intel/AMD CPUs is also supported.

You MUST clone the SD card PRIOR to registering services, or problems will result.

You will need to edit /usr/bin/remot3it_register to list the services you wish to install on your devices.  For each service, you will need to supply:

  • the Service Type
  • the TCP port to use

By default, remot3it_register assigns names to your device and services using the Ethernet MAC address, the service type, and the port.

Additional details may be found below.

 

 

Supported service types

  • rmt3 - Bulk Service (required) - gives the physical device a name.
  • ssh - secure sockets shell
  • web - http web server
  • vnc - virtual network console
  • tcp - generic tcp service

The rmt3 service sets the “Device name” which is what you see when looking at the “Manage Devices” screen at the remot3.it portal.  It is used when executing scripts but is not used for a connection to a server on your device.

ssh should be specified if you wish to enable connection to the device’s ssh server.  Note that recent versions of the Raspbian operating system do not have ssh enabled by default, so you will need to run the raspi-config utility to enable it.

web should be specified to enable a connection to a http web server on your device.

vnc should be specified to enable a connection to a vnc server on your device.

tcp should be used for all other cases.  You need to know the port number that the service uses.

Prepare the SD card for cloning.

All of your tcp services (e.g. ssh daemon, web server, vnc server) should be pre-installed and set to run when the device boots up.

Check the port assignments for running servers by running the command: sudo netstat -apn | grep tcp | grep LISTEN

Install the remot3it daemon package (weavedconnectd) by:

  1. Confirm that you are using weavedconnectd version 1.3-07z1:

        $ sudo dpkg --status weavedconnectd | grep Version
        Version: 1.3-07z1

    If you need to update the weavedconnectd package, please download and install weavedconnectd_1.3-07z1_armhf.deb following the directions given here:

    https://github.com/weaved/installer/blob/master/Raspbian%20deb/1.3-07/readme.txt

    Note that the Raspberry Pi with Raspbian is an armhf system.
  2. For Intel/AMD systems running 64-bit Debian or a variant such as Ubuntu or Mint, follow the directions at: https://github.com/weaved/installer/tree/master/Ubuntu_deb/weavedconnectd_1.3-07_x86
  3. In order to download files from Github correctly using your browser, click on the highlighted file name, then click, right click or control-click on the “Download” button.  IF you follow the instructions at readme.txt, you can download the file directly onto your target device using the wget command.
  4. This installs the daemon and supporting scripts but does not configure anything yet.
  5. IMPORTANT: check to make sure that there is no file at /etc/weaved/serial.txt.  If there is such a file, delete it.

Edit the file /usr/bin/remot3it_register, using your favorite editor such as vi or nano.  You will need to use “sudo” in order to edit this file, e.g. sudo vi /usr/bin/remot3it_register.

Find the section below.  As supplied, it installs the rmt3 (Bulk Service) and ssh on port 22.  Edit/add additional lines to correspond to the services you wish to install on your devices.  Several lines in the example have been commented out with a # at the beginning of the line.  Remove the # to activate these lines.

# =============================================    

    makeConnection rmt3 65535 "$SERVICEBASENAME-rmt3"

    makeConnection ssh 22 "$SERVICEBASENAME-ssh-22"

#    makeConnection web 80 "$SERVICEBASENAME-web-80"

#    makeConnection tcp 3389 "$SERVICEBASENAME-tcp-3389"

# =============================================    

The SERVICEBASENAME variable is taken from the device’s Ethernet Mac address.  If your unit does not have an Ethernet port, contact remot3.it support for assistance.  This forms the base of the name for the device and all the services.  These names can be edited later if you like.

If you wish to clone the SD card to manufacture multiple units, do it now.

Now for each device you manufacture, you must execute the remot3it_register script using sudo as well as your remot3.it account username and password, as shown below.  We recommend that you DO NOT save your account credentials anywhere on your SD card.  

You should type your credentials in on the command line as shown below, or use a script sent over a network to the device’s /tmp folder (so that it will get erased on power off or reboot).

Some details, such as the installer Version and Platform, may differ from the listing shown.

user@e-mail.com is your remot3.it account e-mail.

password is your remot3.it account password.

user@ubuntu:~/Downloads$ sudo remot3it_register user@e-mail.com password

remot3.it connection installer Version: v1.3-07_x86_OEM lib_v1.3-07_x86

Modified: February 01, 2017 (library) February 01, 2017

Platform =  i686

Serial = fc:aa:14:75:29:04-nmGoing1yzSaHRVwpGxK

SERVICEBASENAME = fc:aa:14:75:29:04

.........

Registering fc:aa:14:75:29:04-rmt3.......

.........

Registering fc:aa:14:75:29:04-ssh-22.......

.........

Registering fc:aa:14:75:29:04-web-80.......

.........

Registering fc:aa:14:75:29:04-tcp-3389.......

Confirming that it works

This is part of design verification and strictly speaking does not have to be performed in manufacturing, unless you get an error during the previous step.  To confirm all of the daemons are running:

user@ubuntu:~/Downloads$ !ps

ps ax | grep weaved

4722 ?        S      0:00 /usr/bin/weavedconnectd.i686 -f /etc/weaved/services/Weavedrmt365535.conf -d /var/run/Weavedrmt365535.pid

4739 ?        S      0:00 /usr/bin/schannel.i686 -f /etc/weaved/schannel.conf -d /var/run/schannel.i686.pid

4876 ?        S      0:00 /usr/bin/weavedconnectd.i686 -f /etc/weaved/services/Weavedssh22.conf -d /var/run/Weavedssh22.pid

5026 ?        S      0:00 /usr/bin/weavedconnectd.i686 -f /etc/weaved/services/Weavedweb80.conf -d /var/run/Weavedweb80.pid

5180 ?        S      0:00 /usr/bin/weavedconnectd.i686 -f /etc/weaved/services/Weavedtcp3389.conf -d /var/run/Weavedtcp3389.pid

       5196 pts/1    S+     0:00 grep --color=auto weaved

Go to your account at remot3.it and confirm the device is shown:

Click on the device name to open the Device Services dialog.   On this screen, you can edit the device or service name by clicking on the pencil icon.

Click on the highlighted Service name to open a connection to that service, for example, SSH:



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.