Projects
STEVAL-FKI868V1 – Sigfox testing with ST Hardware
STEVAL-FKI868V1 with NUCLEO-L152RE board.
Can be used “normally” or via mbed.
ST Page: http://www.st.com/en/evaluation-tools/steval-fki868v1.html
Sigfox page: https://partners.sigfox.com/products/steval-fki868v1
Schematics in the datasheet or here: http://www.st.com/resource/en/schematic_pack/steval-fki868v1_schematic.pdf
S2-LP ULP transceiver page: http://www.st.com/en/wireless-connectivity/s2-lp.html
STMicro Wireless Connectivity for IoT Applications Brochure: http://www.st.com/resource/en/brochure/brwireless_web.pdf
! many thanks to STMicroelectronics
Sigfox – WiSOL SFM10R1 – SNOC Board
WiSOL SFM10R1: a cheap Sigfox Module made by WiSOL available as devkit from SNOC/Yadom.
Some links:
Wisol module manufacturer site: http://www.wisol.co.kr/
Yadom online shop: http://yadom.fr/
SNOC (Société Nationale des Objets Connectés): https://snoc.fr/
The only strange thing with this WiSOL module is that it responds with “ERROR: parse error” at the usual “AT” command.
A simple test code that sends some data to the network respecting the constraints:
[sourcecode language=”C”]
/*
Sigfox Module Test Unit
*/
int button = 2;
int led = 13;
void setup() {
// WiSOL works on 9600:
Serial.begin(9600);
// some basic LED debug info
pinMode(button, INPUT);
pinMode(led, OUTPUT);
// more to go for the receive function
// add ",1" for the downlink frame
}
void loop() {
int buttonState = digitalRead(button);
if (buttonState == LOW){
Serial.println("AT$SF=000011110000");
// some basic LED debug info
digitalWrite(led, HIGH);
delay(800);
digitalWrite(led, LOW);
delay(200);
digitalWrite(led, HIGH);
delay(800);
digitalWrite(led, LOW);
delay(200);
// obey to the max 1 msg every 10 min rule
delay(600000);
}
else {
// basic LED debug info
digitalWrite(led, HIGH);
delay(50);
digitalWrite(led, LOW);
delay(1000);
digitalWrite(led, HIGH);
delay(50);
digitalWrite(led, LOW);
delay(1000);
digitalWrite(led, HIGH);
delay(50);
digitalWrite(led, LOW);
delay(1000);
digitalWrite(led, HIGH);
delay(50);
digitalWrite(led, LOW);
delay(1000);
delay(40000);
}
}
[/sourcecode]
Playing with ESP8266 modules and IoT
ESP8266 as IoT device
Reviewing the Exosite Murano Platform for a IoT solution, I started to build a new board based on ESP8266 powered ESP-12E module.
Tools used: Autotrax DEX aka DEXPCB and DFM now!
Arduino ESP support installation instructions:
Start Arduino and open Preferences window.
Enter the following link into “Additional Board Manager URLs” field.:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Start the Boards Manager, update and select the ESP support package.
Install and use a USB to Serial adapter to program the board.
Links:
Arduino Core for ESP: Github link
Ai Thinker ESP-12E Product Page: http://www.ai-thinker.com/html/2016/ESP_01-14Series_0422/49.html
Ai Thinker ESP-12E Datasheet: http://www.ai-thinker.com/uploadfile/2016/0722/20160722020431739.pdf
http://wiki.ai-thinker.com/_media/esp8266/docs/esp8266_series_modules_user_manual_cn.pdf
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
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
QiLi Cape part.III
QiLiCape-main-v035 x Víctor M.!
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: