How to get the TP-Link TL-WN725N working on Raspberry Pi

Recently I bought two TP-Link TL-WN725N adapters off Amazon. They’re cheap and according to the RPi peripherals list [here], are supposed to work well under Linux. They do, however, require a special driver which is not included in the Linux kernel itself. This leaves you with two options:

- Use one of MrEngman’s pre-compiled kernel modules which is available on the Raspberry Pi forums [here] (kudos to MrEngman to his ongoing effort!).


- You compile your own kernel module.

However, keep in mind the following very important caveat: whatever your choice is, this process requires some basic knowledge of Linux! If you don’t feel comfortable messing around with kernel modules and such, I would recommend that you proceed with caution and maybe even ask a more experienced friend to give you a hand. It’s unlikely you will ruin your Raspberry Pi but you may very well ruin your installation. PROCEED WITH CAUTION.

Now, be aware that if you just want your wifi up and running and don’t want to be bothered, you really should take the easy way out here and check whether MrEngman has a pre-compiled module that’s been compiled with the same revision of your kernel. If you cannot find one or if you’re feeling especially brave, read on for the step by step on how to compile it yourself.

Also keep in mind that this tutorial applies to the Raspbian distribution. It may (or may not) work in Pidora (and others) but it’s up to you to adjust accordingly.

Continue Reading

Chronopost Portugal? Serviço enganador…

This post will, extraordinarily, be in Portuguese as it is a complaint and a warning towards a Portuguese courier company which is indulging in false advertising. This is, therefore, a warning for my fellow Portuguese countrymen.

Esta é uma história de como os meus pais, na segunda-feira passada (dia 7 de Outubro de 2013) me enviaram pela Chronopost Portugal uma encomenda para a Holanda, onde me encontro a residir. No site, a Chronopost anuncia o serviço Chronopost Classic onde prometem entregas para a Europa dentro de 3~4 dias a preços convidativos (24 euros até 10 kg).

Uma vez que a relação preço versus qualidade (anunciada) parecia bastante boa, decidi escolher o serviço da Chronopost.

Qual não é o meu espanto quando hoje, dia 11 de Outubro de 2013, passados 4 dias da expedição da encomenda, esta ainda não se encontra sequer na Holanda (de acordo com o track and trace). Depois de contactar por várias vezes a Chronopost e me terem sido dadas desculpas de que “os 4 dias são 4 dias de trânsito” e de que “o dia de expedição não conta”, o facto continua a ser de que excluindo o dia de expedição, faz hoje 4 dias desde que a encomenda se encontra em trânsito.

Após ter descoberto que não vai ser a Chronopost que me vai entregar a encomenda mas sim um dos seus parceiros (a DPD), decidi contactar também esta empresa afim de tentar obter um esclarecimento sobre quando a encomenda será entregue. Estes senhores dizem-me que será entregue apenas na segunda-feira, sete dias depois da expedição.

Fica aqui então o aviso que a Chronopost Portugal está a enganar os seus clientes com um serviço de pouca fiabilidade, prometendo entregas em 4 dias e fazendo-as em 7 dias. Conhece algum serviço mais fiável? Que tal deixá-lo então na secção de comentários em baixo?

Automatic Recovery of REST Interfaces

Recovery of REST interfaces is an interesting research topic which came into conversation with one of our industrial partners and which I would like to explore. This is also something mentioned by Maleshkova et al in their work on “Investigating Web APIs on the World Wide Web” (pre-print, IEEE citable). The authors claim that “two thirds of the APIs do not state the data-type of the input and 40% of the APIs do not state the HTTP method. If a standard interface description language, such as WSDL, [was] used [...] this would be unthinkable”.

This is very true. Read on to know more.

Continue Reading

Ok, I got some kefir, now what? (or Kefir Quickstart Guide)

My last post introduced the wonders of kefir and the magic grains that ferment milk into delish yoghurt. Some people have asked me for grains and right now I actually have a “customer” on hold for my kefir grains to grow again so I can give them away. It seems my friends are more open than I was actually expecting! Nice!

My own kefir grains!

My own kefir grains!

Read on for the essential tips on getting quickstarted with kefir making!

Continue Reading

Would you like some Kefir? Like some what?!

Not long ago my father had mentioned this thing called ‘kefir’ with which you could apparently make yoghurt. At the time I didn’t pay much attention and he, despite mentioning that this kefir thing could be obtained for free (or just by paying postage), didn’t make much of it either. It was not until recently, when I travelled to Russia (where it is very popular) that I finally got in close contact with ‘kefir’.

Read on to learn more about kefir.

Continue Reading

WeChat Pebble – WeChat notifications on your Pebble!

As the Pebble smartwatch is becoming more and more mainstream, so is the need for supporting a wider range of messaging applications. While much of the Western world does not know about WeChat, surely everyone has at some point or another heard of WhatsApp or Blackberry Messenger. Well, WeChat is very much the same thing but it’s the most popular mobile instant messaging chat in China with over 300 million users! The single one feature that makes WeChat unique is having a walkie-talkie feature in its very core. At the literal push and release of a single button, WeChat users can send voice messages to each other, thus avoiding all the trouble of typing.

Because WeChat is popular in China, it is bound to push notifications which include Chinese characters. These characters are currently not supported in the Pebble (it uses Unicode for character encoding but due to space restriction it does not include fonts for characters beyond the Latin alphabet) and WeChat Pebble also takes this issue out of the way.

Adding a font with 2000~3000 characters seems to be troublesome due to severe space restrictions in the Pebble firmware. Therefore, I came up with an approach which makes use of the Unifont character library to render messages on the Android app and send them to the Pebble watch as a bitmap. This effectively solves the problem not only for Chinese but also for Russian, Hebrew, you name it!

WeChat Pebble in action!

WeChat Pebble in action!

All of this is available as open-source and for free.

-> If you are a developer, read past the installation steps for some hardcore open-source goodies

-> If you just want to use this and don’t care about the source code, just read the following two simple steps!

1 – Install the Android app available in the Play Store here or by scanning the QR code below.

NOTE: For the app to actually push the WeChat notifications you have to first start the app and follow the instructions. Also keep in mind that in the Settings you can choose different types of notifications.

Play Store

Play Store

(N.B. If for some reason you cannot access the Android Play Store, the .apk is also available directly from my website by clicking here.)


2 – Install the Pebble watchapp by installing this .pbw or by scanning the QR code below.

Pebble Watch App (.pbw)

Pebble Watch App (.pbw)


After this you’re pretty much done! Just enjoy and feel free to drop me a comment below or visit the Pebble forums’ here! I will keep updating this post with news on the WeChat Pebble app.

The source code is available for free on GitHub:

Now running off a Raspberry Pi!

During my recent trip to the UK I indulged myself in buying a Raspberry Pi. There’s just so many things you can do with one that my initial plan of having it as an XMBC media center in our living room was quickly subdued by the rush to run my blog off it.

Lo and behold! Here it is!

This blog now proudly runs off the Raspberry Pi in the photo below. Neat, hey?!

The mint plant in the background goes hand in hand with the RPi's green nature at only 3.5W input!

The mint plant in the background goes hand in hand with the RPi’s green nature at only 3.5W input!

My next plan, with the money I’ll save from not paying for hosting, is to buy at least one more (I actually want to buy two more but shh! Don’t tell my wife!) to serve as my own personal mail server. With the free version of Google Apps going the way of dinosaurs and even though current users can still use the service, it’s pretty clear we’re second class customers and rather than waiting until we’re pushed to pay, I’d rather be more proactive and switch on my own timing. In all honesty, after the recent news on Lavabit I’m starting to grow more and more afraid of having my private data based off US servers, so Raspberry Pis it is!

Silicon Valley and Mozilla (or The Story of How I started Using Firefox Again)

My blog writing continues being as sporadic as sporadic can be, and it kind of saddens me because writing still is very much a passion for me.

This time I come to you, my readers, with an exciting trip I recently took to Silicon Valley with a group of entrepreneurs from Delft’s University of Technology. In this trip I had the opportunity of meeting many different interesting people from all walks of life. People with different life experiences that ranged from an ex-con to people who had successfully started their own tech company. Amongst all these people, there was one that really stood out for me, and that was Pascal Finette who you might or not know. Pascal is something at Mozilla. To be frank, I didn’t actually get what’s his official position but in the grand scheme of things, it didn’t really matter. As a matter of fact, I think that’s part of the take home message from the presentation Pascal gave us. What you do matters much more than what you say.

In many ways, Pascal’s talk was inspiring. Somehow I had this prejudice that Mozilla (and Firefox, more specifically) was a dying brand/company, but this view changed as soon as I stepped into their offices in Silicon Valley and started hearing about their core values. Many a times we hear the cliche “there’s no free lunch”, but if there is such a thing as free lunch, then that’s what Mozilla is doing for us and they’re doing it for the sake of it. Truly for free. Looking at what Mozilla does from a truly objective perspective, it kinda feels like Mozilla is the Mother Theresa of the software world. And don’t take me wrong, there are many such companies out there, but Mozilla in particular inspires me for how they defined their core values and for how they juggle so well their position as a company that needs to be kept financially afloat and as an ultimately open-source organization which relies (as far as I understand) solely on no one but themselves and a bunch of people who contribute with labor and money.

I’m an open-source advocate, but that doesn’t mean I’m an open-source monkey. I’m that kind of guy who knows the value of open-source but not the kind of guy who uses open-source exclusively just because it’s open and free. Open-source is great and many open-source projects stand shoulder to shoulder with their paid counterparts but for many things still, the paid alternatives are just better. Being a contributor to open-source myself I’m able to see the value in it while at the same time realizing that sometimes, you just have to pay to have software that makes your life easier (e.g. give me Photoshop over Gimp, anytime).

There’s also a long standing “joke” in the open-source world, in that most non-tech people actually don’t know what’s open-source. They don’t know the difference between free and “libre” (“libre”, being a Spanish word for the other kind of free which seemingly the English language cannot describe, became famous for its inclusion in the name LibreOffice – a branch of OpenOffice that’s, well, truly open, free and libre).  Naturally, many people would describe Chrome as free, or Facebook even. What they don’t know is that whenever they use either of these products, they are paying with one of their most precious possessions: their privacy.

I don’t want to get into legal trouble here, and for the most part I like to think of Google as mostly benevolent (but a corporation nonetheless). However, if you truly want to stick it to the man and use something that is pure free and no strings attached to any corporation that makes money off you, go Mozilla; go Firefox. The browser is not worse than Chrome, and this is the story of how they conquered me back. Through one talk by Pascal Finette.

libgdx and Vector2 mutability

Here’s a quick post to rant about something that’s been affecting me for the last couple of days.

Recently I find myself toying around with libgdx to work on a game that I’ve been meaning to develop for a while. The problem with this library is that apparently, all Vector2 functions affect the actual vector on which they are invoked. This goes against the Java standard of immutability for non-primitive types and is incredibly annoying, especially because these functions will also return the vector for chaining.

Why is this annoying? Well, when you’re used to the Java standard, you don’t expect any functions to affect the actual object. Think for example about Java’s String.split. This will never affect the String itself, especially because the String is immutable. Affecting the String would mean creating a new instance of that string with the change applied to it.

Frankly, I’m not sure what happens in the backstage but this stinks.

Turmeric SOA – Lessons learned

As soon as I picked up on Turmeric SOA as the engine that powers my research, one of my supervisors warned me: be careful, or you’ll be caught in technology hell. As much as I hate to admit it, this has inevitably happened. The point is… I’m using Turmeric SOA which is open-source and open-source is great for research. Everything is so open that I can afford to publish literally everything I do. This means that all the claims I make with my research can be easily verified independently by other researchers.

I love this transparency.

The problem comes when the transparency is the result of emptiness. More specifically, Turmeric SOA is open but its documentation lacks vastly. In the inception of its open-sourcing by Intalio, Inc. their software engineers were working night and day to adapt the wiki pages (which apparently are the only public form of documentation) from mentioning “EBAY” to mentioning “TURMERIC”. However, as the dust began to settle and eBay decided to go in-house with the open-sourcing, the work done on Turmeric SOA has greatly diminished and what once was a promising open project is now a graveyard. eBay’s software engineers keep a low key and aren’t exactly supportive of other people using Turmeric SOA which is very disappointing. It seems common sense that if a project is open-sourced, the main goal should be for it to get a large user-base. The more people contributing and using a piece of software, the more ideas and bugs will be found and thus, the more refined the project will become.

This has not happened. As an outsider, eBay’s stance on open-source seems that of a beach-goer who’s too afraid to go for a dive and instead just keeps probing the water with their toes. This is bad. It’s bad for eBay because it will inevitably taint their reputation with open-source, it’s bad for the community who now get a half-baked services platform and it’s bad more specifically for me. Now I have to deal with a promising but ultimately difficult to use platform. Most everything I do with Turmeric SOA requires copious amounts of manual debugging in order to figure out what’s happening and ultimately, these debugging sessions reveal that what was advertised as a feature, really isn’t one.

In sum, the lesson learned is: be wary of large open-source projects. Unless there is a strong community around it, you’re gonna have a real tough time.