{"id":48,"date":"2018-03-15T14:04:27","date_gmt":"2018-03-15T14:04:27","guid":{"rendered":"http:\/\/boernig.de\/wordpress\/?p=48"},"modified":"2018-03-19T09:20:01","modified_gmt":"2018-03-19T09:20:01","slug":"installing-and-running-eclipse-kura-on-a-raspberry-pi-b-model-1","status":"publish","type":"post","link":"http:\/\/boernig.de\/wordpress\/2018\/03\/15\/installing-and-running-eclipse-kura-on-a-raspberry-pi-b-model-1\/","title":{"rendered":"Installing and running Eclipse Kura on a Raspberry Pi B (Model 1)"},"content":{"rendered":"<p>Now that I have a running Kapua instance, its time to look at the network edge to gateways and devices.<\/p>\n<p><a href=\"https:\/\/www.eclipse.org\/kura\/\">Eclipse Kura<\/a>\u00a0is 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.<\/p>\n<p>Sins Kura supports a rather broad range of small devices, my plan is to use a spare Raspberry Pi as gateway hardware.<\/p>\n<p>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\u00a0<a class=\"jive-link-external-small\" href=\"https:\/\/www.raspberrypi.org\/downloads\/\" target=\"_blank\" rel=\"nofollow noopener\">Download Raspbian for Raspberry Pi<\/a>\u00a0 for this. I choose the small server set and write that to the SD card:<\/p>\n<pre>unzip -p 2017-11-29-raspbian-stretch.zip | sudo dd of=\/dev\/sdX bs=4M conv=fsync status=progress<\/pre>\n<p>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.<\/p>\n<p>Login as user &#8220;pi&#8221;, password: &#8220;raspberry&#8221; (this should be changed asap!)<\/p>\n<pre>systemctl enable ssh.service\r\nsystemctl start ssh.service\r\nhostname -I<\/pre>\n<p>(this will give you the IP address where to connect to.<\/p>\n<p>Now the fun can begin. I typically copy my ssh-key and login from my workstation:<\/p>\n<pre>ssh-copy-id ~\/.ssh\/id_rsa.pub <a class=\"jive-link-email-small\" href=\"mailto:pi@%3Cip_of_pi%3E\">pi@&lt;ip_of_pi&gt;<\/a>\r\nssh pi@&lt;ip_of_pi&gt;<\/pre>\n<p>Now its time to install Eclipse Kura! Get the latest version from <a href=\"https:\/\/www.eclipse.org\/kura\/downloads.php\">here<\/a>. Since I have the old Raspberry model I choose <a href=\"http:\/\/www.eclipse.org\/downloads\/download.php?file=\/kura\/releases\/3.1.1\/kura_3.1.1_raspberry-pi_installer.deb\">this one<\/a>.\u00a0 For the installation I mainly followed the\u00a0<a href=\"http:\/\/eclipse.github.io\/kura\/intro\/raspberry-pi-quick-start.html\">Raspberry Pi Quick Start<\/a>\u00a0documentation but I will show the steps here, too.<\/p>\n<p>After booting the Pi several steps are needed on the Raspbian OS: At first, the dhcpcd5 packages needs to be removed:<\/p>\n<pre>sudo apt-get purge dhcpcd5<\/pre>\n<p>then its useful to install the gdebi command tool to find all dependencies needed:<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get install gdebi-core<\/pre>\n<p>And finally install Java:<\/p>\n<pre>sudo apt-get install openjdk-8-jre-headless<\/pre>\n<p>Finally, the package can be downloaded and installed:<\/p>\n<pre>wget <a class=\"jive-link-external-small\" href=\"http:\/\/download.eclipse.org\/kura\/releases\/&lt;version&gt;\/kura_&lt;version&gt;_raspberry-pi-2-3_installer.deb\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/download.eclipse.org\/kura\/releases\/&lt;version&gt;\/kura_&lt;version&gt;_raspberry-pi-2-3_installer.deb<\/a><\/pre>\n<p>Note: replace &lt;version&gt; in the URL above with the version number of the latest release (e.g. 3.1.1). Install Kura with:<\/p>\n<pre>sudo gdebi kura_&lt;version&gt;_raspberry-pi-2-3_installer.deb<\/pre>\n<p>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!<\/p>\n<p>Kura starts up automatically and presents a web UI:<\/p>\n<pre>http:\/\/&lt;ip-of-pi&gt;<\/pre>\n<pre>Username: admin\r\n\r\nPassword: admin<\/pre>\n<figure id=\"attachment_49\" aria-describedby=\"caption-attachment-49\" style=\"width: 840px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"size-large wp-image-49\" src=\"http:\/\/boernig.de\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054-1024x576.png\" alt=\"Eclipse kura screenshot\" width=\"840\" height=\"473\" srcset=\"http:\/\/192.168.178.2\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054-1024x576.png 1024w, http:\/\/192.168.178.2\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054-300x169.png 300w, http:\/\/192.168.178.2\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054-768x432.png 768w, http:\/\/192.168.178.2\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054-1200x675.png 1200w, http:\/\/192.168.178.2\/wordpress\/wp-content\/uploads\/2018\/03\/Selection_054.png 1759w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-49\" class=\"wp-caption-text\">Screenshot from Eclispe kura running on Raspberry Pi B<\/figcaption><\/figure>\n<p>That&#8217;s it! Stay tuned for the next part: Connecting Kura to the central Kapua instance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that I have a running Kapua instance, its time to look at the network edge to gateways and devices. Eclipse Kura\u00a0is 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 &hellip; <a href=\"http:\/\/boernig.de\/wordpress\/2018\/03\/15\/installing-and-running-eclipse-kura-on-a-raspberry-pi-b-model-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing and running Eclipse Kura on a Raspberry Pi B (Model 1)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,5,4,7],"tags":[],"_links":{"self":[{"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/posts\/48"}],"collection":[{"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":3,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":54,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/posts\/48\/revisions\/54"}],"wp:attachment":[{"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/boernig.de\/wordpress\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}