Can't add to gateway system

Hello, I am enjoying the system at the moment .
But I have struggled to get devices to add to a gate way. I have added virtual device following the instructions but it does not appear in the “System for this gateway” of the gateway.

I have tried to do the same by connecting the RPi as a client. I press “connect device” where a copy past of my token, jwt token and wget … if my IP. I copy and paste this into my pi, but the mender conf doesn’t appear to have the IP in it. I know I must add the system ID part into the conf somewhere so currently playing with this but struggling.
I apricate any and all help, and please speak to me like an idiot, can never be too condescending with me :slight_smile: :rofl:

Hi @roborto1999,

Thanks for reaching out. Let’s just try to take it one by one, probably we’ll need a couple of iterations.

First the gateway is only helpful if you need an exposed host which can relay between a segregated network and a Mender backend instance. This means you need at least two devices:

  • device 1, which can reach a Mender management host (lets assume https://hosted.mender.io), and is also reachable from the segregated network. Let’s assume it has IP address a.b.c.d.
  • device 2, which can reach the gateway device at address a.b.c.d, but not the management host.

I will assume that you are using two Raspi-style devices running a mender-converted image, not a custom Yocto-built OS or similar.

So you would connect device 1 to the Mender instance first, and verify it is functional. After that, promote it to gateway, by clicking the corresponding button in the remote terminal tab.

After that you set up device 2, using the mender setup (or mender-setup, depending on version) command, and instead of pointing it to the Mender backend, you enter a.b.c.d as the server URL.

Then the gateway should relay the communication between device 2 and the backend.

Greetz,
Josef

Thank you for your reply.

I do indeed have 2 RPi 400’s. Both set up following the starter guide.

The first is set up as a gateway. with IP a.b.c.d . I have WIFI enabled on this device. When plugged into ethernet I get the IP x.y.z.w. Now it is a Gateway, I sometimes have the IP a.b.c.d but sometimes a completely different: b.f.g.t.

I have a different RPI which is NOT WIFI enabled. I have plugged this into the ethernet and able to set up the device to monitor and trouble shoot. I then plugged this ethernet into the other PI. Therefore, the gateway has WIFI but the client is only connected to the gateway.

Now following instructions, I ran mender-setup and placed the IP a.b.c.d where server is requested. However, when I check the mender.conf the ServerURL is still hosted.mender.io ect. Am I doing something wrong perhaps in this set up. I was thinking maybe it should be the ethernet x.y.z.w IP instead.

Additionally, I have tried to put the IP directly into the conf file. Should this be ’ “ServerURL” : “http://a.b.c.d” ’

Thankyou for your help, sorry if it is too basic.

– UPDATE–
I have managed to get the client device to be in the gateways system :).

So I have 1 device connected to internet via WIFI. I have a second device connected via ethernet and no WIFI. I can see the client terminal through the ‘troubleshooting add-on’ This is perfect.

However, when trying to update said device the process doesn’t seem to be as I was expecting.
I select Gateway device.
I select system.
I select “create deployment for system” .
The " Select a device group to target" states RPI400Gateway(System).
This to me would mean that the RPi client which is in the system will be updated, perfect.
HOWEVER, when I press “view the devices” that this will apply to, the link is back to the gateway. When the update is then run, the target device is the gateway, not the system.

So I thought, maybe I must select the client device and put the update through, and it will automatically go through the gateway. However, this update gets stuck on “downloading” with error log “Host not found (non-authoritative)”, try again later. Which makes semi sense as the device isn’t connected to the server but the gateway

I would be grateful for any help. Rob

1 Like

Hi @roborto1999,

I tried to replicate the setup at least roughly, and I think the “system” aspect is confusing here. Not sure how it is meant to come into play.

The straightforward way is to just control the gatewayed device directly through the dashboard. You should be able to inspect its inventory, open the remote terminal and deploy to it just as if it was connected to Hosted Mender directly.

Greetz,
Josf