Remote Laboratory due to Corona pandemic

Remote Laboratory due to Corona pandemic

Initial situation #

In my current job as laboratory engineer at Hochschule Karlsruhe I supervise some courses for students. For purely theoretical courses it is in most cases no problem to set up an alternative via Skype, Teams or similar software. But there are courses where the students work with Embedded Hardware. In this specific Software Engineering course the students work with a BeagleBone Black and develop on Eclipse in Linux. At the beginning of the course they get a completely prepared Virtual Machine and the hardware. Due to the Corona pandemic it is not possible to hold these courses on site. On one side, the theoretical part can be held with the solutions mentioned above. In addition, the Virtual Machine can be made available to students for download via a server. But on the other hand, the students cannot test their developped software on real hardware. That was the reason to develop a way to provide the students with the hardware over the Internet.

Different Solutions #

In the first attempt I looked at Software for remote access. Generally this a valid solution but you need a development computer with connected hardware for every student that wants to connect. Normally the course would take place in a pool room with sufficient capacity, so that in principle enough hardware would be available. Due to the guidelines it is not possible to install the appropriate software on all these computers. In addition, students would not be able to use their own development environment (from their PC at home), as they work entirely on the remote computer. The connected hardware (BeagleBone Black) can be accessed via ssh. Because of this I developed the idea to enable ssh access to the hardware over the internet. With this solution it would be possible to use your own development environment at home and the hardware can be accessed via the internet. A friend recommended the software Tailscale to me. This software, which is based on WireGuard, allows a direct connection between individual clients. For testing purposes I installed Tailscale on a computer located at the university. After that I was able to connect from my computer at home to the computer at the university via a special IP-Address. After installing and registrating the Tailscale Software you can look up the IP-Adress for every device on a web interface.

ssh <user>@<IP client>

But this is only the first step. I wanted to have direct access to the connected hardware. So I connected the hardware to the computer at the university and started another trial from home. With a so called ProxyJump it is possible to connect directly to connected hardware.

ssh -J <user>@<IP client> <user BBB>@<local IP BBB>

As mentioned above the students work with Eclipse and they are tought to use the build-in Remote Run Configuration to run software on their target. Also in Eclipse it is possible to configure a ProxyJump. In summary, tailscale allows direct access to the hardware from home. With the explained approach with one BeagleBone per computer it is necessary to use many computers at the university. Another way would be to install tailscale directly on the BeagleBone. That would be possible but then you would have to connect the BeagleBone directly to the internet provided by the university. Due to lack of authorization it is not possible to operate the BeagleBone directly at the university network. After searching for other possibilities at the university, I found an open internet access, which is only allowed to certain people. For testing purposes i got access to a router of this network. I found out that this access was even assigned a fixed public IP. So it was possible for me to realize a direct access to the hardware from the Internet with appropriate port forwarding on the router. For security reasons I changed the port for ssh access, disabled root access and assigned a secure password. There is a debian installed on the BeagleBone, so you can make the desired settings within the sshd_config file which is located at /etc/ssh/.

ssh <user BBB>@<public IP> -p <Port Number>

Now it is possible for me to set up a separate user for each student. The users are then distributed to several BeagleBones. For each BeagleBone a separate port must be defined and enabled in the router.