DIY Directional WiFi Antenna + Tests

IMG_20130528_020617IMG_20130528_195107Yesterday I stumbled over the IKEA Baren Toilet Brush - yes, I do keep an eye on toilet brush holders since nazco and myself are planning a directional WiFi link. The box said 10cm diameter, which is a bit too much according to this heise.de article, however, once I arrived at RaumZeitLabor I was surprised that it is “only” 92mm in diameter – the optimal size.

The setup consisted of a TL-WR741ND on our balcony as well as an external Logilink WiFi adaptor which I used to measure stuff along my 2 hour trip.

IMG_20130528_160930

Test Point 1

IMG_20130528_195120


The TL-WR741ND sat on our balcony, approx 8m above ground level. It was equipped with the stock stub antenna. All tests were done using an external USB WiFi stick (Logilink, unknown model, rt73usb driver). For all test locations, I did the test with the stock stub antenna and my directional antenna.

I’ve used iperf to measure the throughput (iperf server on the TL-WR741ND, and iperf client on my notebook). I could have done send/receive stats, but at first I thought that it wouldn’t work so well if I had only one directional antenna – I was wrong! Performance was much better than expected, even at over half a kilometer I had nearly the same performance using only one directional antenna as I had when I was at home).

IMG_20130528_164251

Test Point 3

Big Win: With only one directional antenna, I was able to achieve 18.3 Mbit/s over half a kilometer with a non-optimal line of sight, which is only 4 Mbit/s less than placing both antennas next to each other.

You can find my measurements in the following file: Messwerte.ods (20kb or so)

Additionally, I have visualized the test points on Google Maps.

Note that performance is sometimes less because of trees in the line of sight, and the antenna isn’t constructed in an optimal way. Additionally, my hand is a bit shaky, so there’s room for some additional percent of performance.

IMG_20130528_164718

Test Point 4

IMG_20130528_174234

Test Point 6

Autonomous WLAN Router Experiment: Part 3 – Up and Running

After hacking the software for the CurrentMonitor, I finalized the case as well as the wiring. I’ve built a frame which holds the solar cell at 33°. I might need to move the cell to get the best performance, but I already got 300mA out of it when the sky was cloudy. I’m curious which performance I’ll get on a sunny day.

I also held a talk at RaumZeitLabor (Slides) and I implemented a cosm feed to publish all data of the cell. If you have questions, contact me.

Solar Powered Router CaseSolar Powered Router: Panel

 

 

Autonomous WLAN Router Experiment: Part 2

I’ve bought some hardware in order to build up the experiment:

  • One monocrystalline 20Wp solar cell (25€)
  • A solar charge controller (15€)

I’ve also built a current/voltage monitoring board, which allows monitoring of the power generated by the solar cell as well as power drawn by the peripherials. Because it also monitors voltage, we can make assumptions of the battery charge status. It uses two INA138 current shunt monitors, together with two 0.1Ω 0.5W 1% precision shunt resistors and a ATMEGA168 (no low power, that’s the one I got at hand). The power monitoring circuit draws less than 10mA at 5V. I have to measure the exact power consumption,   I only recall that the bench PSU was showing 0.00A and my Fluke 27 did show something like 5mA, but I haven’t written down the exact numbers.

So much cool things and then: kaboom! I accidently connected the step-down converter backwards (12V to the output and the 5V router to the input), which delivered 12V straight to the router, which then refused to work. As I couldn’t find any fuse on the router, I assume it is totally bricked and I’ll most likely go with a Carambola2 board, which also requires only 0.5W power.

In the meanwhile, I’ll use a carambola board which uses 1.5W power, but that should be okay until my Carambola2 board arrives.

The current monitoring board can be found at https://github.com/felicitus/CurrentMonitor

Symfony2, Assetic, Twitter Bootstrap + Bootswatch

This is a quick’n'dirty guide for newcomers to symfony’s assetic and twitter bootstrap in conjunction with bootswatch. This is not a complete guide and reflects my own opinion only.

Quick terms:

  • Assetic is automated asset management and compilation, in this example it’s used to compile less files
  • less is used to compile a templateish CSS language into real CSS files your browser understands
  • Your advantages:
    • Easy color changes
    • One command to update your css
  • First, install nodejs. 
  • Configure bootstrap and jquery packages:

 

  • Add the following block to your config.yml and change the paths as explained in the comments.

 

  • Create a new build.less file and add the following stuff:

  •  Choose your favourite theme at bootswatch.com and download both .less files per theme. Place them alongside in the same directory where you placed your build.less file.

Now you can run app/console assetic:dump to compile the less file into a css file, which you then can include using the usual twig fragment:

That’s it. If you’re getting any errors, I’m sorry: You need to find out yourself what’s going on. I’ve spend 3 hours to get the initial setup running. Guides I’ve followed or files I’ve looked at:

  • http://bootstrap.braincrafted.com/getting-started (I’m not using the bootstrap bundle, as I don’t currently see the need for it. This might change as soon as I’m using KnpPaginator, KnpMenu and symfony forms. I just left the bundle out because I had trouble getting it to work, the reason was that my nodejs setup was forked up).
  • The build scripts for bootswatch
  • The source for the Assetic Less filter (no, you can’t inject different less imports, hence the build.less encapsulation script above)

 

Autonomous WLAN Router Experiment: Part 1

I’ve been wanting to build an autonomous WLAN router for quite some time. That WLAN router should be powered by a solar cell and a battery. I have spoken about the TL-WR702N at RaumZeitLabor a while ago, and it is very small, draws 150mA max and is therefore suitable for such a project.

Some time has passed, and yesterday Doozer gave two Lead–acid batteries to me, rated 12V 5Ah each. So now I have to do this project!

I’ll use one battery for the project. I have made the following assumptions:

Ed: Average daily electricity production (kWh)
Em: Average monthly electricity production (kWh)

  • The router will permanently draw 150mA at 5V, or 0.75W (worst-case)
  • The solar charger circuit will have a power requirement of 15mA at 12V (0.075W)
  • The DC-DC converter I’ll be using has an efficiency of 80% (worst-case assumption, will probably be much higher)
  • To be on the safe side, all further calculations assume that our overall power usage is 2W
  • Overall yearly power: ~18kWh, 1.5kWh per month
  • Using the interactive photovoltanic calculator (linked below) I was able to calculate that a 20Wp cell is not sufficient from October till February.
  • As we assumed the worst-case scenario, and this is an experiment only, I decided to go with two 20W panels, where I’ll experiment with one panel, then two if it’s not sufficient.

I now have to buy the solar panels and the charge controller, which I’ll do in may.

Useful resources:

Zocial Social Buttons

I’m currently working on a super-secret project, for which I use the Symfony framework together with FOSUserBundle and HWIOAuthBundle. Users can simply login using their favourite oAuth-provider. For that purpose, I needed some nice login buttons – and not surprisingly, somebody already did those – in a great way! CSS3, so no graphics needed. 42 different buttons and: Free of charge!

Homepage: http://zocial.smcllns.com/
Demo: http://zocial.smcllns.com/sample.html
Source: https://github.com/samcollins/css-social-buttons

Zocial Social Buttons

 

Warum ich Google meine Daten gebe

Seit Jahren herrscht die Diskussion über: “Google ist böse, gib denen nicht deine Daten” und “Google ist nicht böse, gib Ihnen deine Daten”. Bevor ihr den Blogpost jetzt zerreist, gebe ich euch beim Lesen folgendes mit auf den Weg: “Es muß jeder selbst wissen”.

Ich persönlich verwende viele Google-Dienste: Calendar, Contacts und viele weitere. Hauptsächlich Contacts und Calendar sind mir wichtig, denn Google schafft etwas, was ich in den frühen 2000er Jahren vergeblich gesucht habe: Termine und Kontakte auf jeden Device, welches es unterstützt.

Mein erstes Handy war ein Siemens C25 – für heutige Verhältnisse riesig, aber 1999 gab es nur wenig Auswahl. Und: Es hatte (soweit ich mich richtig erinnere) 8 Kurzwahlspeicher. Da das natürlich nicht ausreichte, nutzte man zu dieser Zeit PDAs – ich hatte einen Palm.

Und damit ging dann das Vergnügen los – syncronisieren von Kontakten vom Rechner zum PDA. Ich möchte nicht wissen, wieviele Kontakte und Kontaktdetails verloren gingen – oftmals fehlte der Geburtstag (ich gehöre zu den Menschen, die sich keine Geburtstage merken können). Einfach weg. Oder falsche Daten – das “Resolve Conflicts”-Fenster hat sich bis heute in mein Hirn gebrannt.

Anno 2001 folgte dann das nächste Handy: Ein Sony CMD J5. Es hatte wahnsinnige 500 Addressbucheinträge, inklusive vollständiger Kontaktverwaltung. Natürlich konnte man nicht einfach so die Daten von einem Gerät auf ein anderes schieben – schon gar nicht unter FOSS. Aber damals hatte ich immer eine Windows-Kiste griffbereit.

In 2003 ging es mit dem NEC N22i weiter. Toll – es hatte iMode (was irgendwie nie funktionierte), aber die Sync-Software war wieder ein Grauen. Auch da ging’s wieder rund mit Kontaktverlusten. Und meine Mutter ärgerte sich schon wieder, weil ich Ihren Geburtstag um einen Tag verpasst habe.

Ähnliche Probleme gab es dann mit dem Motorola RAZR v3 in 2005, dem Blackberry Curve 8310 in 2007, bis ich mir 2010 mein erstes Handy mit Android und Google-Datenmonster zulegte: Ein HTC Desire Z. Und plötzlich war der Sync-Krampf vergessen: Die Kontakte liegen in der Cloud, ich kann von jedem Browser auf die Kontakte zugreifen und mein Smartphone synct es brav. Genauso mit den Kalendereinträgen: Da Google nicht von heute auf morgen umkippen wird, kann ich auch getrost Termine in den Kalender schreiben, die erst in einem Jahr relevant sind (z.b. Impfungen). Ich habe erst vor einigen Tagen mein Nexus 4 bekommen – eingerichtet, sync läuft, fertig. Ich weiß nicht, wie Google das macht, aber Google macht es gut. Das ist für mich die Hauptsache.

Ich bin raus.

Ich bin raus. Erstmal. Es geht ziemlich an die Substanz, ein aktives Mitglied in einem Hackerspace zu sein. Aktiv in dem Sinne, daß man Probleme behebt, wenn sie einem auffallen. Dinge, die getan werden müssen, zu tun. Und dabei kann man sich leicht übernehmen.

Ich erlebe das nicht zum ersten Mal – dieses Gefühl, völlig überfordert zu sein. Bereits 2006 litt ich nach nur 5 Jahren Berufstätigkeit vermutlich unter einem Burn-Out. Genau das erlebe ich gerade wieder, dieselben Gefühle, dieselben Verhaltensmuster. Deshalb: Notabschaltung. Auch wenn das für Außenstehende so wirken könnte, als ob diese Entscheidung spontan und aus dem Bauch heraus getroffen wurde.

Jetzt könnte man natürlich sagen: “Dann mach halt weniger”. Doch so einfach ist das nicht. Vor allem nicht, wenn man in einem Hackerspace aktiv ist. Arbeit ist Arbeit, auch wenn sie in der Freizeit passiert.

Damit man meine Situation verstehen kann, muß man verstehen, an welchen Dingen ich arbeite(te) und warum mir diese wichtig waren. Außerdem ziehe ich Bilanz der verbrachten Stunden, um mir selbst ein Bild darüber zu machen, “wie schlimm es wirklich ist”. Die Zahlen sind nicht dafür gedacht, um mich am Ende hinzustellen und zu sagen: “Ich habe soviel gemacht und ihr zuwenig”. Vielmehr geht es darum, daß ich mir selbst ein Bild von meiner Situation machen kann. Die Gesamtbilanzen sind auch nur auf die letzten 5 Monate bezogen.

Bauteile einlagern

Das RaumZeitLabor bekam im Oktober 2012 eine großzügige Spende an Elektronikbauteilen und Gerätschaften. Die Erfassung der Bauteile in PartKeepr ist in meinen Augen ein wichtiger Schritt, damit man weiß, welche Bauteile man hat und in welchen Mengen. Zahlen sind wichtig: Einen Sortimentskasten mit 18 Fächern zu inventarisieren dauert zwischen einer halben und zwei Stunden, je nachdem, wie einfach man die Datenblätter bekommt. Dazu kommt noch das Vorsortieren und Duplikatsmanagement.

Gesamtbilanz: 40 Stunden

Nebenraum

Im Oktober mieteten wir einen Nebenraum an, in dem insgesamt 3 neue Räume entstehen sollten: Eine Werkstatt, ein Workshop-Raum und ein FabLab. Ich habe die Elektrik und Netzwerk geplant, sowie mit einigen Helfern die Kabelkanäle angebracht sowie Netzwerkkabel gezogen.

Gesamtbilanz Planung: 40 Stunden
Gesamtbilanz Verkabelung: 20 Stunden
Gesamtbilanz sonstige Arbeiten: 20 Stunden

NOC-Team

Wir erhielten im November 2012 einen HP N40L, der zukünftig viele Dienste ersetzen soll. Ich habe mich dort vorrangig um das Monitoring, die Backups sowie das Konfigurationsmanagement gekümmert. Zusätzlich gingen viele Stunden drauf, um diverse Netzwerkprobleme (die bis heute nicht gelöst sind) zu debuggen.

Die Gesamtbilanz kann ich nur schätzen, allerdings ist die Zahl eher zu niedrig als zu hoch.

Gesamtbilanz Mitarbeit NOC-Team: 300 Stunden

Lichtsteuerung

Seit längerem möchte der Raum eine Lichtsteuerung, und die Situation wird mit dem Nebenraum akut: Niemand läuft durch alle Räume und schaut nach, ob dort das Licht noch brennt. Also habe ich eine Lichtsteuerung entworfen, bei der mir DancingFo sehr viel half. Bisher ist die Lichtsteuerung noch nicht fertig, aber zumindest die Kleinverteiler und die Relais sind alle da, auch der Schaltplan ist weit fortgeschritten.

Gesamtbilanz Lichtsteuerung: 40 Stunden

Sonstige Dinge

Ich löse Probleme immer dann, wenn sie auftreten. So ist es z.b. mit Müll wegbringen, 3D-Drucker fixen, Umbau von aktiven, aber lose rumliegenden Platinen in Gehäuse, Spülmaschine ausräumen und so weiter und so fort.

Eine Gesamtbilanz zu ziehen ist hier völlig unmöglich.

Gesamtbilanz der letzten 5 Monate

Ich tippe diese Zeichen und mir wird mulmig – ich habe die Zahlen noch nicht zusammengerechnet. Und ich frage mich gerade, ob ich das wirklich möchte. Aber es hilft nichts, da muß ich durch:

Ingesamt sind das 460 geschätzte Stunden – gefühlt über 1000. In der Schätzung ist nichts, was ich ausschließlich für mich selbst getan habe – die Stunden sind da gar nicht drin, sind aber auch nicht relevant. Beispiel dafür ist der Aufbau meines MendelMax, der in der Rechnung nicht vorhanden ist.

Das sind fast 100 Stunden Arbeit im Monat für alle im RaumZeitLabor und nicht für mich selbst – 25 Stunden Arbeit pro Woche oder auch fast 4 Stunden am Tag. Das ist zuviel.

Daher ist die Entscheidung, die Notbremse zu ziehen, auch mit Zahlen unterlegt und ich fühle mich hoffentlich nicht ganz so schlecht; denn das ist eine der Tücken beim Burn-Out: Man fühlt, daß man nicht genug tut, obwohl man mehr tut, als man müsste.

Bis bald.
Felicitus

 

systemd on Debian Wheezy: Getting Started

I decided to hop onto the systemd boat – mainly because I want to have several services started once I unlock my crypto disks. I am aware of that several methods [1] [2] of remote unlocking exist; however, they aren’t supported by Debian and I don’t wish to fiddle around with critical services too much.

After reading quite some articles about systemd, those questions came up:

  • What needs to be done after installing systemd and booting the machine with it?
  • As it is a remote machine, can I get it booted into a state where I can remotely access it?
After quite much reading, I rebooted the machine and realized: The systemd developers have thought of this – they’re simply loading the old init scripts as the old-style init would do. That way, I was able to remotely access my machine as I did previously.
After grabbing the .service files from metager, I quickly realized that the systemd version doesn’t support RequiresMountFor, which I wanted to ues to start samba as soon as the box boots up – damn!
Seems I have to wait until a more recent version is available.

2012-12-13 Diary of a Nerd: Buying snacks and cleaning up

Dear Diary,

our hackerspace is hungry and it’s hungry for sweets and snacks. Because of that, some people went to Metro to spend 200€. That way, we finance the hackerspace partially by sales of snacks.

Unfortunately, we noticed that quite some products we already had in stock had an expired “Best Before”-date. So an one hour shopping trip resulted in an additional 3 hour stocktaking session in order to remove expired products. Additionally, we added small stickers with the expire date of the new products printed onto them, so we can go through the stock once a month and expunge expired products – people usually don’t look at “Best Before”-dates when buying stuff from the snack bar.
Also, we’re receiving quite lots of construction material for the second room – however, that second room is full with stuff (mistaken for storage). Thanks to the help of some hackerspace colleauges, we were able to make room for all the construction materials which are arriving tomorrow.

So long,
Felicitus