Yet another challenge

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

I recently bumped into an fxs-fxo gateway. An old device by it’s just for fun and to get to know how such a gateway can be used. I like to be able to realize some features:
– forward land line calls to a SIP  account
– placing a call from a SIP account through the land line
– being able to log incoming and outgoing calls a the land line
– if even possible record phone calls
– ‘multicast’ the ring of a land line call to both fixed phones and softphones

First of all I have to hook the device up to an old fashion serial port to re-initialize it.

Connecting through the serial line was possible, however I won’t get any information only a ‘progress bar’ kind of output. This bar will continue over multiple rows, I don’t know if I have to wait longer before it is going to stop.


Will be continued

WRT320N recover

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

After the unsuccessful attempts to get the Sitecom WL-351 up and running with OpenWrt I did another attempt to revive my Linksys/Cisco WRT320N router, with DD-WRT on it. All of a sudden this router didn’t work anymore, probably after a power failure.

The situation was that the power LED kept blinking when I connected the power cord. No SSID was broadcasted which I should considering how it was configured. I did a 30/30/30 reset, at least I tried, but it didn’t work. Also trying to use the WDS button as a reset button didn’t work. Connecting through a UTP cable in the WAN or one of the 4 LAN ports wasn’t successful.

Searching for a solution I thought it would be another TFTP challenge to maybe get it up and running. After the Sitecom TFTP exercise I wasn’t too happy with that idea.

But I found a site ( which describes 4 attempts to unbrick a WRT320N.

Attempt 1: Hard reset using 30/30/30 method (already tried)
Attempt 2: GPIO 6 method – Reset by short wiring PIN 6 to GND
Attempt 3: TFTP Command line
Attempt 4: TFTP Flashing

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Luckily I managed to get my router a life and kicking using the GPIO 6 method!

Yes … !





Sitecom WL-351 – OpenWRT


At the moment I’m trying to flash my Sitecom WL-351 router with the OpenWRT firmware.
First steps have been made by opening the case and soldering wires to the serial port holes of the PCB.

I only use the GND, TX and RX pins and left the VCC connection unconnected (the router will provide its own power as will the computer from which the firmware needs to uploaded).

You cannot simply connect these wires to a serial port (if I have had one) but should use a USB to RS232 TTL Converter Module when you want to connect the serial ‘port’ of the router to the USB port of the computer. Luckily I had one USB-BUB II (used to flash my JeeNodes) which works perfectly. (For more information visit this OpenWRT page)

Once the two devices was connected by wires I started putty to open serial connection, for the Sitecom WL-351 the baudrate is 57000 (extra parameters 8N1). When the console is started I switched the power toggle of the router and …. yes I saw meaningful lines of text coming from the router.

On the OpenWRT site I used this page to get started.

to be continued

Nodo project – Nodo Ethernet Shield (NES)

Today the NES kit has been delivered and I got it working.


After same soldering the NES seems to work. I connected it to the router configured the port forwarding and logged into the Nodo Webapp. The Nodo is recognized over the internet and I could configure some settings in the Webapp. Now the issue is to figure out what addresses my KAKU devices have so I can control and monitor them.

Hopefully I can do some domotica very soon.

Interested in this hardware then take a look at:

Nodo domotica
Nodo shop – the NES
Nodo wiki
Nodo forum

Linux screen command

Working remote on your Linux system through ssh requires for some actions which take long that you keep your session en terminal open for a long time. To overcome this need there is a nice tool called screen. This enables use to detach a session from the terminal and re-attach it later. It provides the possibility to shutdown your ssh session and keep the process running. At a later point in time you can start a new ssh session from anywhere and re-attach the process.

To install on Raspbian just execute
sudo apt-get install screen

To use it
sudo screen

To detach the process press Ctrl-A d

To re-attach the screen
sudo screen -r

To see all screens
sudo screen -ls

To re-attach a specific screen
sudo screen -r 7849 , where 7849 is the screen ‘process’ number

A much better how-to can be found here.

Raspberry Pi’s are on their way …

Finally I ordered my RPi’s and hopefully they will arrive first week of Decemeber. In the mean time memory has been doubled to 512Mb and Oracle has done a good job providing Java for the Rpi. So in the end the waiting has been a positive result.

Days are getting shorter and outside the temperature is getting down. Perfect time to continue the Domotica quest.

In the mean time ideas about how to implement my system have been evolved. From a closed non-standardized ‘architecture’ to ideas related to the Internet of Things way. This means that after the prototypes and proofs-of-concept phase the goal is to provide a RESTFul interface to the sensors and actors.

RFXcom has introduced their new tranceiver which look promising. This transeiver has a lower price (<50%) than its big brother the standalone LAN version. Together with the Rpi the USB version might form an excellent couple. Also because RFXcom provides an SDK for developers.

Sooo many ideas …

Average data from database

In my previous post I created a chart showing the hourly average temperature. The average was calculated from measurements taken every 5 seconds. These measurements are stored in a mySQL database together with a timestamp.

The question was how to extract the hourly average from this table to feed to the pChart scripting or to whatever code you like. I found the SQL solution below to make it happen.

      AVG(`value`) AS `Average`,
      YEAR(`timestamp`) AS `Year`,
      MONTH(`timestamp`) AS `Month`,
      Week(`timestamp`) AS `Week`,
      DAY(`timestamp`) AS `Day`,
      HOUR(`timestamp`) AS `Hour`,
    FROM `temperature`
    GROUP BY 'Year',`Month`,`Week`,`Day`,'Hour'`;
Extract average per hour
      AVG(`value`) AS `Average`,
      YEAR(`timestamp`) AS `Year`,
      MONTH(`timestamp`) AS `Month`,
      Week(`timestamp`) AS `Week`,
      DAY(`timestamp`) AS `Day`,
      HOUR(`timestamp`) AS `Hour`,
      Minute(`timestamp`) AS `Minute`
    FROM `temperature`
    GROUP BY 'Year',`Month`,`Week`,`Day`,'Hour', `Minute`;
Extract average per minute

It is possible to create a VIEW in your database which can be queried in your code. A VIEW looks like a table but it is the result of a SQL statement is given a name and can be used as a table in queries.



Data – (p)Chart – information

These days I’m investigating the use of pChart for the graphical representation of all measurements to be collected by my domotica solution. If we collect sensor data the database will be filled with thousands of records. Records in a database are of no value if we don’t convert them to a nice representation. This can be done by generating charts, so we can see e.g. how a temperature changes over time.

Searching the internet I found pChart as a PHP solution for creation of wonderful charts of all kind. Their site is shows numerous examples of line, pie, bar, etc. charts.

It is easy to make a professional chart using database logging together with the pChart classes. The style can be customized and their are abilities to add image maps to get dynamic feedback.

In the picture below you see an example of a chart with the average temperature per hour.
The x-axis shows the week number (of the year) – day number (of the week) – hour (of the day).

We can see the temperature go down a bit in the night and go up again in the morning.

Over time we can learn a lot about e.g. temperature, humidity, pressure, … when enough data is collected. Of course we can use several representations of the data depending of the period that has been logged and the type of data. When electricity consumption is collected it is of course possible to create a chart with the cost per period.




New equipment and waiting for some more

It’s been a while since the last post. Recently I bought a RTC plug and a BMP085 plug. Didn’t try anything yet but soldering the headers to them. It will not take too long before I make the first sketch or try some of the shelf. I’m waiting to get one or more Raspberry Pi’s but they were sold out in no time :-( It will take another 1-2 months before I’ll get hold of one so this means I’m gonna focus on the JeeNodes for now. The intermediate ‘layer’ has to wait for some months.