Raspberry Pi is a good solution for creating low-cost, powerful embedded devices when you have no need of self powered solution.
I had to create a such device recently to make a programming machine for my IoT devices. I was looking for a compact solution, powered with PoE, industrial grade, able to run a Java program and host a custom HAT with my home-made chip programmer.
Here you see a picture of the first prototype of this product with the different components visible: The green board is a Rapsberry Pi compute module CM3+ with 16GB eMMc flash drive. The blue motherboard is a Waveshare PoE board for CM3+. The Black board is my custom HAT hosting the programming solution based on a STM32.
In this post, I’ll detail a bit these different components and the way they are configured to illustrate how to easily make a such system alive.
This post is describing how to setup a Mongo Db database in a clustering mode. I choose to deploy 3 replica set on 3 different bare metal server running centos 7 and to add 1 arbiter to reduce vote problem during a server crash or reboot.
You will find the different steps to make this configuration running, the way to secure it in a vlan and to activate the authentication.
I also added some elements on the way to backup it. Feel free to propose enhancement and links in the comments.
You may have read some of my post about RF433 and Raspberry PI. Basically with RPI 1, I was using wiringPi interrupt handler to manage the RF433 decoding. The problem is that with RPI2 and RPI B+ the delay to take an interrupt that was becomes unpredictable. And the timing constraints are not respected. As a consequence part of the messages are loss because for these delay.
One of the solution (the software one) is to be more efficient to proceed the interrupts and the way to do this is to compile a kernel driver for directly handling the interrupts. This is what this post is about. This comes to complete the RFRPI code and associated hardware. A complete source code and software for using it is on the rfrpi bitbucket repository.
Challenge of the coming days : write a kernel driver to manage interruption quicker on a raspberry pi 2. I’m happy to find a lot of example on Internet and in particular this one, that is really looking like what I’m trying to do. This post is describing all the step needed to do this.
The new version of kernel now activate the device-tree standard, it means that instead of having all module activated by default with some stopped by a blacklist system, now, all are disable and activated only when described in a device tree.
Device tree details the system architecture and dependencies following configuration files. The device tree can be owned by the shield itself in an attached eprom.
As a consequence, now, i2c / spi are not activated by default. So if you need to activate it on startup. For this, edit /boot/config.txt and add line at the end like :
dtparam=i2c_arm=on # for i2c 1
dtparam=i2c_vc=on # for i2c 0
CentOS 7 have selinux activated, so when you decide to change your default httpd directories you have to give the right selinux permission to these directories otherwize the https server will not be able to access the files.
CentOs 7 have a built-in configuration to close the inactive ssh session. In term of security it is a good thing but when killing a session after 1 minute of inactivity start to be a mess when you have multiple session opened in parallel.
This can be avoid on the client side by configuring a keep-alive period on the client side. To activate a such keepalive, you just have to connect with the following command line:
ssh -o ServerAliveInterval=5 firstname.lastname@example.org
This will configure client to send a NULL packet every 5 seconds to keep the session opened.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.