Kacang Bawang

OpenWrt – Reduce Hostapd Verbosity

A quick note about how to reduce the log level of hostapd, as it tends to dominate log entries in /var/log/messages.

Read more »

Review of Fosc-21 (Focus Oscilloscopes) – a $20 USB Oscilloscope from ebay

Fosc-21 usb oscilloscope

Sometimes we make a bad spontaneous purchase. It must have happened to everyone at least once. This is the story of one such purchase.

Without doing my research I clicked ‘buy’ on a really cheap Chinese USB oscilloscope from ebay – Focus Oscilloscopes 21 (Fosc-21). The crappy-ness of this “oscilloscope” is matched only by its “software”. Instead of kicking myself, I decided to extract the maximum good that can possibly be extracted from this experience by writing a “review”. Hopefully, some poor soul about to buy this atrocity will find this post first.

Read more »

Say Bye to Provider’s DNS Servers – Be Your Own DNS Resolver

Have you ever wanted to NOT use your provider’s DNS services? Maybe they are engaged in censorship, or are modifying non-existent domains to point at pages full of advertisement? One popular solution is to use public DNS servers, such as Google’s. But ask yourself this – how much information are you giving up to a DNS server? Every time you visit a new web page, the DNS server will know about it. You can build a pretty nifty profile on a person using just that info. Well, how else would you do it? You’ve got to ask somebody for the IP address. Actually there is a better way – ask the source, and avoid the middlemen.

In this article I will show you how to set up your OpenWrt router to do its own DNS resolution. We will look up domains starting from root DNS servers, without the use of 3rd parties such as provider/Google/OpenDNS.

Read more »

My Smart Switch, or How I Built a Smarthome Gadget with No Electronics Experience, While Living in a Village in Indonesia

smart switch

They say that laziness is the mother of progress. It certainly was in my case. I am currently residing in Indonesia, where the outside lighting of one’s house is somewhat of a security practice, and it so happened that it became my job to ensure that these lights went on every evening, and equally importantly, off every morning. This involved making a trip around the perimeter of the house each evening and flipping all the light switches I came across. It is especially hard to remember to do this in the morning, because the sunlight makes it is hard to see that the lights are on. Sure enough, after about a week I no longer saw the joy in this daily routine and decided to do something about it. I was going to make a remote-controlled switch that would automate this task, and at the same time, become the foundation of a smart home installation I’ve been dreaming about. There was only one little problem – I knew absolutely nothing about designing electronics and PCBs.

In the title picture you can see the result of my efforts. The physical switch consists of two wall wells – one containing the switch itself and the other containing its “brains” (seeing how it is a smart switch and all). The virtual interface is provided by OpenHab2 running on a RaspberryPi2.

Read more »

Latest AT Firmware for ESP8266 with 512k Flash

The AT firmware is the default firmware for ESP8266 and provides AT style commands for actions such as join access point and send tcp packet. It is distributed in binary form by Espressif, but it can also be built from source (binary blobby as it may be). Typically one can find a new version of AT firmware in each release of Espressif’s SDK.

Since SDK version 1.0.1 the binary distribution of AT has become too large to fit on a 512kB flash. However, at this point in time (end of May 2015) most of the ESP8266 units out there are of the 512 kB variety. Thus begging the queston: how can one update their AT firmware to the latest version?
Read more »

Breadboarding an ESP-03

Here is my method of mounting esp8266‘s, specifically ESP-03 on a breadboard without the use of a breakout board. Details inside.

breadboard esp8266 esp03

Read more »

Uncle Lao’s Surprise

I have a ATX power supply that I use to power my electronics creations, and I noticed that I’ve been getting shocked with electricity 😯 whenever I touched it! How could it be!? I used a grounded plug, a grounded wall socket, and still… I went on like this for a while, not wanting to shut down my device zoo, until one day there was a power outage and that left me no choice but to finally get around to diagnosing the issue.

Read more »

PIC24 and EEPROM

If you’re reading this, chances are you are in the same boat I was in before writing this text – I wanted to save some data to EEPROM on a PIC24F and … it doesn’t have one. (The manual claims that PIC24F has EEPROM, but that is not fully so – only select models, namely PIC24F___K_, do). What to do? Well, there is this nice lib (AN1095) from Microchip that implements software EEPROM. The lib is well written, lots of docs, but alas – it does not run out of the box. This post is about the additional steps that it took to get it running.
Read more »

Encrypting Stored Email with Postfix

This post is about something that has been on my mind for a while, but somehow always seemed too complex, too far from a practical implementation. Until now, bwa-ha-ha. Encrypted email. Before you get too excited, let me first say that we’re not talking about a mathematically perfect system, and it is certainly not NSA-proof. But! It is about as practical as it gets. We get a system where all email is stored on disk in encrypted form. This is a Big Deal. If your VPS falls to a 0-day for a few hours, the evil hacker won’t be able to grab a dump of your naked pictures email. Really, in any situation where an adversary gains temporary control over the server, this scheme will keep the contents of your emails secret. Just remember: IMAP messages tend to build up and stay on the server indefinitely… I mean, when did you last clean your inbox 😉

Read more »

Pitfalls While Setting Up esp8266 ESP-03

Here are some obvious and not-so-obvious pitfalls you may encounter while trying to communicate with an ESP-03 over UART. We will be using a USB-Serial device to connect directly to the ESP.

small

Read more »