11.26.2008

Parallax Board of Education with Eee PC

I have a Board of Education from Parallax. I use it to program a Basic Stamp 2 microcontroller and perform various experiments in electronics. Today I figured out how to use it with my Eee PC 901. My BoE is has an RS232 port and I have a USB2RS232 adapter, so I can connect the programmer to my Eee PC via a standard USB cable. The adapter is handled by the usbserial kernel module, which is pre-installed to the default system, so I have to just load it as root:

sudo modprobe usbserial


The module creates the /dev/ttyUSB0 device file, but unfortunately the prorammer program looks for the /dev/bstamp device. So I have tweaked with udev to make it properly. I have created a custom udev rule file for this device. For that I have created the file /etc/udev/rules.d/10-custom.rules with this content:
# 10-custom.rules
# My own rules

# for the basic stamp programmer with rs232 - usb converter
KERNEL=="ttyUSB0", SYMLINK+="bstamp", GROUP="users", OPTIONS+="last_rule"

After that I have reloaded the udev rules like this:

udevcontrol reload_rules

And now, when I connect the programmer with thee USB cable, there is the /dev/bstamp device with the proper read/write rigths.
The next step is to install the programmer software. I use the BASIC Stamp Tools for Linux. I have downloaded from their site, and opened the archive. I have compiled the source with make, and installed with sudo make install
To install the proprietary tokenizer library from Parallax properly, I have done this as root:

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

The previous installation put the tokenizer called libbstamptokenizer.so into the /usr/local/lib directory. These steps make it available for dynamic linking. So now I have two executables installed: bstamp_tokenize compile PBASIC language sourcecode, and bstamp_run download the compiled code to the microcontroller. An example session with compiling and code execution:

> bstamp_tokenize hello.bs2 hello.tok
PBASIC Tokenizer Library version 1.23
> bstamp_run hello.tok
Basic Stamp detected!Model: Basic Stamp 2
Firmware version in BCD = 16
18 characters transmitted
18 characters echoed
18 characters transmitted
18 characters echoed
18 characters transmitted
18 characters echoed
DEBUG OUTPUT: (Press [Control]-[C] to complete sequence)
_____________________________________________________________________
Hello world
Hello world
Hello world
___________________________________________________________________
Received [Control]-[C]!
Shutting down communication!

Success! So now I can use the Board of Education too continue my experiments!

11.22.2008

Flashcard program for Eee PC

I am learning Finnish language, and for that I need a flashcard program. Finnish words are hard to memorize, even though I am Hungarian, and since Hungarian and Finnish are somewhat related, I should learn easier than others, but it is not so. I hope that a flashcard program would help a bit. Earlier I have used kvoctrain on my other computes. I was looking for that program, but I have found, that if I install it from the debian repositories, it will update half of my system, and I do not want that.
Instead I have found that there is a program called mnemosyne. I have fallen in love immediately with its name. (You know, it is a Greek word after the name of an ancient goddess, but it also name of a beautiful butterfly.) It turned out, that it is easy to install this program I had to preinstall these packages from the debian repo: python-pygame, python-qt3, python-xml, memaid-pyqt, and python-setuptools. After that I have downloaded the linux source from the site of the project. I have decompressed, and after that I have installed ad root with the command:
python setup.py install
in the directory of the archive. It had installed without problems and now I can use it. The program works as expected, and I am fighting with words. Hopefully I will learn at least in some extent.

11.14.2008

Online storage services on Eee PC

I have just noticed, that Asus have provided me with my Eee PC 901 also a service called Eee Storage. It means 20 Gb storage on somewhere on a web based file server where I can keep my files and access from anywhere when I have internet connection. The idea is not new nor unknown for me. I have accounts for Box.net and also Dropbox services. I like both of them, since they have their own unique value. I like Box.net because they integrate seamlessly with other web 2.0 programs like Zoho or Facebook. And the best is that they provide accessibility also via webdav, so I can access my files directly from konqueror or any other file manager with webdav support.
I also like Dropbox. They give a client program available for Windows, Mac a Linux. The client connects to the internet storage and syncronizes a directory on the local hard disk and the file server. It means that I can work also offline, and the changes in the directory content is synced whenever next time I have a connection to the net. I enjoy most their directory sharing feature. We have created a shared folder with my father, so when I want to send him files, e.g. our latest family pictures or videos, I just copy them to this local folder, and after a while he can use them also.
So this is my experiences with online storage when Eee Storage came into the picture. I have realized this service just a few days ago, and I have tried yesterday. The size of the storage (20 Gb) is impressive compared to the free Box.net or DropBox capabilities. There is a built in client feature in the default file manager of my Eee PC which is produced by Xandros. Unfortunately I prefer to use Konqueror, but since the access method to the storage is not public (or I haven't found yet), I cannot setup it. The access with the default file manager is intolerably slow. During the first connection it sets up the account for me in the Eee Storage server without further notification. Unfortunately if I want to use the web interface, I have to make further steps to get the user name and password for it. The help in the FAQ of the service is misleading, I do not have the required 16 digits code on the manual of my gear nor the specified directories where I am supposed to do the setups automatically. Instead I have found a shell script in the Eee Storage/Web Storage directory called Account Setup.sh. Clicking on it I was able to provide the user name, password and email address what I wanted to use with my account. So this is not very mature, I have expected more from Asus. Not to speak that after the registration the service have sent me an email in which my user name and password is stated in plain text. I hate this kind of insecure solutions. Finally I was really disappointed with the speed of this service, so I have decided to go back to the other two solutions.
I quickly decided that Dropbox is not an option this time, because I do not want to give local hard drive space for the offline working. Instead I will use my Box.net storage mounted locally with webdav filesystem.
For this I have installed wdfs (and the dependent libneon26 package) as explained here. After that I was able to mount and umount manually the Box.net storage place. To make life easy, I have created two scripts for the task:
mountbox
wdfs http://www.box.net/dav '/home/user/My Documents/Boxnet' -u 'my.email@for.box.net' -p secret_passwd

umountbox
fusermount -u '/home/user/My Documents/Boxnet'

I have created the target dir:
mkdir '/home/user/My Documents/Boxnet'

And I have put the two scripts into the /home/user/bin directory. After chmod u+x *mountbox in that dir the scripts are working like a dream. The service is not particularly quick, but not bad. I can mount, umount the directory, move or copy files from any file manager, or even better, from command line. And that is it. Maybe when I will be out of storage, I will also use Eee Storage.