Today we are going to introduce the start kit of the LightBlue Bluetooth BLE solution from Punch Through. The two devices currently available are linked via BLE.

Bean and Bean+ (Potato and Potato Evolution?) are all through a fundraising platform, and then through a series of research and development, production, testing, and finally mass production of products, basically placed at the end of last year to ship, probably also lasted for half a year .

The biggest difference between Bean and Bean+ is that it supports the I/O and the Grove interface, and the rechargeable battery from the original Bean is replaced by a rechargeable lithium battery. The biggest difference, I think, is that Bean did not provide a quick interface before, even if you have to use it, you must first prepare a soldering iron, and then use the node you need to solder before you can use it.

In terms of software, the Bean series can be developed through any platform, and even the program can be modified through the mobile phone, which can be said to be very convenient to use. As for Bluetooth’s most important profile, it also supports multiple types, including:

  • iBeacon: Support Apple’s iBeacon
  • MIDI: Import MIDI signals into the Bean
  • HID: It can be controlled via wireless keyboard, mouse, and even through the Bluetooth gamepad that supports HID.
  • ANCS: Can receive iOS messages, similar to iWatch
  • OBSERVER: used to send messages to a variety of different devices

Let’s start integrating Bean/Bean+ into NAS!

Before you start to connect with Bean/Bean+, you need to prepare the BLE USB device. Here I am using the BLE device from SENSE. Remember to have the BLE (Bluetooth LE) function!

If you want to determine if there is a successful installation, you can go to the NAS through SSH and use lsusb to list the current USB devices. Currently I am using “Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)”

[~] # lsusb

Bus 001 Device 002: ID 8087:8008 Intel Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 002: ID 8087: 8000 Intel Corp.

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Bus 003 Device 003: ID 067b: 2303 Prolific Technology, Inc. PL2303 Serial Port

Bus 003 Device 004: ID 1005:b155 Apacer Technology, Inc.

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

After confirming that the USB is properly installed, install the hopper + Node-Red docker image. The image of this link is mainly the version that has been completed by the required Bean SDK and Node-Red (link contains relevant teaching).

It is important to note that the image can not be directly deployed through the management page of the Container Station. The image is directly generated by the following commands. The most important thing is to pass-through the information of the USB-related device to the image. .

[~] # docker run -t -i –name qbean_test –cap-add=SYS_ADMIN –privileged –net=host -v /dev/bus/usb:/dev/bus/usb -v /run/dbus :/run/dbus -v /var/run/dbus:/var/run/dbus jarvischung/qbean bash

After creating the completed image, you can open Node-Red via http://your-nas-ip:1880 and you can see the LightBlue Bean Node-Red module that has been installed by default. As you can see from the node module below, Bean/Bean+ presets support the functionality of temperature, tri-axis, and RGB LED sensors, as following.

In addition to the related modules already installed, in order to quickly obtain the UUID related to the current Bean/Bean+ device, you can create a good BLE via Node-Red via http://your-nas-ip:1880/bleScan/ The Scan API gets information about existing devices.

After calling this API, it takes about 30 seconds to wait. If USB BLE and Bean/Bean+ are properly enabled, you will basically get information about the Bean/Bean+ related device (this API does not list non-Bean/Bean+ devices).

After getting the UUID of the Bean/Bean+ device, we need to start setting up the Bean node. The following figure shows the page of the newly added Bean node. The UUID part is the information that has just been obtained through the BLE API. The Connection part has two modes:


  • “connection on event”: Represents the connection of Bean/Bean+ when there is an event. (In this way, you also need to set the time of Timeout, that is, how long after the event ends, the time will be automatically disconnected).
  • “constantly connected”: Once deployed, Bean/Bean+ will be wired directly and will not be disconnected.

Why are there two ways to connect?

Mainly BLE Although power saving, after all, not every situation needs to make startkit in working mode, this way can also make Bean/Bean+ more power-saving!

The following figure is a direct use of Node-Red flow, you can quickly get the temperature sensor information built into the Bean/Bean+ device.

Change the node of another triaxial sensor to get the information right away.

If you want to change the color of the RGB LED on the Bean/Bean+ device, you can change the RGB LED color by directly changing the inject node to red string. The supported formats are:

  • Format 1: The string to be sent to node can have “Red”, “Green”, “Blue” and “Off”
  • Format 2: The string sent to node can be a combination of RGB values, for example: 0,255,255 or 255,0,255

Does it feel that NAS integration start kit is very convenient! In the future, we will share more Bean/Bean+ related device applications, like:


  • How to easily use Bean/Bean+ via mobile phone
  • How to customize scratch, it is more convenient to get information about other sensors

Synchronized at: I’m RD.

Related posts

Leave a Reply