BeagleBone
OpenHAB ++
the name is my.openhab.org
The next step in the BB+Debian+OpenHAB story.
[code lang=”C”]
Apache2 configuration for the ports:
/etc/apache2/ports.conf
Apache2 configuration of the virtual host:
/etc/apache2/sites-available/default
OpenHAB configuration for the ports:
/etc/default/openhab
[/code]
BB+Debian => port 8080 web server root folder: /var/www is the Apache/2.2.22 (Debian) Server
I changed the OpenHAB port to 8888 because I use the Apache2 8080.
but… the org.openhab.io.myopenhab___ addon sends the requests to http://localhost:8080/
…after some errors i changed the OpenHAB back to 8080 and the Apache2 to some other port.
next: get HABDroid or Apple iOS equivalent. Of course check if Java version is 1.7
The HABDroid is incredibly fast!!!
Some links:
https://play.google.com/store/apps/details?id=org.openhab.habdroid&hl=en
https://my.openhab.org/openhab.app?sitemap=yoursitemap.here fill it with one of the sitemaps that is on the running OpenHAB installation
BeagleBone + OpenHAB + Debian: two weeks note
Two weeks of testing the Demo OpenHAB Server configuration on a Debian powered BeagleBone:
Tons of power-off reboots and all works fine.
Only one time it refused to connect to the outside world.
Stability: 5/5
Security: 5/5
(I finally found the documentation https://github.com/openhab/openhab/wiki/Security + added the Android App + cut the port forwarding)
OpenHAB + BeagleBone + Debian
12.2016 Update:
Due to the new debian images and new openhab versions, some users had problems with the whole procedure:
The main changes are:
- After SD creation, the BB takes some minutes for the first boot. Wait until you can see the browser page (see router for DHCP assigned IP Address).
- At the first ssh login cahnge the password for both root and debian users
- The partition (there is only one, mmcblk0) is 3.3GB. Using the fdisk default options you screw things up because the starting point is 8192.
- Use resize2fs only after rebooting.
- Install java (now is oracle-java9-install)
- Install openhab
- Make another account at myopenhab.org
I will make another post with the new versions for all this stuff if needed.
OpenHAB setup on a Debian powered BeagleBone (white)
OpenHAB is simply great!
Create the microSD:
http://beagleboard.org/latest-images/
http://beagleboard.org/project/debian/
Resize the partition (the image is with a 1.6GB, I use a 8GB microSD):
[code lang=”C”]
fdisk -l
# show partitions
fdisk /dev/mmcblk0
# delete the 1.6G partition (p2)
# and create a new one from the same starting point to the end of the disk
shutdown -r
resize2fs /dev/mmcblk0p2
# you may now reboot for verification purposes
[/code]
Then you should update and upgrade. I prefer apt-get but aptitude is available.
Next step: make things confortable – mc and configure it with internal viewer and editor (mcedit), nameserver in /etc/resolv.conf , install ntpd, samba, telnet…. change the hostname in /etc/hostname
Install Java packages:
[code lang=”C”]
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee /etc/apt/sources.list.d/webupd8team-java.list
# adds a java deb repo
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
# adds a java deb-src repo
apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886
# install the key
apt-get update
# reads the repo and updates the local db
apt-get install oracle-java7-installer
# installs the java7.
# it also brings up a License Agreement
[/code]
Now the fun part!
OpenHAB has a deb repo! I tried hard with the basic .zip files, but with the repo all is faster and better.
Repo address: http://repository-openhab.forge.cloudbees.com/release/1.5.0/apt-repo/
http://dl.bintray.com/openhab/apt-repo
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | tee /etc/apt/sources.list.d/openhab.list
or
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list
Wiki: https://github.com/openhab/openhab/wiki/Apt-Repository
[code lang=”C”]
apt-get install openhab-runtime
apt-get install openhab-addon-action-twitter openhab-addon-action-mail openhab-io-gpio
apt-get install openhab-addon-binding-onewire openhab-addon-binding-gpio
apt-get install openhab-addon-binding-http openhab-addon-binding-ntp
apt-get install openhab-addon-persistence-exec openhab-addon-persistence-logging
apt-get install openhab-addon-persistence-rrd4j
apt-get install openhab-addon-action-twitter
# Change the OpenHAB’s webserver port in /etc/default/openhab
# HTTP_PORT=8888
# You may start now the openhab service
/etc/init.d/openhab start
# Now is all installed and running.
# In order to see the demo: get the demo zip file and unzip it.
# Copy the /configurations content over the one in /etc/openhab/configurations
#
[/code]
The OpenHAB + BeagleBone address is: http://beaglebone_ip_address_here:8888/openhab.app?sitemap=demo
More links:
The OpenHAB Hardware FAQ: https://github.com/openhab/openhab/wiki/Hardware-FAQ
EnOcean Binding: https://github.com/openhab/openhab/wiki/EnOcean-Binding
Round Robin DB Persistence Module: https://github.com/openhab/openhab/wiki/rrd4j-Persistence
Later edit: OpenHAB addons folder is /usr/share/openhab/addons
5 years Beagle Anniversary
The Beagle family: Opensourcing SBC’s and delivering new development tools

BeagleBoard, the first, released in 2008
http://beagleboard.org/Products/BeagleBoard
OMAP3530 Application Processor 720MHz ARM Cortex-A8
@150$

BeagleBoard-xM, released in 2010
http://beagleboard.org/Products/BeagleBoard-xM
Sitara AM37x 1GHz ARM Cortex-A8 compatible
@150$
http://beagleboard.org/Products/BeagleBone
AM335x 720MHz ARM Cortex-A8
@90$

BeagleBone Black, released in 2013
http://beagleboard.org/Products/BeagleBone Black
AM335x 1GHz ARM Cortex-A8
@45$
[youtube]bIvkerJr5wE[/youtube]
BeagleBone SUBARCTIC issue
Sometimes the Mighty BeagleBone may ask for a new, unknown driver named SUBARCTIC. His VID is 0451 and PID is 6141, at least in the case of a A6a board.
A simple search about this can lead to a bunch of different opinions but the truth seems to be that is appears only in Sitara’s bootloader mode, when he waits for some other debugging options, maybe something on the non-soldered P7 JTAG Connector.
The BeagleBone Subarctic QuickFix
So, BeagleBone is built to boot something from the SD Card… Inserting the Linux SD Card all works fine, the board get into linux boot sequence, the right devices (USB Serial Port, RNDIS Gadget… ) are showing up and the drivers are loading.
The quick fix: don’t search for a driver instead put the SD Card with software in the connector and cycle power.
Here is a USBView capture of the SUBARCTIC issue:
Some TI Sitara debuggers:
XDS100 – http://www.ti.com/tool/xds100
XDS560 – http://www.ti.com/tool/XDS560
Blackhawk XDS560v2 System Trace USB Emulator, Spectrum Digital XDS560v2 PRO TRACE Receiver, Spectrum Digital XDS560v2 System Trace USB & Ethernet.
Some TI Sitara JTAG advices:
http://processors.wiki.ti.com/index.php/XDS_Target_Connection_Guide#Target_Connection_Design
http://processors.wiki.ti.com/index.php/XDS_Connector_Design_Checklist
elinks on BeagleBone
installing and running elinks – the text mode browser – on a BeagleBone
BeagleBone is great!
install elinks:
wget http://www.elinks.cz/download/elinks-current-stable.tar.gz tar - xzvf elinks-current-stable.tar.gz cd elinks-0.11-20130125 (better press tab after elinks, the last part is the date) ./configure make && make install
and finally get to google:
More BeagleBone linux
More Angstrom tools:
systemd, is a system and service manager, a initd replacement
systemd uses journal instead of syslog
journalctl – a “/var/log/messages” replacement
configuration file: /etc/systemd/journald.conf
journalctl can be used in conjuction with grep
opkg – the package manager, a ipkg fork
page: http://code.google.com/p/opkg/
download: http://code.google.com/p/opkg/downloads/list
updating the system : opkg update (?)
package information: opkg info <package name>
install packages: opkg install <package name> (ex. samba, a good way to build windows networks)
top – shows running tasks
top with no arguments – shows all tasks
top -p <pid> –shows only that specific pid
nmap on BeagleBone
Installing nmap on BeagleBone
Maybe the best network scan tool available, the powerful nmap is also free.
Install sequence:
wget http://nmap.org/dist/nmap-6.25.tgz cd nmap-6.25 ./configure make make install
The install procedure takes some time (>20 minutes)
To get the basic help run nmap without arguments.
the make step is displaying 2 errors but is ok, make install shows 1 error but it works.
BeagleBone running Matt’s traceroute – mtr
Installing mtr on a Beaglebone/Angstrom
mtr(former Matt’s traceroute) is a mix of traceroute and ping, I use it often in network diagnose. Running it on BeagleBone simplifies many things.
As a usual source install:
wget ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz tar -xzvf mtr-0.82.tar.gz cd mtr-0.82 ./configure make make install
well… cursesX is not available… but is ok, I don’t want to run X.
Some links:
mtr: http://www.bitwizard.nl/mtr
some wikipedia thoughts about mtr: http://en.wikipedia.org/wiki/MTR_(software)
Angstrom Distribution: http://www.angstrom-distribution.org/
Beagle Bone: http://beagleboard.org/bone
Element14 Beagle Bone Doc: http://www.element14.com/community/docs/DOC-45028/l/beaglebone-720mhz-arm-cortex-a8-neon-gpu-256-mib-ddr2-ethernet
mc on beaglebone
Midnight Commander 4.6.1 running on BeagleBone with Angstrom Distribution.
BeagleBone is a linux box. So get all the classic linux tools!
mc aka Midnight Commander is a visual file manager (orthodox file manager) used in console work. It is released under under GNU GPL.
For those who are not familiar with mc it is a product in the line of nc – Norton Commander, Path Minder, dn – Dos Navigator, far, Windows Commander / Total Commander.
mc v4.6.1 runs smooth on BeagleBone/Angstrom, mc v4.8.1.7 needs the S-Lang Library (http://s-lang.org) so I skipped it.
Installing mc from source is simple but it takes some time for every step, is not like installing it on a server but you have enough time to read the full output without redirecting it to a file 🙂
wget http://www.midnight-commander.org/downloads/mc-4.6.1.tar.gz tar -xzvf mc-4.6.1.tar.gz cd mc-4.6.1 ./configure make make install
Useful Links:
Angstrom Distribution: http://www.angstrom-distribution.org/
BeagleBone: http://beagleboard.org/bone
Element14 BeagleBone Doc: http://www.element14.com/community/docs/DOC-45028/l/beaglebone-720mhz-arm-cortex-a8-neon-gpu-256-mib-ddr2-ethernet
Later edit:
opkg install mc
QiLiCape v3-d1
Still under construction…
BeageBone QiLiCape
Beagle has landed!
BeageBone QiLiCape – a wireless power charger cape for BeagleBone
The QiLiCape – wireless power charging cape for BeagleBone
v.01 is here >>> QiLiCape-ioclk.v01 Eagle .sch file format.
v.02 will have some linux integration.
A new project is started: The QiLiCape, a BeagleBone cape that is a wireless power Lithium battery charger and power supply enabling the usb host support operation when in battery mode.
It’s a work in progress, an opensource project ignited by element 14.
Fetures a BQ51013A driven by a Wuerth Electronic 760308101 Coil and a BQ24075T battery charger with power-path management -separate power path for battery and system power.
Some useful stuff:
The BeagleBone: site, manual
TI datasheets: BQ51013A, BQ24075T
Wuerth/Wurth Electronic: 760308101 Coil datasheet
Next step: adding the BeagleBone connectors – Open Source Design Credits: Adafruit (Adafruit Store BeagleBone Cape / Adafruit on Git ) and Victor Sluiter (Element14 Profile Page / Blog)…
Special thanks: BeagleBone courtesy of Shawn Silberhorn, Texas Instruments.
Project Updates: