The Hackaday Prize: Quarterfinalists

I personally want to congratulate and express my respect to the Greek team of SatNOGS that won the Hackaday contest.
Excellent work, keep it up! The fundamental ingredient of success: Collaboration.


T-shirt and sticker is fair enough for my personal effort :)

Nokia's firmware changing bluetooth mac address

I own a Nokia X6 16Gb, and the other day, software update remind me that a new version is ready for download.

I download and install it, and after that, I realise that bluetooth's mac address was changed!

Weird but true. The version is 40.0.002, with date 12-10-2011.
Does anyone else has that experience?

Nokia, why is that?

Introducing, the jReCo

After a lot of R&D and some user requests, I'd like to present the jReCo! A wireless home control station.

jReCo Description:
USB radio frequency transceiver that plugs into your computer and let you control remotely multiple devices that operates at 433/315MHz such as plug socket receivers.

Applications:
Turn on/off your lights, radios, routers, hubs, fans, etc from your computer. You can automate anything that runs on electricity and can plug into a remote socket receiver.

jaNET Support:
  • Control almost any remote socket receiver
  • Control from anywhere in the world
  • Schedule your appliances
  • Receive/Transmit signals
  • Possible to develop your own application

Compatibility:
jReCo is compatible with just about every remote control socket receiver in the market.
OS: Windows, Linux, Mac OS

Specifications:
  • Connection: USB
  • Range: ~30m
  • Power: 5V (USB powered)
  • Frequency: 433MHz/315MHz (Depending your location)

Some images can be found here.

If you're interested please visit Product page.


Seriously?

Once upon a time, I had subscribed to Microsoft Office Live to check it out. I didn't use it as a main tool since I found more convenient Google Docs. Anyway, I tried to login from my home computer which it runs Ubuntu 10.04 and Firefox. In my surprise I came up with this message...

To use Microsoft Office Live, your computer must meet one of the following requirements:

* Microsoft Internet Explorer 6, 7, or 8 running on Microsoft Windows XP, Windows Server 2003, or Windows Vista. You can download Internet Explorer from the Internet Explorer page.

* Mozilla Firefox running on Windows XP, Windows Server 2003, Windows Vista, or Mac OS X 10.2.x and later. You can download Firefox from the Firefox download page.

Original page

Come on Microsoft!

Iron man JARVIS meet jaNET

Update: Project jaNET has a home and a Facebook pageProject jaNET provides a framework that allows various components to communicate, controlled interactively by the user. This procedure aim to act like a digital life assistant (DLA) which I inspired by Iron Man's JARVIS.

Since I finished a digital photo frame (you can find some material here) with a reflective dielectric glass in front acting like a mirror when its turned off, I thought... hmm, it's a hidden computer, why limited just to play photos and not do more things like, checking email, get weather, controlling my room lights maybe temperature, or any other sensor attached in future, and generally stuff could assist me in matters of information? Then JARVIS came as a guidance inspiration, and the project jaNET began!

But no more talking, lets cut to the chase! I'll try to describe and explain some actions "she" can do at the present time and "drop some specs".

Let's take a look to the hardware used by the time. I use a Phidgets 8/8/8 usb interface kit, a MaxBotix EZ-1 Sonar Sensor and a Dual Relay Board.
Relay board is responsible for the desk lights and the sonar to entrap my office area. Software written in java, is stand alone for each unit and called from jaNET when needed. Update: I use also an arduino microcontroller and sensors to measure temperature, illumination and motion activity.

Beyond hardware I built a framework providing some actions as described below.
Weather check, email check, knowing my gps position, controlling room lights, desk entrapment and alert when someone approach, listening bluetooth devices and react as the configuration XML file instructs, setting wake up calls, listening commands from anywhere by a custom web service or email, sending email alerts, sending sms alerts and sometimes talking too much :)

I wanted to be cross platform but emphasized on linux. I decide to use Ubuntu, C# Mono and Festival Speech Synthesis. I also needed to be flexible in matters of user preferences so the framework and the parser designed so, that the end user configure it to his way. The default instruction set simplifies the actions he has to do! The concept achieved with an XML configuration file.
For instance, I have a built-in function, called %mailcount%, which returns the number of incoming e-mails as an integer. Then I describe a new instruction set "checkmail" in the XML file, something like "You have %mailcount% mail messages". So when I call this command, the parser interprets, trigger the function from the framework, get the value and finally announce it if e-mails fetched. I think it's very handy because you don't need to have programming skills to make it work for you!

You can preview some videos on my youtube channel and more cool things is on the way!

Samsung weather conditions

Is it possible to have 21 Celsius degree in Vegas with snow flurries?

Samsung marketing department probably know something that we earthlings don't! :)

This picture is from the official announcement of the new Samsung I9000 Galaxy S.

ASP.NET (C#) Contact Form

Probably the most common page at any kind of website is the contact form! There is a ton of examples on the internet but many of them are under payment, step by step generators, joomla extensions, php scripts which required donations etc etc and lots of things that frustrates the most simple but important way to get in touch or feedback a website owner.

After that waste of time and the lack of an ASP.NET contact form I started to build my own and use it for my website and my (this) blog.

.NET framework provides a class library simplifies the way we send e-mail and it packed under System.Net.Mail.

I won't describe the process but I'll give you this form as example and the source code for download. It's very easy to manipulate, all you need is to build it and edit the settings in WebAppConfig.xml file.

Then you can add an iframe to a custom page and code it like this...
<iframe src="http://www.jambel.net/_dev/contact/Default.aspx" width=100% height=340px frameborder=0 allowtransparency="true"></iframe>
the result should be look like this...

Change between workspaces using HP 2140 accelerometer

HP mini 2140 netbook comes with an ST Microeletronics accelerometer and under linux kernel 2.6.27 we found a driver that supports it (LIS3LV02Dx).
With wmctrl and some scripting we can toggle between workspaces when we tilt the machine left or right. This is a useless script but it has some fun :)

First you need to install wmctrl
sudo apt-get install wmctrlbash shell script - Download#!/bin/bash

COUNTER=0

while [ $COUNTER -le 100 ]; do
    sleep 0.5
    POS=`cat /sys/devices/platform/lis3lv02d/position | awk -F "(" '{print$2}' | awk -F , '{print$1}'`
    echo $POS
        if [ $POS -ge 12 ]; then
            wmctrl -o 1024,0
        elif [ $POS -le -12 ]; then
            wmctrl -o 0,0
        fi
    COUNTER=$(( $COUNTER + 1 ))
done
UPDATE Sep 8, 2009: an approach in python - Download#!/usr/bin/python
import time
import os
cnt=0
while cnt <= 100:
    time.sleep(0.5)
    f = open ('/sys/devices/platform/lis3lv02d/position','r')
    data = f.read()
    ar = data.split(',')
    results = ar[0].replace('(',''), ar[1], ar[2].replace(')','')
    print results
    if (ar[0].replace('(','') >= '12'):
        os.system('wmctrl -o 1024,0')
    elif (ar[1] <= '-12'):
        os.system('wmctrl -o 0,0')
    f.close()
    cnt += 1
Note: Scripts will work when System/Preferences/Appearance/Visual Effects is set to Normal or Extra.

Show and hide gnome panels using gconftool-2

I own an HP mini 2140 netbook and as you might know the 1024x576 resolution is a little bit annoying. In order to gain some space I removed the bottom panel and decide to hide the top. I really don't like the autohide method and I needed something to do it manually. Then I open gconf-editor to figure out the settings that gnome using to apply these methods. When I found them I created 2 new custom keyboard shortcuts and wrote the followings:

Hide Top Panel
gconftool-2 --set "/apps/panel/toplevels/top_panel_screen0/auto_hide" --type boolean "true"
Show Top Panel
gconftool-2 --set "/apps/panel/toplevels/top_panel_screen0/auto_hide" --type boolean "false"
By default the size of the hidden panel is 6 so to gain even those 6 pixels make sure you run this first to resize it to 0.
gconftool-2 --set "/apps/panel/toplevels/top_panel_screen0/auto_hide_size" --type integer 0
Under Ubuntu everything works great!

Oakley Minute 2.0


My favorite sunglasses firm is Oakley by far! After 9+ glorious years with Oakley Minute I step forward to the next generation Oakley Minute 2.0 Polarized this time! What can I say, sunglasses rocks and they're definitely deserve the term HDO (High Definition Optics).

Ubuntu 9.04 (Jaunty Jackalope) with 2.6.30.4 Kernel on HP 2140

Recently I bought an HP mini 2140 netbook and decided to install Ubuntu on it. As I browsing around for known issues on this machine I get into that with default 2.6.28.14 Kernel the Dual Core option from BIOS wouldn't work and installation crashed. After some readings I found that the latest Kernel (currently 2.6.30.4) fixed the problem so I proceed installation with Dual Core option disabled.

After that everything works like charm except wifi. I look around again in Ubuntu forums, blogs etc and come with this solution from Jocelyn's Blog. Let's see it step by step:

- Download and compile latest Kernel, or use my ready made 2.6.30.4

to install these files just run dpkg -i packagename.deb

- preparing the installation of STA Broadcom drivers
sudo apt-get install module-assistant
sudo module-assistant prepare

- download the Broadcom STA driver from
https://launchpad.net/debian/sid/+source/broadcom-sta/5.10.91.9-1

- the 32-bit driver:
https://launchpad.net/debian/sid/+source/broadcom-sta/5.10.91.9-1/+files/broadcom-sta_5.10.91.9.orig.tar.gz

- download also debian patches for this STA drivers version from:
http://patch-tracking.debian.net/package/broadcom-sta

mkdir wifi;cd wifi

# download all needed files
wget http://patch-tracking.debian.net/patch/series/dl/broadcom-sta/5.10.91.9-1/01-hidden-essid.patch
wget http://patch-tracking.debian.net/patch/series/dl/broadcom-sta/5.10.91.9-1/02-license.patch
wget http://patch-tracking.debian.net/patch/series/dl/broadcom-sta/5.10.91.9-1/03-2.6.29.patch
wget http://patch-tracking.debian.net/patch/series/dl/broadcom-sta/5.10.91.9-1/04-2.6.30.patch


mkdir hybrid;cd hybrid

# unpack the driver
tar zxf ../broadcom-sta_5.10.91.9.orig.tar.gz

cd broadcom-sta/

# patch the driver
patch -p1 < ../../01-hidden-essid.patch patch -p1 < ../../02-license.patch patch -p1 < ../../03-2.6.29.patch patch -p1 < ../../04-2.6.30.patch cd i386/

# make the module
make -C /lib/modules/`uname -r`/build M=`pwd`

# copy it to modules location and load the module
sudo cp wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
sudo depmod -a
sudo modprobe wl

- in order to make sure the wl module is loaded after the reboot I’ve added wl to /etc/modules
sudo echo wl >> /etc/modules

Everything went well but wifi remained unavailable. I tried lspci -v and realize that Kernel driver was in use wasn't the wl but ssb (b43-pci-bridge). Then I read about KernelModuleBlacklisting from Debian Wiki and come up with the following solution:

sudo echo blacklist b43 >> /etc/modprobe.d/b43.conf
sudo echo blacklist ssb >> /etc/modprobe.d/ssb.conf
sudo modprobe -r b43
sudo modprobe -r ssb
sudo modprobe -r wl
sudo modprobe wl
sudo depmod -ae

- recreate initrd and restart Network Manager

update-initramfs -u
sudo service NetworkManager restart

and voila! wifi worked perfectly at last!
This tutorial will probably work for all devices using Broadcom BCM4322.

Got lucky with Kawasaki

Past Sunday (9 Aug 2009) a friend of mine went on vacations and left me his motorcycle a Kawasaki ZX-10 '07, so we arrange with another friend go for a ride and check it out. I was very exited because mine was out for service (Yamaha R1) and I had the opportunity to check out the ZX-10 and the GSX-R of other friend.

We went to Arachova and everything was great til returning. When we left mountains and lots of turns we rich the highway and decide in some part of the road to open the throttle a little bit, so we accelerate and at around 230km/h I realize that something was wrong with the back side and start decelerating but in 200km/h the bike started to "dance"! I tried not to panic and be as calm as I could to make very precise handlings in result to stop it.

Fortunately everything ended well and I'm just fine!

The mechanic told us that he found a piece of metal stuck in the tire and in combination with roads high temp it cause the tire to "burn".

Incident in pictures...







Real Time Color Based Object Tracking

This is my first attempt on Real Time Color Based Object Tracking/Recognition from a C# application I've build using AVICap.
The technique is very simple and very slow but it describes the basic idea... I use avicap32.dll to interact with webcam, grabbing the frames and represent them in a new picture box. After that the program scan every new picture-frame to track the position of a constructed RGB palette based on the sampling pixel.

There is also some other more sophisticated methods which applies image filtering like thresholding or bluring but it's still under -a lot of- development and I don't want to go further yet. Probably I won't even bother to implement.

Source code Download.

ASP.NET (C#) Intranet Application/CMS

This is one of the latest project I've created for the company I currently work for. It's an intranet/CMS application developed in .NET platform.

You can take a sneak peek here or click the image.

Login information

username: demo
password: demo

This is just for demo purposes and some modules may not be working properly due to some policies and settings. I'm going to debug it thou and provide it as complete as possible.
UPDATE: I believe now it's in a mature competitive level!

UPDATE #2 (April 7, 2010): Download User Manual

New jambel.net


My new website based on Joomla is ready!
See you there...

UPDATE: I discontinue updating joomla website and I'll continue writing in this blog.

Working abroad


After lots of thoughts and consideration I decided that I'm available working abroad especially in Berlin, Germany.
If you are an employer and you are interested to hire me then maybe you want to take a look at...

     * About me and my career so far
     * My complete resume
     * Contact me

Any proposal are very welcome!

Thanks in advance!

Quick and simple step by step ensymble guide for Windows

This tutorial is intended for a group of people that they're not programmers or they're new to PyS60 and like to experiment making .sis applications for mobile phones. There's a lot of documentation on the internet about ensymble but not a single simple step by step guide.

So the steps we have to follow to built a .sis file are:

1) Download and install OpenSSL for Windows.

2) Download ensymble python script unzip it and copy it to OpenSSL folder (something like: C:\Program Files\GnuWin32\bin\ensymble_python2.5-0.26.py).

3) Also copy your python script to OpenSSL folder and run ensymble command on the command prompt:
python ensymble_python2.5-0.26.py py2sis --uid=0xE0000000 --appname=your_app_name --version=1.0.0 your_app_name.py your_app_name.sisnow you have probably successfully build your .sis file. Also, be sure that you have path your python directory.

4) Go to Open Signed Online and fill the required fields.

5) You'll get an email with a signed sis file.

6) Install it on your phone and enjoy it!

Good luck!

Resources:
Ensymble: http://ensymble.googlecode.com
Ensymble readme: http://code.google.com/p/ensymble/wiki/Welcome?tm=6
OpenSSL: http://gnuwin32.sourceforge.net/packages/openssl.htm
Open signed online: https://www.symbiansigned.com/app/page/public/openSignedOnline.do

Spy phone python script for S60


The other day I was surfing some surveillance websites and I found some patented mobile phones called spy phones and also some spy software. All of course, at high prices for my standards! The concept is, you call the target phone which will result in the answering of it and let you listen into the surroundings. They also have some extra features like stealth/ghost mode, no lights or zero ringings etc etc.

However the price as I mention isn't reasonable and it's possible for someone with basic programming skills and some research on the internet to do that kind of work with no money at all! How?

Well, I wrote a simple python script for S60 compatible devices that allows you to call the target cellphone, which will acknowledge a number of your choice and afterwards when you hung up it automatically start recording any ambient sound or conversation surrounding the phone.
It has no ghost or no ringing capability but if you are using a Nokia phone you can achieve this by assigning a blank sound to that entry.

I have tested it successfully on my Nokia N95 8GB with Python for S60 1.4.2 final.
You can download the script here (Last update: Sun 23 2010).

Have fun :)

Wake on LAN MIDlet

Wake On LAN Mob is a J2ME application for mobile devices.

When I first posted Wake on LAN Java MIDlet on my website I received various e-mails asking me for some extra features, modifications and source code requests. I didn't expect so much interest at all so I decided to provide the source code.

Tested on Nokia 6630, Nokia N95 8GB, Nokia E65, HTC Touch, HTC TyTN II.
Screenshots: 1, 2, 3

Here is my simple implementation, enjoy!// © J@mBeL.net
import java.util.Vector;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;

public class WakeOnLan extends MIDlet implements CommandListener {

    private Display display;
    private Form mainScr;

    private Command OKCommand;
    private Command ClearCommand;
    private Command exitCommand;

    private static TextField tfIP;
    private static TextField tfMAC;

    private Alert alert;

    private static final int PORT = 9;

    public WakeOnLan() {
        display = Display.getDisplay(this);
        mainScr = new Form("WakeOnLan Mob");
        tfIP = new TextField("IP Address:\n", "", 16, 0);
        tfMAC = new TextField("MAC Address:\n", "", 17, 0);
        mainScr.append(tfIP);
        mainScr.append(tfMAC);
        mainScr.append("© 2007 jambel.net");
        OKCommand = new Command("Send", Command.OK, 1);
        ClearCommand = new Command("Clear", Command.ITEM, 1);
        exitCommand = new Command("Exit", Command.EXIT, 1);
        mainScr.addCommand(OKCommand);
        mainScr.addCommand(ClearCommand);
        mainScr.addCommand(exitCommand);
        mainScr.setCommandListener(this);
    }

    private class SendPacket implements Runnable {
        public void run(){
            SendStr(tfIP.getString(), tfMAC.getString());
        }

        private void SendStr(String ipStr, String macStr) {
            if(ipStr.length() == 0 || macStr.length() == 0) {
                alert = new Alert("Please fill IP and MAC address fields.");
                display.setCurrent(alert, mainScr);
                return;
            }
            else {
                try {
                    byte[] macBytes = getMacBytes();
                    byte[] bytes = new byte[6 + 16 * macBytes.length];
                    for (int i = 0; i < 6; i++) {
                        bytes[i] = (byte) 0xff;
                    }
                    for (int i = 6; i < bytes.length; i += macBytes.length) {
                        System.arraycopy(macBytes, 0, bytes, i, macBytes.length);
                    }

                    String address = "datagram://" + ipStr + ":" + PORT;
                    DatagramConnection packet = (DatagramConnection)Connector.open(address);
                    Datagram dgram = packet.newDatagram(bytes, bytes.length, address);
                    packet.send(dgram);
                    packet.close();

                    alert = new Alert("Wake-on-LAN packet sent.");
                    display.setCurrent(alert, mainScr);
                }
                catch (Exception e) {
                    alert = new Alert("Failed to send Wake-on-LAN packet: " + e);
                    display.setCurrent(alert, mainScr);
                    return;
                    //System.exit(1);
                }
            }
        }
    }

    private byte[] getMacBytes() throws IllegalArgumentException {
        byte[] bytes = new byte[6];
        String sep;
            if(tfMAC.getString().indexOf(":") > 0)
                sep=":";
            else
                sep="-";
                String[] hex = split(tfMAC.getString(),sep);
            if (hex.length != 6) {
                throw new IllegalArgumentException("Invalid MAC address.");
            }
            try {
                for (int i = 0; i < 6; i++) {
                    bytes[i] = (byte) Integer.parseInt(hex[i], 16);
                }
            }
            catch (NumberFormatException e) {
                throw new IllegalArgumentException("Invalid hex digit in MAC address.");
            }
        return bytes;
    }

    private static String[] split(String original, String separator) {
        Vector nodes = new Vector();

        // Parse nodes into vector
        int index = original.indexOf(separator);
        while(index>=0) {
            nodes.addElement( original.substring(0, index) );
            original = original.substring(index+separator.length());
            index = original.indexOf(separator);
        }
        // Get the last node
        nodes.addElement( original );

        // Create splitted string array
        String[] result = new String[ nodes.size() ];
        if( nodes.size()>0 ) {
            for(int loop=0; loop < nodes.size(); loop++)
                result[loop] = (String)nodes.elementAt(loop);
            }
        return result;
    }

    public void commandAction(Command c, Displayable d) {
        if (c == OKCommand) {
            if (d == mainScr) {
                SendPacket doIt = new SendPacket();
                Thread myThread = new Thread( doIt );
                myThread.start();
            } else {
                display.setCurrent(mainScr);
            }
        } else if (c == ClearCommand) {
            tfIP.setString("");
            tfMAC.setString("");
        } else if (c == exitCommand) {
            destroyApp(false);
            notifyDestroyed();
        }
    }

    public void startApp() {
    Display.getDisplay(this).setCurrent(mainScr);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}
You can download it here.

You can freely distribute it as you wish and if you like just add a reference on me.
Also you can e-mail me your modifications just to notify me.

Welcome to jambel.net blog

This is my first blogging attempt!

My name is John Ambeliotis and I'm a Software Engineer from Greece. You can check my full profile here if you like.

In this place I'll try to share some code parts I use and how do I do things in a range of computer languages/technologies. Also maybe some thoughts or life events that might happen and worth some mention, at least to me :)

I hope you to find some useful stuff.

Thanks for your visit, let's get started...