Setting up your Hexabus

Bernd Lietzow edited this page Jan 9, 2013 · 5 revisions
Clone this wiki locally

Setting up your Hexabus

You just got some Hexabus devices and want to play with them? Great! This page shows you some basic steps you need to take in order to get everything up and running.

Network Setup

Hexabus devices communicate on a wireless network using 6LoWPAN on 868MHz. This network is not compatible with the WLAN you might already be using, that's why you need the Hexabus USB Stick. This stick gives a PC or router the capability to communicate with a Hexabus network.

Quick-and-Dirty: Direct connection from a PC

You can plug the stick directly into your PC. The steps necessary for such an installation are described under "Connect PC Directly".

Such a setup has several disadvantages:

Only this one PC has direct access to the Hexabus network. If you have more than one PC or other devices connected to your home network (say, a Raspberry Pi, an Android phone, ...) you need to set up routing software on your PC, and the PC has to be up and running whenever some device wants to communicate with the Hexabus.

Therefore, plugging a Hexabus USB Stick directly into a PC or laptop is only recommended for testing and debugging purposes.

Note: The PC with the USB stick does not have to be running if the Hexabus devices only want to communicate amongst each other. It is only needed for sending packets to the Hexabus network from the outside, or receiving Hexabus packets outside of the Hexabus.

More sophisticated: Connect via an OpenWRT router

A more convenient Hexabus setup involves a wireless router. Read on how to set this on the page "Routing Hexabus packets".

If you set up your Hexabus like this, your wireless router will take care of routing packets between your Ethernet, WLAN and Hexabus networks, and any device connected to it will be able to communicate with the Hexabus.

Keep in mind that before a Hexabus device is part of a Hexabus network, it has to be paired with the USB stick belonging to that network. To do this, press the button on the stick with a Hexabus PairingDevice until the red light starts flashing. Now press the button on the Plug until the red light starts flashing. After a few seconds, both the light on the plug and the one on the stick should flash green a few times. Your Hexabus devices are now paired and ready to communicate with each other.

hexabus pairing device

All devices (Plugs and others) paired to the same stick can also communicate amongst each other.

Software setup

Once your Hexabus network is in place, you can start installing the software.

First you should install the basic Hexabus tools that come with the libhexabus package. Their installation and use is described here: libhexabus.

With those tools, you can control your Hexabus devices from your PC, or record the data broadcast by them.

If you want to use the Hexabus as a home automation system, you might want to have a look at the Hexabus Compiler and Hexabus Assembler. These tools can be used to write programs which run on the Hexabus devices themselves, making them autonomously react to network broadcasts. Their use is described under Hexabus Compiler.

If you have an Android phone or tablet connected to your WLAN, you could have a look at the Hexabus Android client located in the sb-hexadroid branch of the git repo!