Raspberry Pi and its Hardware Random Number Generator (RNG)

Due to a Stackoverflow Post I got to know the fact the BCM2708 / BCM2835 contains a Hardware Random Number Generator (RNG). Two blogposts described how to setup this little module, however, they were outdated, as the needed kernel module is directly baked into the latest 4.x kernel, which ends with the fact that /dev/hwrng already exists :).

The only thing left to do is the installation of the rng-tools, which is easy as pie:

sudo apt-get update
sudo apt-get install -y  rng-tools

After that, we also need to point rng-tools to the right source, by adding

HRNGDEVICE=/dev/hwrng

to /etc/default/rng-tools (need root rights for that :))

After that, the service can be restarted and used:

sudo service rng-tools restart

PS: This RNG seems to be available on all other RPis as well, not only RPi 1 🙂

 

Other articles:

http://scruss.com/blog/2013/06/07/well-that-was-unexpected-the-raspberry-pis-hardware-random-number-generator/

http://fios.sector16.net/hardware-rng-on-raspberry-pi

[Raspberry Pi] Warning - Kernel 4.4.38 breaks boot on RPi 1 & 2

About 14 days ago, RPi Kernel Version 4.4.38 was published. However, something went very wrong somewhere: Raspbery Pi Models 1 and 2 do not boot anymore. As a quickfix I would recommend to download the 4.4.37 Kernel from the Github Repo (https://github.com/raspberrypi/firmware/) and replace the boot Partition on your RPi 1 or 2 SDCard with the /boot path from the 4.4.37 ZIP file - and it should boot again.
If you're RPi is still working - do not update your kernel until this problem is solved! (Issue on Github).

EDIT: Reason for the issue was mostly the open

device_tree=

configuration in the config.txt

Removing this option solved the problem.

Raspberry Pi Pixel - on your x86/x64

The guys over at the Raspberry Pi Foundation - in cooperation with the MagPi Team came up with a cool project: They ported the new "Pixel" desktop from Raspbian over to Debian, so you could use it on your normal x86/x64 machine. The DVD is included in the latest MagPi edition, however, you can also download the DVD from the Raspberry Pi Website, the link is in the article: https://www.raspberrypi.org/magpi/debian-pixel-mac-pc/

PS: Also the "root" directory of the pixel_x86 seems to be: http://downloads.raspberrypi.org/pixel_x86/images/

Raspberry Pi Remote Desktop

To use the RPi via Remote Desktop, different protocols and programs exist, i.e. VNC. Due to simplicity of use, however, I mostly chose XRDP, which works with the Microsoft Remote Desktop Tools. However, you must not install it via sudo apt-get install xrdp - as this will install it with realvnc and break xrdp (Package error which has not been fixed yet in the recent "Pixel" Release of Raspbian...).

Instead, use:
sudo apt-get install tightvncserver xrdp

As it will install tightvnc first and xrdp will use it after that as source. You can then use mstsc on your Windows Machine or any other RDP Viewer to access your RPis Desktop.

PS: Yes, the new Pixel Version of Raspbian does contain an VNC Server which can be enabled very easily via the GUI "Raspberry Pi Configuration" Tool, if you want to use VNC directly without RDP. However, I did chose this way, as the old VNC server installations never worked for me and I got used to this kind of "workaround" (more or less a "works-for-me"(tm) solution)

[Review] Western Digital WD Labs PiDrive 314GB

Today, I want to do my first review on this blog, concerning the Western Digital / WD Labs PiDrive 314GB. I received this nice little drive from the guys over at PiAndMore as a gift for my three presentations at the PiAndMore 9 (among other loot ;)). So, what is this PiDrive and what is so special about it? Well it is in fact a small 2.5 HDD with integrated Sata to USB 3.0 Controller (with the matching "two-piece" connector). It was specially designed by WD to work with the Raspberry Pi Series and gives the RPi 314 GB of space (hence the name PiDrive - however, there is an 1 TB Version available as well).

So what did I get?

pidrive1

The PiDrive itself, a USB Micro to USB A Connector cable, as well as a power brick. Unfortunately, the power brick turned out to be a UK Version, not a German one, so I needed to get an adapter for that. The Brick itself was a beefy (2A@5V) supply, probably meant to power the RPi and PiDrive at the same time.

pidrive2

I loved the "Pi" finish at the package.

pidrive3

The package itself included the PiDrive (wrapped in a antistatic bag, already removed here ;)) and an business card with some tips on "getting started"

pidrive4

The Drive itself - small, lightweight and quite nice to look at.

Ok, after unpacking, I did some "Google Research" as I normally do when it comes to Harddisks and SSDs. A bunch of people (mostly with 1 TB Versions) already explained they were having problems with the Firmware of the Drive and that there already were an update available. So to not get into problems myself, I turned to WDs Support Website (http://support.wdc.com/downloads.aspx?lang=en) and downloaded the "WD Universal Firmware Updater for Windows". I plugged the included USB Micro Cable into the PiDrive and connected it to my Laptop and saw that this Drive also got an *REALLY BRIGHT* white LED as Status Indicator. However, the LED was blinking on/off continuously and I decided that the Drive probably did not got enough juice from the one USB Port. So I combined an old 2.5 HDD cable (USB A to 2x USB A Y Cable) with an USB Micro OTG Cable, so that I got 2x USB A connectors on the one side (which plugged into my Laptop) and the USB Micro connector on the other side, which connected to the PiDrive. Now I got an steady white lit LED - and I could find the Drive in the Device Manager. After I fired up the Firmware Updater, I directly got the info about a new firmware [1.0.12] and got the drive flashed. Everything went fine :).

So, from that point on, I wanted to use the Drive with one of my Raspberry Pis. As I still got some old RPi Model B, v2.0, I tried to give it a try - but it did not work. The LED was just flashing again, and it seems like I would need an active USB Hub or my special cable to get it working [it did also not show up in dmesg or blkid]. Then I realized, that I already had seen a special connector cable from WD (this one: http://wdlabs.wd.com/products/raspberry-pi-accessories/#pidrive_cable) which had sadly not been sent to me. This cable does directly plug into the power brick and does power up the RPi as well as the PiDrive, so that the RPi did not need to supply about 1 A via the USB port to the PiDrive. Bummer.

Next thing I saw, was the max_usb_current=1 which had to be added to the /boot/config.txt on the RPi card. This - however, does only work from RPi+ Modells on onwards (so RPi A+/B+, RPi 2 B) and should not be needed on the RPi 3, as this is already "on by default". Why does this only works on that versions? They got an little Mosfet included there to GPIO 38 which does activate a kind of "high power mode" for the USB controller. So to see wheter your little modification did work, just try gpio -g read 38 and 1 will tell you, that it worked. An lsusb -v 2>/dev/null | grep -e 'MaxPower' -e 'Bus [0-9]' will also tell you, how much power every device on the RPi draws (Thanks to https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=105502&start=25).

So, after I saw that my RPi 3 got its max_usb_current enabled, I rebooted it with the PiDrive attached to the included USB cable. However, the Drive LED did also blink like on the RPi B v2.0, which was really strange. And it did also not show up in the blkid nor in dmesg. So I did unconnect the PiDrive and used an TeckNet 0.3m USB Micro USB cable - and voilá - it worked right out of the box! With sudo blkid I could see my connected drive and did find out that it already had been mounted to /media/USERNAME/WD_PiDrive_314GB.

So, I did not yet do any speed tests and stuff, but I am pretty happy with this little drive. I am really looking forward to play with it a little bit more. Is it worth the price? Probably. I really like WD drives, I make really good use of WD Blues in my Desktops, WD Greens in some Backup Systems and WD Reds in my NAS/Small Servers. I never had any problems with WD Drives and so I am looking forward to a "nice smooth ride" with this HDD (hopefully ;)) as well.

Thanks a lot for Western Digital to giving these PiDrives out :)!

More infos about i.e. the Berry Boot can be found here: http://wdlabs.wd.com/Support/#berryboot / http://www.berryterminal.com/doku.php/berryboot, as well as some nice step-by-step setup in there forums: https://community.wd.com/t/how-to-install-raspbian-on-pidrive-using-windows-pc-step-by-step/134723

[Art] real-time operator

real-time operator was an project of Melanie Windl, an artist from the University of Mainz, Germany on which I helped as technical advisor and programmer. The idea of the project was to live-record sounds from the staircase of the Tokyo Wondersite and replay them using different filters on multiple ballons (using exciters). The project was realised using three Raspberry Pi, Modell B+, some USB Soundcards and PureData. You can find more about the project here: https://atelier-windl.com/portfolio/real-time-operator-2/

Festival / Festival
real-time operator
09.01.-07.02.2016
Tokyo Wonder Site Hongo
2-4 16 Hongo, Bunkyo-ku, Tokyo 113-0033, Japan

real_02

A short video showing the project can be found here