Using Python, Gatttool and Bluetooth Low Energy with Hexiwear

Now I can use the data on the Hexiwear over BLE with the gatttool (see “Tutorial: Hexiwear Bluetooth Low Energy Packet Sniffing with Wireshark” and “Tutorial: BLE Pairing the Raspberry Pi 3 Model B with Hexiwear“). This article is taking things a step further and uses a Python script on Linux to access the sensor data on the BLE device:

Accessing Hexiwear Sensor Data with Python

Accessing Hexiwear Sensor Data with Python

Continue reading

Advertisements

VNC Server on Raspberry Pi with Autostart

The Raspberry Pi is a versatile mini computer: as such I can use it with USB keyboard, mouse and HDMI LCD monitor. But having multiple keyboards and mouse on my desktop is not my thing: somehow I always grab the wrong one. So what I prefer is to run the Raspberry with VNC (Virtual Network Computing). That way I have the Linux GUI as a window on my normal desktop, and no messing up with keyboards and mouse 🙂 :

Raspberry Pi on my Dekstop

Raspberry Pi on my Dekstop

Continue reading

Hexiwear with Raspberry Pi and OpenHAB Home Automation

This is yet another milestone on my journey to combine the Hexiwear with the Raspberry Pi: now I can send take over control of the Hexiwear with openHAB running on the Raspberry Pi:

Controlling Hexiwear with OpenHAB

Controlling Hexiwear with openHAB

Continue reading

Tutorial: Hexiwear Bluetooth Low Energy Packet Sniffing with Wireshark

For a university reasearch project I try to pair the Raspberry Pi 3 with a Mikroelektronika Hexiwear using BLE (Bluetooth Low Energy). Most of things worked after a lot of trial and error, but at a certain point I was stuck trying to write to send data from the Raspy to the BLE device.The Hexiwear BLE protocol description is very thin, so I ended up using a BLE sniffer to reverse engineer the protocol with Wireshark.

Sniffing BLE Packets between Raspy and Hexiwear

Hardware setup between Raspy and Hexiwear

Continue reading

Tutorial: BLE Pairing the Raspberry Pi 3 Model B with Hexiwear

The Hexiwear (see “Hexiwear: Teardown of the Hackable ‘Do-Anything’ Device“) is a small and portable sensor node with built-in BLE (Bluetooth Low Energy) transceiver. In a research project we try to use multiple Hexiwear in a classroom environment and to collect sensor data on a Raspberry Pi. The Raspberry Pi 3 Model B running Linux has an on-board BLE transceiver too, so why not binding them (wirelessly) together?

Raspberry Pi 3 connected with Hexiwear over BLE

Raspberry Pi 3 connected with Hexiwear over BLE

Well, things seemed easy at the beginning, and as always, there are many things to learn on a journey like this…

Continue reading

openHAB RGB LED Light Cube with WS2812B and NXP Kinetis

From my earlier work to use the NXP Kinetis with openHAB (see “Controlling NXP Freedom Board RGB LED with openHAB and Raspberry Pi“) it was only a small step to control a 20x20x20 cm light cube with 256 Adafruit WS2812 NeoPixels:

Kinetis RGB Cube with openHAB

Kinetis RGB Cube with openHAB

Continue reading

Controlling NXP Freedom Board RGB LED with openHAB and Raspberry Pi

In “Blinky LED with openHAB on Raspberry Pi” I have used openHAB on a Raspberry Pi to control an LED attached to the Pi, and in “Controlling NXP Freedom Board RGB LED with openHAB and Raspberry Pi” I have explored how to connect a NXP Freedom Board over USB CDC to the Raspberry Pi. In this article I’m going to combine both: to control the LED on a NXP Freedom board remotely with openHAB on the Raspberry Pi.

ColorPicker with openHAB and FRDM-KL25Z

ColorPicker with openHAB and FRDM-KL25Z

Continue reading

USB CDC with the Raspberry Pi

For my home automation project with openHAB I want to attach Freescale (now NXP) FRDM (Freedom) boards so they can take care about the realtime aspects and to act as gateways to my other systems. One way is to use USB CDC (Serial over USB) as communication channel. USB has the advantage that it powers the board, plus I can attach multiple devices: up to four on the Raspberry Pi 2 and even more with using a USB hub. In a standard configuration with a USB WiFi and a USB HID (mouse plus keyboard) dongle I still can attach two Freescale (ahem, NXP) Freedom boards to the Raspberry Pi:

FRDM-K22F and FRDM-K64F attached to Raspberry Pi 2

FRDM-K22F and FRDM-K64F attached to Raspberry Pi 2

Continue reading

Blinky LED with openHAB on Raspberry Pi

In my earlier post I showed how I have installed the open source openHAB home automation system (see “Installing openHAB Home Automation on Raspberry Pi“). In this post I show how to control a local LED on the Raspberry Pi with openHAB home automation system: how to control any GPIO pin on the Raspberry Pi from remote:

Controlling the LED with openHAB

Controlling the LED with openHAB

Continue reading

Autostarting openHAB on Raspberry Pi

In “Installing openHAB Home Automation on Raspberry Pi” I have set up openHAB on a Raspberry Pi 2. But when I reboot it, I need to start openHAB manually. This post is about how to start openHAB automatically after a reboot.

openHAB running

openHAB running

Continue reading

Installing openHAB Home Automation on Raspberry Pi

I’m currently building a home automation project around Raspberry Pi: I want to be able to monitor and control things like the lights, garage doors and the heating system both at home and from remote. I already have added a touch screen to one of my Raspberry Pi 2 computers (see “Adding a Touch LCD to the Raspberry Pi 2“). This article is about how to install the openHAB on that Raspberry so it can be the brain of the automation system.

openHAB Demo House on Pi

openHAB Demo House on Pi

Continue reading

From Zero to NOOBS: Starting with Raspberry Pi Zero

My Raspberry Pi Zero arrived last week (see “A Raspberry Pi for $5! What are your decision factors?“), and finally I have found an hour to try it out. Because the ‘bare board’ $5 version was sold out at that time, I ordered a package with 8GB SD card, micro USB cable and mini HDMI adapter. That way I had all the needed cables, including the mini HDMI adapter cable:

Raspberry Pi Zero

Raspberry Pi Zero

Continue reading

A Raspberry Pi for $5! What are your decision factors?

It it is obvious that a new trend from the US is swapping over to Europe and probably the rest of the world: Black Friday. That is the day yesterday following Thanksgiving day in the United States. It is a ‘shopping’ day. Consequently, the stores are battling with huge discounts. And I use that  to fill up my inventory for the Christmas-time projects 🙂 What caught my attention yesterday Friday was this: a Raspberry Pi Zero for US$5!!!!

Raspberry Pi Zero

Raspberry Pi Zero (Picture: Adafruit)

Continue reading