Month: January 2010

Getting started to HCS08 BDM programming

I decided to reprogram my wash machine. Then after my wife used the machine for the first time I opened it and realized it uses a Freescale MC9S08AW16 microcontroller.

Now I got some sample of this uC and will learn how to use BDM interface to program it. Fortunately I found a nice site with tips about how to program it:

Other very interesting link specially for Linux users:

MicroSD WiFi with Linux support

I like Motorola A1200 too much, in fact I think it was the first Linux cell phone released at many countries. This cell phone has some drawback as missing WiFi and GPS support.

But at least the WiFi problem could be solved using this microSD card:

This microSD card uses a WiFi chip developed by a Japanese company called KeyStream. Hopefully this company was acquired by Renesas and it release it Linux driver as OpenSource:

I didn’t test it until now, but I am considering to buy one to test it on my A1200 cell phone.

Installing Babylon dictionaries on Ktranslator

Currently I use Ubuntu as main operating system, it is based on Gnome, but I was missing a great software when I was using KDE few years ago. This is Ktranslator a great translator software developed by a Brazillian guy.

Using Ktranslator you just select the word you want to translate and press Ctrl, then will appear a pop-up showing the translation.

Hopefully there is Ktranslator on Ubuntu repository:
$ sudo apt-get install ktranslator

Now you need to install dictionaries, we can use a free dictionary, but Babylon dictionary is more complete. Then first download BGL files (Babylon_English_Portuguese.BGL and Babylon_Portuguese_English_dic.BGL), I will not point you to site where you will find it, just search on google, you will find a page with many BGL files.

Now you need to convert it to .dic, first install the converter:
$ sudo apt-get install dictconv

Now execute the converter tool:
$ dictconv -o Babylon_English_Portuguese.dic Babylon_English_Portuguese.BGL

Remove some unused characters:

$ cat Babylon_English_Portuguese.dic | sed 's/\$[0-9][0-9]*\$\t/\t/' > Babylon_English_Portuguese_novo.dic

Now convert it to Startdict format, first install stardict tools to get to converter:
$ sudo apt-get install stardict-tools

Then run the converter:
$ /usr/lib/stardict-tools/tabfile Babylon_English_Portuguese_novo.dic

It will create 3 files:

This is time to run ktranslator application, it will ask to configure the directory. Then choose an intuitive name as Babylon_English_Portuguese and press Next. Now select Stardict format and browser to the directory where you place the above files.

Ktranslator will filter other files, you will see only the “Babylon_English_Portuguese_novo.ifo”, select this one and complete the instalation.

Now you can select any word and press Ctrl to get it translated instantaneously.

Source: This page was very useful

Getting information about your v4l device

You can use the “v4l2-ctl” command to get information about your device:

$ v4l2-ctl -d /dev/video0 --all -L
Driver Info:
	Driver name   : pwc
	Card type     : Logitech QuickCam Notebook Pro
	Bus info      : usb-0000:00:1d.0-2
	Driver version: 655372
	Capabilities  : 0x05000001
		Video Capture
Format Video Capture:
	Width/Height  : 160/120
	Pixel Format  : YU12
	Field         : None
	Bytes per Line: 240
	Size Image    : 28800
	Colorspace    : Unknown (00000000)
Video input : 0 (usb)
Video Standard = 0x00000000
                     brightness (int)  : min=0 max=128 step=1 default=64 value=63
                       contrast (int)  : min=0 max=64 step=1 default=0 value=50
                     saturation (int)  : min=-100 max=100 step=1 default=0 value=0
             auto_white_balance (bool) : default=0 value=1
                       red_gain (int)  : min=0 max=256 step=1 default=0 value=128
                      blue_gain (int)  : min=0 max=256 step=1 default=0 value=128
                          gamma (int)  : min=0 max=32 step=1 default=0 value=9
       shutter_speed_(exposure) (int)  : min=0 max=256 step=1 default=200 value=227
              auto_gain_enabled (bool) : default=1 value=1
                     gain_level (int)  : min=0 max=256 step=1 default=0 value=-5
error 22 getting ctrl Save User Settings
error 22 getting ctrl Restore User Settings
error 22 getting ctrl Restore Factory Settings
                    colour_mode (bool) : default=0 value=1
                   auto_contour (bool) : default=0 value=1
                        contour (int)  : min=0 max=63 step=1 default=0 value=-1
         backlight_compensation (bool) : default=0 value=0
                    flickerless (bool) : default=0 value=0
                noise_reduction (int)  : min=0 max=3 step=1 default=0 value=1

In order to use this program you need to install the ivtv-utils package:

$ sudo apt-get install ivtv-utils

Oficial USB Vendor List

When you executes the “lsusb” command:

$ lsusb 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 147e:2016  
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 005 Device 002: ID 093a:2510 Pixart Imaging, Inc. 
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

As you can see there is a unlisted device (147e:2016). The first number (147e) is the Vendor ID and the second (2016) is the Device ID.

If you converts this Vendor ID (147e) from hexadecimal to decimal you will find 5246.

Then we need to query the oficial USB vendor list to find the manufacture of our product:

In this listing you will find that 5246 is the “UPEK Inc.” the manufacture of our fingerprint reader.