Now that I have a running Kapua instance, its time to look at the network edge to gateways and devices.
Eclipse Kura is a Java/OSGi-based framework for IoT gateways. A gateway is a devices that is distributed at the network edges and communicates with sensor or steering devices using cables, Bluetooth or other private networks.
Sins Kura supports a rather broad range of small devices, my plan is to use a spare Raspberry Pi as gateway hardware.
Unfortunately my old Raspberry PI B is from the first generation, based on the ARMv6 architecture with 512 MB RAM. Therefore I cannot base the OS on Fedora that needs at least Model 2 and ARMv7 or ARMv8 architecture, so that I need to use Download Raspbian for Raspberry Pi for this. I choose the small server set and write that to the SD card:
unzip -p 2017-11-29-raspbian-stretch.zip | sudo dd of=/dev/sdX bs=4M conv=fsync status=progress
Now inserting the SD card into the Pi, connecting LAN and booting. By default, ssh is disabled so I had to connect a keyboard and monitor and do that manually.
Login as user “pi”, password: “raspberry” (this should be changed asap!)
systemctl enable ssh.service systemctl start ssh.service hostname -I
(this will give you the IP address where to connect to.
Now the fun can begin. I typically copy my ssh-key and login from my workstation:
ssh-copy-id ~/.ssh/id_rsa.pub pi@<ip_of_pi> ssh pi@<ip_of_pi>
Now its time to install Eclipse Kura! Get the latest version from here. Since I have the old Raspberry model I choose this one. For the installation I mainly followed the Raspberry Pi Quick Start documentation but I will show the steps here, too.
After booting the Pi several steps are needed on the Raspbian OS: At first, the dhcpcd5 packages needs to be removed:
sudo apt-get purge dhcpcd5
then its useful to install the gdebi command tool to find all dependencies needed:
sudo apt-get update sudo apt-get install gdebi-core
And finally install Java:
sudo apt-get install openjdk-8-jre-headless
Finally, the package can be downloaded and installed:
wget http://download.eclipse.org/kura/releases/<version>/kura_<version>_raspberry-pi-2-3_installer.deb
Note: replace <version> in the URL above with the version number of the latest release (e.g. 3.1.1). Install Kura with:
sudo gdebi kura_<version>_raspberry-pi-2-3_installer.deb
Since Kura will make use of a wifi card to connect to devices, I also inserted a wifi dongle. And now its time for a reboot!
Kura starts up automatically and presents a web UI:
http://<ip-of-pi>
Username: admin Password: admin
That’s it! Stay tuned for the next part: Connecting Kura to the central Kapua instance.
2 replies on “Installing and running Eclipse Kura on a Raspberry Pi B (Model 1)”
This will require UI to get topic, ip etc as input. Can we do it by just command line?
Well, you could use the CLI too:
https://www.eclipse.org/forums/index.php/t/1085315/
HTH,
Ingo