Donnerstag, 7. Januar 2016

Herbert Mk3: An der Wand

Das neue und offizielle Raspberry Pi Touchscreen mit DSI Anbindung und kapazitivem Touch ist endlich auch für mich lieferbar gewesen. Nachdem ich fast einen Monat darauf gewartet habe kann ich die Schaltzentrale für meine Wohnung jetzt endlich an den Nagel hängen...

Raspberry Pi 7" TFT Gehäuse: Modell

Mit einem eigenenen 3D-gedruckten Gehäuse hängt der Raspberry Pi 2 mit Display jetzt im Flur. Mit an Board ist ein BLE Dongle, zwei WLAN Sticks und ein 64GByte Massenspeicher. Auf dem System läuft ein Raspbian mit LXDE und Iceweasel Browser als Frontend und openhab, mogodb, mosquitto, HerbertScanner und HerbertNode im Backend.

Openhab mit mosquitto habe ich ja bereits in älteren Posts bereits erwähnt und mongodb als Datenbank ist auch keine Besonderheit. Die zwei interessanten Softwarekomponenten sind HerbertScanner und HerbertNode.

HerbertScanner ist eine Applikation, die mit dem BLED112 von BlueGiga kommuniziert und die Advertisement Pakete der BLE Buttons im Umkreis registriert. Ein Advertisement Paket im richtigen Format wird an mosquitto, also als MQTT Nachricht weitergeleitet. So werden Daten von BLE Endpunkten a die openhab Zentrale geleitet.
Die Konfiguration der BLE Geräte muss zur Zeit manuell durchgeführt werden. Dazu muss der MQTT Kanal '/Herbert/#' abonniert werden.  Dort werden alle Nachrichten abgeliefert. Neue Geräte erscheinen da dann auch und können mit der ID registriert werden.

HerbertNode ist eine Applikation, die für das Konfigurieren der WLAN Endpunkte eingesetzt wird. HerbertNode scannt die WLAN Netzwerke in der Umgebung und findet die Accesspunkte von ESP2866 Geräten. Diese starten, wenn sie keine Konfiguration besitzen, oder das konfigurierte Netzwerk nach 30 Sekunden nicht gefunden wurde in den Accesspoint Modus. Sobald HerbertNode eine ESP2866 SSID sieht, verbindet er sich mit dem AccessPoint und stellt eine HTTP Anfrage nach '/info'. Das Gerät gibt dann Informationen über sich im JSON-Format an HerbertNode weiter. HerbertNode hat eine Liste der verfügbaren Geräte im Umkreis. Vom Benutzer kann in dieser Liste das Gerät ausgewählt und dem Netzwerk hinzugefügt werden, dazu wird dem Gerät die SSID und der Zugangsschlüssel für das Herbert-WLAN übertragen.

Der Code wird im Laufe der nächsten Wochen noch verfeinert und stabilisiert. Es treten teilweise noch Fehler auf, die noch behoben werden müssen, bevor Herbert zum ersten mal veröffentlicht wird.

Mittwoch, 18. November 2015

Converting a CC26xx Example Project Into Something Shareable



The example projects that are shipped with TI's BLE SDK are great. They show a huge variety of use cases for the BLE stack. The codes provided are great resources when it comes to information on how to build software for the CC26xx chip family. Doing so many examples leaves us with code that is used more often than once and so it is linked into the project. Basically every file that consists of some code is a virtual link to a file on the folder structure. That leaves us with the problem that sharing the project with an SVN or GIT server only gives us the few local files and none of the code that is important. Changing the code is possible but you have to remind yourself, that the files are not considered to have changed when submitting to a version control system. 
To conquer this issue we need to have some of the files we are going to change or that are not part of the SDK in a local version on our file system. Luckily we can just copy the files to a folder in the project of the workspace. This way the files are preserved and as a next step we delete the links to the files in the project explorer.
I moved the following files to local folders:
  • simpleBLEPeripheral.c /.h
  • board_key.c /.h
  • simpleGATTprofile.c /.h
  • main.c
  • Board.c /.h
  • appBLE.cfg
You now have to add the local folders to the include paths of your project so the files can be found during build. Especially the Board.h which contains the information on how the chip is integrated in the circuit. Remember to remove all the unnecessary folders from your include paths. If your project uses available files from the example projects (like profiles and utils) you can leave the links in you project. To share the project you can use Subclipse or Git. You will have to install the same version of the SDK if you want to compile the project we created.

You can read up on this instructions on how you can create your own GATT Profile.

Samstag, 24. Oktober 2015

Sooo teuer...

Conrad Elektronik ist nicht unbedingt für kleine Preise bekannt. Auch der 3D Drucker von Conrad, der RF1000, ist nicht von der günstigsten Sorte. Vor einigen Tagen ist im Hotend des Druckers der Heizwiderstand durchgebrannt. Conrad bietet zwar ein Ersatz für das Hotend an, allerdings nur im Set mit einigen Teilen des Extruders. Das Set beinhaltet neben dem Hotend auch noch die Mutter zum Befestigen, das Ritzel für den Extruder Motor und ein 'Spezialwerkzeug' zum Befestigen des Extruders am Führungsschlitten. Das ganze zum ansehnlichen Preis von 80€ zzgl. Versand. Was ein Schnäppchen. Der Extruder alleine ist mit 65€ gelistet, aber nicht mehr lieferbar. Nur noch das Set mit den unnötigen Teilen, die nicht kaputt gehen sollten für 15€ mehr ist verfügbar. Sehr schade...
RF1000 Ersatzteil-Set 5 - Extruder 3mm