Showing posts from 2011

Lego Mindstorm NXT - Programming Options

Option 1: Lego Mindstorms NXT Software version 2.0
The first and the official programming option for the NXT is Lego Mindstorms NXT software version 2.0 that is based on Labview from National Instruments. It is delivered with 8547 LEGO® MINDSTORMS® NXT 2.0.

Mindstorms software is a graphical programming environment. The programming is made connecting bricks and data lines. It is "a great tool" for learning and teaching programming, and it is also fun. It is possible to do non trivial tasks like multi-threading and functions. But for non-small programs it is not practical.

Mindstorms software is used to make programs, to send the compiled programs to the NXT, to remote control the NXT, and to update NXT firmware. Both USB and Bluetooth are supported. I've tested it under Windows but it is also supported under Mac. It does not work under Linux.

See my enhanced color sorter program:
The main program. Note the two threads. The bottom is for the dispenser and color sensor, wh…

Lego Mindstorm NXT - Open Source Rules

The bad news: My NXT brick was not working properly when I took it from the box. The sensor port 2 was not working. I do not think that there is warranty coverage for Lego Mindstorms in Brazil. I had no better option than try to fix it.

The good news: Lego delivers all information about the NXT electronics and its embedded software. It is a true open source platform.

I've downloaded the schematics from:

And I've noticed a missing component near the port 2. R59 was not there. For lucky it is a common 1k resistor. Thanks to my father's SMD lab, we were able to solder a new resistor, and push hot air over port 2 components. After that port 2 started to work.

I'm deeply happy with Lego's open source policy for this product. I was wondering how happy I'll be when my car becomes open source. Lego gave us the power to fix the problem without any limitation. It is clear to me now that open source is great for h…

Lego Mindstorm NXT

Want to have some fun with Robotics? 8547 LEGO® MINDSTORMS® NXT 2.0 is the right kit for you!

Color Sorter with a bit more complex algorithm
 To me Lego Mindstorms NXT is a dream come true. Why? Robotics! Robotics! Robotics!

What's inside the box?
- The NXT programmable Brick with Bluetooth, USB, 7 I/O ports for sensors and motors, speaker, buttons, and LCD display.
- 4 Sensors: Ultrasonic, light and color, 2 touch sensors
- Some cables
- 600+ pieces for assembling machines animals and humanoids.
- Software for Windows and Mac for programming the NXT.
See Lego's official website

iSCSI and LVM: Boot problem

Both LVM and iSCSI are powerful and reliable. But there is an issue with the combination of both that made me fell completely lost more than once.

The Scenario:
iSCSI target / server is a Linux Box with LVM features
iSCSI target / server exports disk, partition or LVM LV
iSCSI initiator / client uses the exported volume as LVM PV
All works perfectly until rebooting the iSCSI target / server

The symptom:
After rebooting the iSCSI target / server, it becomes impossible for the initiator / client use the exported volume as if it were deleted. The iSCSI target / server service itself is working properly but the exported volume is not.

The cause:
During the boot of the iSCSI target / server, its LVM liked the new found PVs / VGs / LVs. The iSCSI target / server has no idea about those new found are not for the local machine and it "locks" the VGs and LVs for local use. When iSCSI exports the LV, it will contain locked LVM volumes. This is why it becomes impossible to use it on the i…

Acer Iconia Tab W501P Review II

Fedora 16 Beta

Feroda 16 Beta runs on the W501P without any major concern. The only issue I found is the Gnome onscreen keyboard that does not work well. Despite the onscreen keyboard, I did not found any serious issue when using Fedora on Iconia Tab W501P.

I did no testing with ATI proprietary drivers on Fedora.

Ubuntu 11.10

Ubuntu 11.10 also runs on the W501P but there are some details:
1 - When I allowed the installer to download updates during installation, the X did not work very well after first boot. So I installed it again and it is working pretty well without allowing the packages to be updated. I'll wait untill ATI driver supports the C-60 GPU until allowing updates.

2 - The ATI proprietary driver does NOT work with C-60 GPU. I've tried Ubuntu's two packages, "AMD Catalyst™ 11.9 Proprietary Linux x86 Display Driver", and "AMD Catalyst™ 11.10 Proprietary Linux x86 Display Driver". When using Ubuntu's package, an stamp with AMD logo appears o…

Recording from webcam, saving to file, displaying locally, using VLC, under Linux

# Change /dev/video1 to your webcam device name
# Change plughw:1,0 to your audio capture device. (Check /proc/asound/devices)
# Change 1920 to the correct width of your webcam ( Check Cheese preferences )
# Change 1080 to the correct height of your webcam ( Check Cheese preferences )

$ vlc v4l2:///dev/video1 :input-slave=alsa://plughw:1,0 :v4l2-standard=0 :v4l2-aspect-ratio=16\:9 :v4l2-width=1920 :v4l2-height=1080 :v4l2-fps=30 :sout="#transcode{vcodec=mp4v,vb=5000,scale=1,fps=30,acodec=mpga,ab=128,channels=1,samplerate=44100}:duplicate{dst=std{access=file,mux=ts,dst=/tmp/video-output.mpg},dst=display}"

Acer Iconia Tab W501P Review

Model Acer Iconia Tab W501P C62GO3iss
P/N: LE.L0603.038
Model: EAB00
OS: Windows 7® Professional 32-bit
Processor: AMD Dual-Core C-60
LCD: 10.1" Multi-touch HD LED LCD
Memory: 2GB Memory
Storage: 32GB SSD
Card Reader: 2-in-1 card reader
WLAN: 802.11 b/g/n & BT 3.0 + HS
Webcam: 1.3 Megapixel
Battery: 3-cell Li-ion battery
Software: Microsoft Office 2010 preloaded (purchase a license key to activate)
Microsoft Office Starter 2010

I was tremendously curious about the performance of both AMD C-60 processor and it's ATI GPU. I was expecting that it would be possible to play Full-HD flash movies at 30 fps. I'm at Czech Republic, and I ran to the first Acer Iconia TAB W501P that was available at The main differences to W500 is that the W501P has 3G modem and is equipped with AMD C-60 instead of AMD C-50. According to, the C-60 can run up to 1333 M…

Samsung Galaxy S GT-I9000B Firmware upgrade

Finally Kies gave me the option to update my phone to Android 2.3.3. :-)

System Monitor applet and other Gnome3 tips

Gnome3 is revolutionary. But to enjoy its benefits, I had to exercise my zen side and let many old habits behind. I decided to give it a try. I'm liking it.

But even liking Gnome3, I was missing System-Monitor applet. But now I have it. :-)

I followed Matthew Casperson's post and added just some little steps:

After following the steps described on Matthew Casperson's post:

$ mkdir ~/bin
$ cd ~/bin
$ ln -s ~/git_projects/gnome-shell-system-monitor-applet/ system-monitor-applet-config

Those steps will enable you to call "Preferences" on the applet icon.

I would also recommend reading other Matthew Casperson's post: Gnome 3 Tips and Tricks

Five steps to create Fedora chroot jail using yum

- This will work only if your Linux Distro is based on RPM and YUM. I have tested it on Fedora but it may also work on RHEL and Centos... It will NOT work on Ubuntu, Debian, Suse...
- The operating system and its version will be the same inside and outside the chroot jail.
- On the example, the chroot will be placed at: /chroot/devel
- To install different version of Fedora or other RPM based distro, it will be necessary to manage yum package repositories outside the jail.

The five steps:
# 1 - Create the chroot directory
$ sudo mkdir -p /chroot/devel/var/lib/rpm

# 2 - Initiate rpm db on chroot
$ sudo rpm --root /chroot/devel --initdb

# 3 - download Fedora Release package.
# If you do not want Fedora, download the correct *-release package and use it
# on step 4. There are examples on the references.
$ yumdownloader --destdir=/tmp fedora-release

# 4 - Install downloaded Fedora release inside chroot
$ sudo rpm --root /chroot/devel -ivh /tmp/fedora-release*rpm

# If you want m…

Benchmark: Samsung S2 Portable 500GB USB 2.0 External HD

Benchmark results for Samsung S2 Portable 500GB USB 2.0 External HD Performance:
Write (K/sec): 34974 ( 52% of the HD Performance of my notebook )
Re-write (K/sec): 17612 ( 59% of the HD Performance of my notebook )
Read (K/sec): 46580 ( 64% of the HD Performance of my notebook )
Seeks/sec: 123.8 ( 164% of the HD Performance of my notebook )

The theoretical speed limit for USB 2.0 would be 60 MByte/sec. The read speed is about 78% of this value wich is not bad. Even not feeling slow, this HD could be faster.

About tests:
Command line run on both notebooks:
# bonnie++ -n 0 -u 0 -r 8192 -f -b -d /media/Peter-ext3/bonnie/
Bonnie 1.96 @ Fedora 15

# hdparm -I /dev/sdb


ATA device, with non-removable media
Model Number: SAMSUNG HM502JX
Serial Number: C2271F141A0TE5
Firmware Revision: 2AC101C4
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Used: unknown (minor revision …

WiFi/Wireless on Toshiba R830 on Fedora 15

I was not able to use WiFi on Toshiba R830 running Fedora 15. There were missing firmware files for iwl6000g2b adapter. It is very easy to fix it:

# yum install iwl6000g2b-firmware

Then reboot and your Wifi will be running after next boot. :-)

Benchmark: Core 2 Duo T7200 vs. Core i7 2620M

Test systems:
System 1: 2007 noteoobk: Toshiba U205-S5067: Core 2 Duo T7200, 4GB RAM, 320 GB HD
System 2: 2011 notebook: Toshiba R830-10P: Core i7 2620M, 8GB RAM, 256 GB SSD

This benchmark result is not only affected by the processor. Almost all system components affects the result. The processor is only the main component.

Evaluating overall performance, for compiling Linux Kernel and generate its RPM packages for Fedora 15: Core i7 system is 2.85 times faster than Core 2 Duo system.

I've run the steps described on:, for the kernel package kernel-

The only difference to the procedure described above is that I added the command "time" in the building step, to be able to compare necessary time to do same task.
$ time rpmbuild -bb --with baseonly --without debuginfo --target=`uname -m` kernel.spec

Individual results
System 1: Core 2 Duo
real 67m48.453s

Benchmark: SSD vs. SATA

System 1: 2007 noteoobk: Toshiba U205-S5067: Core 2 Duo T7200, 4GB RAM, 320 GB HD

System 2: 2011 notebook: Toshiba R830-10P: core i7 2620M, 8GB RAM, 256 GB SSD

How many times faster is SSD??
Write: 2.50 times faster
Re-write: 2.83 times faster
Read: 3.89 times faster
Seeks/sec: 23.99 times faster

Benchmark results:
System 1: 320GB SATA HD
Write (K/sec): 66608
Re-write (K/sec): 29609
Read (K/sec): 71894
Seeks/sec: 75.4

System 2: 256GB SATA SSD
Write (K/sec): 166827
Re-write (K/sec): 84040
Read (K/sec): 280068
Seeks/sec: 1809

About tests:
Command line run on both notebooks:
# bonnie++ -n 0 -u 0 -r 8192 -f -b -d /bonnie/
Bonnie 1.96 @ Fedora 15

System 1 HD info:
hdparm -i /dev/sda


Model=SAMSUNG HM320JI, FwRev=2SS00_01, SerialNo=S16LJF0S221285
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4
BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsect…