Category Archives: OpenWRT

Returning to a journey with IoT

Although I am not sure about the definition to this day, six years ago I tinkered my first IoT device that, like most prototypes back then, is equipped with environmental sensors with connectivity to the Internet.

It looks clumsy, with a Texas Instruments MSP430 F5529 Microcontroller development board, also TI’s TMP006 non-contact infrared sensor, an OpenWRT flashed TP Link NR-703N WiFi router, and a 16×2 LED display.

This little toy has been sitting next to my computer since its first reported temperature to the Internet via Exosite which partnered with TI to provide free trial of their IoT services to TI’s development board users.

Unfortunately, this freebies is about to end in March 2020. Migrations to Exosite’s paid services should be seamless, but I decided to roll my own on another cloud platform where I can still enjoy limited free services – Amazon Web Services.

The plan is to open up a custom RESTful API on an Apache server to capture the temperature data for future visualization. Code change is easy as the Lua script running in the OpenWRT router is as capable as a high level web component as it handles serial data communication with the lower level microcontroller.


Visualizing room temperature pattern with IoT

On my desk there is an IoT device that measures temperature and log data to the Internet. It is a hobby project build with Texas Instruments MSP430 series MCU, with an IR temperature sensor TMP006 (Infrared Thermopile Contactless Temperature Sensor) also from TI.


The temperature data are published via an OpenWRT TP-Link router to Exosite which is running a partnership program with TI on IoT services.


Last night I noticed something I never noticed before – a clear pattern of a less fluctuating period (around 19:00 to 21:00).


Possible cause: I turned off the fan to go dine out. When I’m back the fan is back on, added to the environmental factor that my body temperature and the turbulence from the fan lead to the fluctuation – just wild guess, it’s weekend 🙂

R on BeagleBoard with LCD and Android UI

After the successful installation of R in BeagleBoard XM, it is natural to come up with a concept of a calculator running R. The ingredients are simple: a small form factor BeagleBoard, a LCD screen, a simple keypad. R can run on Android but as a keypad passionate, no touch screen is better than the feel of real key punch.

As a proof of concept and also a weekend project, the R on the BeagleBoard is “bridged” across an Apache web server (also on the BB), to be accessed by an Android app which act as input device for R commands. Result returned from R is then forwarded to an 16×2 LCD screen from a previous IoT prototype with TI MSP430 MCU and a TP Link portable router with OpenWRT.


A little delay, but works.

The Android app is done in MIT App Inventor. It is a very nice graphical, easy to use, completely web based application to build Android app. No typing of code is required.


Improvised semi-automatic timer to record long running Nspire calculations

In recent calculator overclocking tournaments, some programs took over more than a few minutes to finish. In extreme cases, programs run over an hour. The size of data set of these long running calculations are not realistic in most cases for hand held calculators, but for the sake of overclocking comparison, they are attempted to obtain the time required.

Instead of just watching and waiting the calculator prompt to return and stop the stopwatch, a makeshift timing device is developed with an aim to automatically record the benchmark calculation run time on the TI Nspire. The device is simple and make use of the following components:

This device works in the following way:

  • The back-light of the Nspire will be on for the whole period running the benchmark calculation.
  • When the program is finished, the back-light will turn off after a predefined period, which is a user configurable setting.
  • An LED will act as an light sensing diode, and is placed on top of the Nspire screen. The voltage will be measured by the LaunchPad, and send periodically through the 703N router to Exosite.
  • From repeated testing the difference in voltage when the back-light is on and off are determined. This make it possible to set an alarm on Exosite with that known threshold.
  • The time to start the calculation is recorded manually. After starting, the task of taking the finish time will be taken care of by the Exosite alarm timestamp, as triggered by the drop in voltage detected from the turning off of the back-light.


Best result of the LED threshold is obtained when working in the evening and lights are turned off. Although the time taken is not as accurate as taken manually by stopwatch due to the delay between measuring of consecutive LED voltage (set as around 4 seconds to avoid flooding Exosite), it should be good enough for long running calculations that span a quarter to more than an hour. Better methods for timing may exists (e.g. internal timers on the Nspire itself) but this improvised one with simple devices and a free cloud service worked quite well, for the best part is automation so that I no longer have to look out from time to time to check if the calculation is finished.

Barrier Breaker

Finally got a chance to upgrade the little TP-Link WR703N to Barrier Breaker which was released last October.

Standard fresh upgrade from a stock 703N at with basic authentication admin/admin.

Welcome screen displayed soon after flashing.

The recipe for Barrier Breaker:

66% storage remaining. Hmm.. extroot might not work for this release.

Upgraded interface.

Overall nothing exciting for this release so far. Look forward to Chaos Calmer.