Kacang Bawang

RaspberryPi Kiosk Mode Explained

Just some notes on getting the raspberrypi kiosk mode going at the time of this writing (Jun 2017).

Read more »

My First 5 Minutes on a RaspberryPi

Greetings and salutations. It has been a really long time since my last post. IRL job has been sucking the life out of me. Someday I will tell you all about it…

Anyhow, I’ve been carving out some time for playing with a raspberrypi display and wanted to save some notes for posterity. This more a note to self than anything, but if someone ends up here via googling, I hope it will be of help.

Without further ado, here are the first things I do after booting up a new RaspberryPi installation.

Read more »

My First 5 Minutes on an OpenWRT Router

This article talks about the changes that I like to make away from default configuration on a new OpenWRT installation.

Read more »

Best New Router for OpenWRT ;)

A small note of triumph 🙂

For some time now I’ve been looking for a modern router. Yes, that WRT54G isn’t getting any younger 🙁 But few people are willing to “school” one on what’s the one to get these days (these days = May 2016). So after a long string of “google it” responses, I finally buckled down and did my own research. You wanna know the conclusion? 😉

Read more »

DSL provider blocks 3rd-party modems via MAC filter

About one week ago my internet provider started blocking 3rd-party/user-provided/own DSL modems. The symptom is that the router does not get an IP from the DSL modem, yet all the proper lights on the modem are on. I even called the main office and asked if the were blocking. They said no. But if you run OpenWRT, you can examine the PPPoE negotiation logs and will see that solicitations from the DSL modem are never answered.

One the other hand, if you plug in the provider’s router/DSL combo the connection is quickly established. Here it would be nice to get a wireshark dump of the negotiation, but let’s just check something first. What if we change the MAC address of our WAN interface to match that of the provider’s router? This can be easily done via

Let’s try connecting again. Sure enough, we’re in.

EEPROM for ESP8266

This article describes a small EEPROM emulation library that I wrote for ESP8266. It implements a very simple EEPROM emulation scheme that allows storing 16bit values. Each such 16bit value is found by its 16bit index.

Read more »

ESP8266 SDK: how to debug with gdb

Not long ago, to little fanfare, Espressif (the makers of ESP8266) released gdbstub – a library that allows use of gdb on ESP8266. It works with both non-OS and RTOS SDKs, and works over UART, not JTAG. You get 1 breakpoint for RAM and 1 breakpoint for FLASH. Is this awesome, or what!? Authorship is unattributed, but is believed to have been written by Sprite_tm.

In this post, I will show you how to add gdb support to your project. This example will use the RTOS SDK, but applies just the same to the non-OS SDK.

Read more »

Which allocation scheme does ESP8266 RTOS SDK use?

I wanted to know which memory allocation scheme (heap_1.c, heap_2.c, heap_3.c, heap_4.c or heap_5.c) was used in the ESP8266 RTOS SDK. This is not mentioned anywhere in the docs (I’ve looked as of 1/12/16). What to do?

Let’s just take a look at what is compiled in then.

Actually, this works even with a regular ‘nm’, hehe.

What do we see?

Aha! heap_4.o means heap_4.c was used. ‘T’ means that this symbol is exported.

OpenHAB2 binding architecture

In this article I will walk the reader through the inner workings of an OpenHAB2 binding. It is meant to answer the question of “who calls who and when?”, which invariably arises when one starts working with a new framework. It is a summary of what I had learned while writing the binding for my smart switch. If you are thinking about writing a custom binding from scratch, then this article is for you!

Read more »

ESP8266 512k flash: compiling using RTOS SDK 1.3

Since update from version 1.2 to 1.3 of Espressif’s RTOS SDK, if you try to compile anything targeting a 512kB flash device you get this message:

In this post I will show you how to organize and compile a project to using the RTOS SDK and how to solve the above problem. This post builds on this one, review as necessary.

Read more »