Posts

Showing posts from 2008

P2P DIY

Image
For a new assignment for my students I decided to show them they could build a simple P2P software. So I prepared a simple P2P protocol specification and a sample implementation. The whole system was design with the idea that students might run several peers on a single computer (for testing purposes). Effort was put on making it simple to understand and to implement (and to test), there are many improvements possible that will boost performance but those were rejected in favor a simple system.

I did search on the net for a simplistic P2P but I did not find that so I wrote this. I like to hear from other simple P2P protocols you may know.

Three cool tools from Google

Image
Like many of you I do have a hard time trying to keep up with all the new services offered by Google. I've been testing a few of them recently and I've found them quite useful:
Google Analytics is yet another service that will inform you about who, when and where you're site is getting visits from.Google Sites enables you to create a website just yourself of with a few collaborators of your choice. No HTML knowledge seems needed. Up to 100MB of free storage is provided too.
Google Trends allows you to know whether a certain search term is becoming more or less popular lately by know how many searches are using it over time.None of these services is really new but now that I've come to use them I can recommend them. Given they are all free services I cannot complain about the price.

Better batteries for arduino wireless sensors

Image
It was pointed out in a previous post that CR2032 batteries won't be happy with 60mA peak consumptions (ie: battery voltage will drop causing the sensor to stop working very soon). I've been looking for a better choice while still small and light. A tip from a colleague seems to be a very good choice: ER1450 from this catalog.

Pay-per-bid auctions

Image
Like many of you, I'm familiar with auction sites like eBay that allow you to bid on a certain item following the model of an auction: Winner is the user that makes the highest bid. Item price is just that winning bid.

eBay makes money charging a fee for each transaction. (I know there are many details, happy and unhappy sellers and bidders but that is another story).

What surprises me is that several companies are advertising their sites as auctions with a certain twist. Apparently they offer a real bargain, where "winning bidders" may save more than 90% of the retail price of a brand-new item.

I prefer not to include any link to these companies, but they all share a common feature: While they use the word auction they are not really meaning that. The fine print details explains (to the attentive reader only) that you have to pay to make a bid and that only your bid can become a winning bid by chance (without you having all the information at all times). Instead of the ite…

Does Google blur phone numbers on Street View?

Image
I was looking for a business telephone of a tyre repair garage. Unfortunately the small shop might not be paying to get an ad on yellow pages and I could not find it.

Next step was to try to find it on Google Maps Street View, as I knew there were lots of text on the garage walls. Unfortunately, though I could find that street photos, the photos blurred the last group of seven numbers. Though I've searched around, it does not seem to be an error: Apparentely the software does blur not only faces but also license plates. I wonder wheter these numbers on the wall might be considered license plate numbers. At any rate I was lucky enoughthat one of the angles of the scene did not blur the numbers. Hopefully we'll get an appointment to get our punctured tyre repaired soon.

Some power benchmarks

Image
After some time willing to do this I've found a moment to do some measurements. Firstly, I've removed Arduino Mini Pro power led resistor to see how much current was needed for the device in power-down mode: It's just 155uA@3V3, even lower if you go down to just 3Volts. The Mini needed 5mA for normal operation (with no output loaded).

The other component I was interested on testing together was Digi's XBee module. While XBee needs 50mA on operation, using SM=1 (Hibernate mode) the power goes down to 1.6uA when sleep mode is forced (by raising pin 9 to high).

That all means that a basic wireless sensor node based on this components will use at least 55mA during ON periods and 0.16mA while SLEEP. That translates into about 4 hours of continuous operation from a 220mAh 3V button cell.

However, if node is powered up only 3 seconds every 5 minutes, then the same battery should last around 13 days. This seems to start looking ok for my sensor network project.
Image
A recent project required the use of an industrial computer, able to work within a wide range of temperatures. Interaction with other systems would happen by serial and Ethernet ports.

I've used devices manufactured by Moxa, running uClinux (a slim version of Linux that can run in systems without an MMU, like some ARM processors).

Development is done using a GNU C cross-compiler and almost all the time development uses familiar tools.

My systems came from factory with an old version of the kernel I had to upgrade, but once upgraded they are working rock solid. Manufacturer support was also valuable whenever a feature was expected but missing on the uClinux distribution (i.e. no ?time functions on busybox-based find).

Enterprise WPA troubles

Image
Two gadgets we've got recently refused to access the university wireless network. The reason is that WPA with an EPA-PEAP autentication server is used on UPV campus. The ASUS eeePC that comes with Xandros Linux does not support that. Alternatively I could use the eeePC built-in VPN to connect to a secondary wireless network, but again, that software did not work either.

The Nokia E71 cellphone does support WPA Enterprise, but contrary to other wifi setup that can be done on the fly, the so called WPA Enterprise is hidden down there in the system configuration menus.

The solution I took for the eeePC was quite radical as I installed eeeXubuntu. There is a special Xubuntu version that worked for me. You create a boot image on a USB flash dish to get it installed on the eeePC. One word of warning though: I you accept to install system updates, each new kernel update will break the Atheros wireless driver (it can be rebuilt later, but it's a manual process).

The solution for E71 was …

Low power arduino

Image
I've bought recently a new Arduino Pro Mini. I was mostly interested on what the minimum power consumption might be when powering it at 3.3 volts. The average current was 5 mA with pin 13 led off. But what it is most interesting is that sleep mode current goes down to 400 microamps (and this is still keeping the red led on). As the red led resistor is 10k I guess the sleep current will go to almost nothing once I remove the red led resistor. That is a very interesting value if you're worried about power consumption for sensor network applications. A CR2032 will last for more than 500 hours at 0.4 mA!

Stippling fun

Image
Have you ever wondered how to achieve a monochome representation of an image using just dots? This is what stippling is all about.
The next question is how this can be done. You might have seen Wall Street Journal hedcuts and they look great, but they are produced by a human artist.
Machine-based approaches like dithering and half-toning work well too, but they are not quite the same as the above.
Google led me to the nice work of Adrian Secord, with the not so suggestive name of Weighted Voronoi Stippling.
Author provided binaries and source code too. Unfortunately it did not work for me. But after contacting the author, who provided me an updated binary that ran on my Leopard iMac. You have a sample image of the input (right) and output (left).
I want to thank Adrian for being so kind of including my suggestion of adding SVG output to his code (and for making his project's code available).

Fixing Hardy audio problem with Pulseaudio

One of the few problems I've got with Hardy (Ubuntu 8.04) has been a weird audio problem. It looks like Flash plugin and any other application that plays audio do not like each other. So I have had to close Firefox completely to get audio working again in, let's say Rythmbox.

My audio device is Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)

I research the problem a bit and I've found three pieces of advice:

1) Install libflashsupport (which did not fix my problem)
2) Restart pulseaudio (that might be done right by killall -9 pulseaudio) or kill gnome-power-manager
3) As suggested here: asoundconf set-pulseaudio (this one worked for me)

Now I can play a song on Rythmbox while viewing (and listening) a video on youtube. Something it was possible on previous versions.

Inkjet vs Laser

Image
Have you ever been interested on the output quality of both Inkjet and Laser printers? I can see many comments on the net about the cost of running the two types of printers. Someone mentioned that HP is making $10 billion dollars a year selling inkjet cartridges (this seems like a lot of money).

I am not worried about the printers' running cost at the moment. A recent project required me to study a few pages of a document. On a closer inspection I realized they were not printed on the same printer. While laser printed documents create well-defined contours, inkjet printers seem to create small ink spikes on line contour (as you can see on this entry photo).

Light reflection properties are also different, inkjet black being non-reflective but laser printed black being slighty reflective.

I'm not complaining about any type of printers as for regular use I think both provide good-enough output. However, it seems it is not difficult to tell which printer you are using just looking c…

Trouble with ASUS hardware

Image
While my refurbished-at-home Apple iBook is happily running I put myself in the trouble waters of replacing my aging computer. But first things first: a few months ago I bought my wife an ASUS EeePC subnotebook. While it worked out of the box we quickly realized something was not quite right with it, as any minor impact (as hitting the surface with your fingernails) could trigger either a reboot or completely hang the system. After an RMA, the replacement unit seems to be working happily (after I figured out how to get WPA working first; BTW, do the system upgrade over Ethernet connection BEFORE trying to log onto a WPA wifi network whose passphase contains spaces!!).

For my new desktop (replacing an old Pundit-R) I chose a mini tower barebone PC again from ASUS with a new E8200 Core 2 Duo processor. The system works nicely most of the time, however there is trouble: The Marvell Gigabit Ethernet adapter on the motherboard still has some issues with GNU/Linux kernel. Even the Intrepid I…

Google's App Engine

Image
We've got a talk at our university about App Engine by Googler Mano Marks. In short App Engine is Google's alternative to LAMP. And, like Gmail, Google is offering you free hosting for your web-based application (up to certain storage and daily bandwith limits).

Application logic is written in Python, although other languages might be supported in the future. And backend storage is based on BigTable, which does not follow the classic relational model of many *SQL databases. For me these are two changes that may turn some developers down, but the strong point I think is that developers can forget about scalability or availability problems.

While I've created an account and I've downloaded the SDK, I'm only studying the demos at the moment. If you are interested on learning more I think you'll find the video from Developer Day interesting.

New VMware vmplayer installer for Linux

Image
Since yesterday vmplayer 2.5 is out for free download. One of the tools missing in Ubuntu 8.04 was this (IMHO). Of course it was possible to install it through a more entertained process. I was surprised that VMware was not offering an easy alternative to the huge Ubuntu user base.

Today I've learnt that current version is distributed with an easy (should I say Windows-like?) installer.

Download the software package with .bundle extensionchmod +x VMware-Player-2.5.0-118166.i386.bundlesudo ./VMware-Player-2.5.0-118166.i386.bundle
Done!

Thanks VMware!

Reasons not to upgrade a G4 iBook

Years ago we bought one of the latest G4 iBooks as a bit later Apple started using Intel processors. The 12" laptop served us well but now battery and hard disk were dying a RAM was just 256MB. Acting against my own advice I decided to upgrade the system instead of buying a new one.

Buying RAM was not easy as mini DDR 333Mhz RAM was not popular anymore. Luckily I bought it second hand from a friend. A new battery was required to get more than one hour of autonomy again, so I bought a new battery from a Chinese source on eBay. So far so good.

I knew that replacing the hard disk would be a real PITA but I fell short. I bought a 160GB 2.5" on the local shop for less than $90. I would say that physical replacement is not something you will enjoy doing more than once in a lifetime but I got the job done with only one screw missing. I had to reopen the thing because I forgot to put back the standby magnet, it was not fun.

So once I thought everything was fine as the new hard drive w…

Sterling numbers of the second order

Image
I am sure once in a while you may have faced the problem of distributing n elements into k different groups. It does not seem rocket science but, do you know in how many different ways it can be done? Of course it is not a new problem a all, and here is where the Stirling numbers (of the second kind) come in handy: they tell you the ways of dividing n elements into k groups.

For the Code Jam problem "Square Fields" large dataset the numbers may seem discouraging as the number of alternatives for 15 elements are:
S2(15,1)=1
S2(15,2)=16383
S2(15,3)=2375101
S2(15,4)=42355950
S2(15,5)=210766920
S2(15,6)=420693273
S2(15,7)=408741333
S2(15,8)=216627840
S2(15,9)=67128490
S2(15,10)=12662650
S2(15,11)=1479478
S2(15,12)=106470
S2(15,13)=4550
S2(15,14)=105
But for the small dataset combinations are just a few after all:
S2(7,1)=1
S2(7,2)=63
S2(7,3)=301
S2(7,4)=350
S2(7,5)=140
S2(7,6)=21
So brute force would have worked nicely for the small dataset case but not so for the large one.

Feeling of frustration

Image
I joined yesterday a CodeJam practice session. It seems Googlers were fine tuning the contest site for the onsite finals to be held soon.

Problems were (or they look) easy but a combination of stubbornness and not thinking before coding let me in an embarrassing position (the best thing I can say I was not the worst player). However I failed to see the very easy relationship on the number of black balls (odd/even) and the final output of the Old Magician problem (too late I found out that even black balls lead to a WHITE result, BLACK otherwise and UNKNOWN was just a distraction).

The square fields problem looked very much like a k-clustering problem, but here the clusters are all same size and square shape. You have to answer what is the minimum size of the squares to get a partitioning on exactly k-clusters.

I can tell you how other people solve it, but you can read this by yourself. Instead I'll tell you what won't work:

My first idea was to use java awt library and Rectangle …

New Arduino form factor

Image
A couple of new versions of Arduino boards can be found on Arduino blog: the Arduino Pro and the Arduino Pro Mini (depicted here). Both work at 3.3V and I think that makes them ideal for battery-powered applications.

In my case I'm going to create a small circuit to interface the Mini to an XBee wireless module to create a smallish wireless sensor. Hopefully I'll get much longer operation times than those Rob Faludi measured with Diecimila and XBee shield.

Klondike with a twist

Image
Before Windows I've never played Klondike (aka Solitaire). I do not like it very much as many times I've got stuck so I do not play it very often.

This time roles have switched and I find myself writing code to play the the game: There is an ongoing TopCoder programming contest where you are asked to write the "game logic" code.

I am a poor Klondike player and it shows in my code. There are many pages out there with guidelines on how to play it well, but sometimes the rules are too high-level.

To make things worse the game is known not to be solvable in some cases.

Competition will be open till September 10th.

It was about time

I've waited till the end of my holidays to upgrade the operating system of various of my computers. I was happily running Ubuntu's Gutsy (7.10) and I'm upgrading to the new Hardy (8.04). Actually it is only one month more for the new version to be available, but this time I did not wanted to upgrade in the middle of the semester.

Contrary to other times, this time I decided to do the upgrade using the embedded upgrade feature of the system updater. My conclusion is that, as usual, it is a risky proposal: My laptop froze when updating the locales (a known bug as I found out later) but killing locale-def allowed the process to come to an end. Lately the system healed itself and everything seems to work as expected now. A minor complain is that now the system takes a few more seconds to wake up from suspend.

On one of my desktops the experience was different but not fault free: No complains or hangs on the locale but an error message about not being able to install linux-ubuntu…

Another challenging problem

Image
Code Jam round 3 seems to be quite more challenging than previous rounds. I was not able to complete Polygonovich's professor problem in two hours. I was quite happy with the use of java.awt.Polygon object, mostly because it includes a contains method that seemed quite useful for this problem. However solving the problem took longer than expected too, as I wanted a method that worked nicely for both the small and large problems.

In the mean time I constructed the whole set of graphs for the small dataset. You may find it interesting. Vacation time is over though, so I'll be back to work soon I still I have some problems pending.

Keeping me entertained

I thought the Crop Triangles Code Jam problem will be gone in no time. It looked simple the morning I started with it and I was expecting to have it all done by lunch time.

The basic idea is that you have an integer coordinate system (or grid) and in certain points of the grid there are some trees located. If you use those trees as vertices to make triangles ... how many different triangles can be created?

Well, the answer to that is actually quite simple using combinatoric numbers, but they added a restriction: the center of a valid triangle has to be located on a grid coordinate, if not do not count that triangle. A triangle with vertices (x1,y1) (x2,y2) and (x3,y3) has a center at coordinate ((x1+x2+x3)/3,(y1+y2+y3)/3)

My first solution was to simulate the system. Given all the available trees, I will go though all the different combinations and after checking each one a counter will give me the valid answer.

That idea worked nicely for the small dataset (once I realized that Case #9 r…

CVT vs MT vs AT vs AMT

Image
I've always owned manual transmission (MT) cars, but while living in USA I drove automatic transmission (AT) cars most of the time (manual transmission is not very popular over there).

When I recently bought a car I was offered a continuously variable transmission (CVT) that, instead of gears, uses an steel belt and two variable-diameter pulleys. The system works nicely and it may even offer a set of "simulated" fixed transmission rates. While the fuel economy is not as good as MT it gets quite close.

For many years AT cars exhibited worse fuel economy than their MT counterparts. I've always found weird that, but I am not a mechanical engineer 8but wikipedia tells me it's because of torque converter mostly). Now it seems some manufacturers, probably feeling the pressure from regulators due to the high cost of petrol, are delivering a new technology (maybe not so new) dubbed as automatic manual transmission (AMT). The good thing about AMT is that its fuel economy …

Solving Triangle Areas

Vacation time is a good moment to ... keep on trying things at the computer. At least this is what I am doing now, as have been having a look at the Code Jam Round 2 problems. Again interesting problems that I have not been able to solve in two hour time. Amazingly, some guys did it with flying colors and using a bit more than one hour!

I have already done the Star Wars problem, though I would complain that there is not such a thing as "receiver power" (even on a spaceship) but "receiver sensitivity". However the problem was challenging and fun (I did a minimum search in 3D space and it worked).

I'm dealing now with the Triangle Areas problem, that though manageable in complexity it is a bit of a challenge to get right. A few ideas can help, the first one is how to know the triangle area out of set of vertices coordinates. The second observation is that if we keep one vertex at (0,0) then the area of the triangle is just 0.5*(x2*y3-x3*y2). With this idea in mind …

Defeated by Ugly Numbers

Now I am out of Code Jam 2008.

Though I did the Text Messaging Outrage quite easily I've bet my solution to the use of the 'bc' command as a helper in Ugly Numbers for computing strings like "12123+324234+232342-234234". For these numbers it does not seem to be any need, but to be able to solve the large data set of the same problem arbitrary (or at least 40 digits) precision was a requirement. 'bc' can work with these, but unfortunately the computing speed I've got was not up to the task.

I was piping each line to 'bc' and reading the proper answer. Unfortunately it took more than half an hour on my laptop to finish calculation. I run out of time and I failed both small and large datasets.

Later on, once the contest was over and the problems were in practice mode I uploaded my solution file for the small problem and it was Correct! (too late). Still my routing for checking ugly numbers was only dealing with Java longs (n<2^63) so it was not …

My laptop's Gutsy meets vodafone

Sunday morning I'd like to be able to join CodeJam round 1. But I'm attending a wedding out of town. I asked for some help and I've borrowed a Huawi e220 UTMS modem from my university.

Just pluging it in did not do the trick though. Ubuntu showed a CD-ROM-like icon on my desktop that contained the device's Windows drivers. I was told to do some dark magic that did the trick for Spanish Vodafone prepaid service:

umount /dev/sr0
rmmod usb-storage
rmmod usbserial
modprobe usbserial vendor=0x12d1 product=0x1003
#now disconnect the modem and reconnect it again
#wait a few seconds
ls -la /dev/ttyUSB*
# three devices should show up
# now fire wvdial

I've created this wvdial.conf file:

[Dialer Defaults]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = user
Dial Command = ATDT
Password = pass
Baud = 460800
Init4 = AT+CGDCONT=1,"IP","ac.vodafone.es"

It just works great…

CodeJam Qualification Round

It took place yesterday. It was made of three interesting problems. Not too difficult I would say, but 24h were not long enough for me to finish on time. I did the first too problems: Saving the world and Train Timetable, but I failed the third one: Fly Swatter (I chose Montecarlo approach and I did not get accurate enough results).

I think being familiar with the contest site helped and every time the site was responsive. Being behind of several thousands of more talented guys is good to keep you humble. I loved the mental exercise and it felt great every time you get a Correct! answer.


Still this morning I've been discussing with my colleagues how to get the Fly Swatter right and I have an idea to test, that hopefully will work: Calculate the area of the openings but modifying the value of g so now g is min(0,g-f). One minus the quotient of this area and the circle area should be the answer to the problem (or so I think till I test it).

Arduino talk

Image
I am giving a talk at an Arduino workshop next Saturday 17:00. There is no attendance fee and people will be able to try their own code on the available Arduinos. Contact was made through the Arduino Forum and Vicent Ferrer proved to be quite an entrepreneurial person.

Presentation will be held in Spanish and hopefully it will include a lot of Q&A and user experimentation. If you bring your own laptop you will be sure you'll get the development environment installed.

Photoshop degrees

We have some international programs at our university. Besides European students, many students from Spanish-speaking countries from South America are attending too. I am sure there is a good amount of paperwork (yes, in the paperless era it is when paper usage is skyrocketing) to go through the admission process.

The twist is that now some people are thinking this international programs can be used as an excuse to get a visa to enter the country. Some doctored documents are sent in the hope they will go undetected, but while the Photoshop work is good, the background checks on the side of the fraudsters are not: They have created fake titles of real world universities, but they have selected degrees that have never been taught at those universities.

You know that the Euro currency is now used in many (but not all) European countries (Denmark, Sweden and Norway come to my mind now) but if you are handed over an Euro from, let's say, Brazil, you are sure it is forged note.

Fraudsters …

New tricks to an old dog

Image
Some time ago I developed a small project that put together a few software pieces to create a monitoring system. I've used for development a great graphics library built in PHP called JpGraph. It did the work but I realized that the software license required payment of $600 for each website that use it commercially.

As my system was like an Internet appliance and each customer had a different unit (and address) it seemed that I would need to add $600 to the price tag of the system to be compliant with JpGraph license. It was time to look for an alternative, as there was no way the product price could support that extra cost. So I found libchart library that worked nicely with PHP5 (provided you already have GD support built-in).

The end result looks ok too, though libchart lacks many of the features of JpGraph, it is still good enough for my application. Libchart author licenses the software with GPL3 and while the software is free, he's accepting donations.

Shopping list problem

Image
Definitely this has been the most challenging problem I've found on the Code Jam practice site. It asks you to determine the optimal selection of what to buy where. With a couple of twists: the cost of going from one place to another is factored in; plus a rule that forces you to drive back home whenever you're buying perishable goods.

The approach that worked for me was to first consider the different combinations of articles from different shops, just to obtain the list of shops to visit for each instance. Each one of list of shops to visit is a traveling salesman problem (perishable rule just changes the cost of some of the links).

Combine both costs, the article's prices at selected shops and the transportation costs to determine how much each realization will amount. The minimum case is the answer you're looking for.

The main problem I faced with the large set is that unless the code is quite efficient (and mine was not) it will take a long long time to finish the ca…

Google Code Jam '08

Image
I've just got a notice about the new edition of Google Code Jam. I guess if you like challenges it is a place to go. I've spent part of the evening solving the "Alien Numbers" problem just to discover how rusted I am. It was fun though, and it was satisfying to make it right (though not very fast I would say).

Single data packet TCP

Image
For Ethernet enabled devices I've used in the past (and I was happy with) the cores from Rabbit Semiconductor. They offer a lot of data and program memory and a royalty-free TCP/IP stack.

Not in the same league but still surprisingly useful is the Ethernet shield I've bought from Nuelectronics (a UK-based company). The shield plugs-in nicely on an Arduino board and it can easily allow you to create a simple network appliance.

In the picture I have my sample system that using a DS18B20 digital temperature sensor offers the temperature reading as a web page.

All the code used is the sample code and TCP/IP library provided by Nuelectronics. I had some minor trouble with my setup as I am using the so-called parasitic power on the temperature sensor and a few lines of code where added to the original code to make it work. The symptom of the problem is that I was getting +85.00 C no matter what the temperature was. The cause was that the sensor did not get enough power from the 1-wir…

Kudos to Canon

Image
I dumped my old Epson color printer, an Epson Stylus Photo Color 830, after playing any trick to get a decent printing performance for quite a while (I failed). As we needed a new printer at home I searched and browsed around and I settled with Canon's IP4300 that also had good Linux support.

Unfortunately that model was no longer available (I learned this at the computer shop) so it was not an option. I guessed the next model, Canon's IP4500 won't be that different. It was cool as it could do duplex printing automatically.

I was wrong: While the printer worked like a charm ("New" is the best printer brand!) I was disappointed to discover there was not Linux driver. And when I tried the IP4300's driver it did not work at all.

Time to go to the Ubuntu forums: There I was referred to a Canon's portal. In there I downloaded and install a couple of .deb files and next I restarted cups. I connected the printer's USB cable to my computer and it was automagical…

Another format for arduino

Image
I've just bought another arduino board for a project. My main complaint with arduino standard board is that it is not prototype board friendly. I am afraid this was a 'feature' and not an error: This way people would have to buy special prototype boards for arduino. This was a design error that later on has survived to maintain compatibility with existing shields (thanks for shedding some light on this, David)

There are other solutions like Modern Device BBB, but the new iDuino does include the USB adapter that may power and interface to a PC your project. And iDuino kit costs less than $18 so it seems quite cost effective. The main con is that the kit includes a resonator instead of crystal.

I haven't used it yet but it seems another development to have a look at. If you plan to buy one I think you better use Fundamental Logic website instead of eBay.

Dead router

Image
Yesterday night my router died on me. Apparently it is no longer coming up after powering it up. Minutes later it seemed that a hardware reset had brought it back to life: It was not true, while DHCP and router lights were working, only a firmware reload web page was available.

After downloading several versions of firmware it became apparent that the damage to the router was beyond the original firmware. Time to buy a new one (or to check with SMC whether a lifetime warranty was included).

However, hours later I came across this news. I know it may sound a bit paranoid on my side but timing was just perfect.

While I wait the new unit to be delivered, I've borrowed an ASUS WL-500G from the lab. I've been told this unit has a lot of potential once you reflash it with new firmware. A couple of cool projects are possible: OpenWRT or DD-WRT.

Awesome web service

I was browsing this photography blog when I learned about a cool and very useful service. The image below describes better than I would do it what it is about. In the past I featured a similar service but I've found this new service better.


Assignment #4 - Get more documents

Please note I throw at it the first document I've found on my desktop. It seems to handle many different type of popular office files. I think I'll be using this system for my students in the future.

In order not to change my site CSS code I've shrunk the width of the embedded object a bit too much :-(

You may use the link on the left bottom side of the image to go to the home page of the document where it will be shown full width.

More on RGB LEDs

I was thinking about controlling multiple color LEDs to make an elaborate panel with different light areas that can be contolled remotely from a laptop. As each LED needs three PWM outputs and many microcontrollers have just a few of them (I mean PWM outputs) the use of a microcontroller per LED makes sense. It did for this project.

I've just changed the LED type for a Superflux RGB LED to get what you can see in the video. The next step is to make a version that can be addressed (also available from the same site) so as each LED can be commanded to show a certain color. (One PIC 12F675 plus a Superflux LED cost less than $2!).



I'll be using an Arduino board with an XBee wireless module to control a bunch of leds. Alternatively I could use a Wi-port to control the panel via wifi.

Adobe's Lightroom

Image
A friend of mine brought to my attention this great software tool from Adobe. There is a new version 2 on development and I've tried both 1.3 and 2.0 beta.

One of the reasons I've bought a Digital SLR camera was to be able to shot in RAW mode. Doing so gives you more choice in terms of development options than shooting JPEG.

Lightroom software allows you to give a similar treatment to your photos, no matter your shoot RAW or JPEG. The software main aim is to help you make your good photos great.

You may wonder why don't you just use Photoshop or GIMP instead. These other tools are just not designed to help you do that easily. However Lightroom has a simple but yet very powerful interface with an astonishing fast calculation that make it very pleasant to use. You can always easily compare the "Before" and "After" pictures.

You can get a trial version from Adobe website so you may try by yourself.

Running circles with Ipod Touch

Image
I've recently bought one iPod Touch 16GB for my wife. A few days later I bought another one for my youngest kid (a clear case of iPod envy).

I was quite dissapointed when I've learned that the Touch did not support enterprise WPA nor it does include a VPN client. This renders it useless for any serious network use (so I'm not buying one for me till this is corrected). After the initial excitement my kid was kind of bored with the lack of new applications for his iPod Touch so he asked me to do something about it.

I was not eager to get into that fight, but I was told that Ziphone was a safe bet to install an application installer on the iPod Touch so new applications can be installed. They even claimed on their website that even a caveman can do it with Ziphone. So I decided to give it a go. 
I dowloaded the application to our iMac and selected Jailbreak. A few messages indicated that files were copied to the Touch and a message told me to wait 1'10''. Nothing hap…

Cool OCR software

Image
I'm trying out new tools all the time. Many times this action is triggered by the need of doing something new, better and faster.

Some days ago I needed to get the text of some book pages typed in at the computer. Old fashion was is likely faster but not very exciting (it was not much more than a thousand words). However I do like challenges. First stop was to use my old Acer S2W 3300U Scanner. It is working nicely with Ubuntu (well, it was last time I used with Feisty, but now with Gutsy it was not working). The trouble with this in Linux scanner is that, although it works nicely, it uses proprietary firmware that cannot be included in Linux distributions. That means every time you update your Linux distribution you need to copy the new firmware (and to add the proper line to /etc/sane.d/snapscan.conf file).

Once the first problem was fixed I tried to OCR the scanned page: It did not work. I needed to install gocr (that unfortunately was not installed by default). Not a big problem…

rdesktop missunderstanding

Image
Every now and then I need to use Windows-only software for a project. I try to avoid it as much as I can but sometimes there is not other way.

Over the years I've tried different approaches with mixed success:
Dual-boot machine.A virtual machine running the second OS (i.e: using VMware).Running Windows applications over Wine or even better CrossOver Office.Recently I tried a new approach (not that I claim it is any type of innovation though) which is the use of a Windows 2003 server and Terminal Services. This way you can connect a remote terminal over the network. This is similar to Windows XP remote desktop but multiuser.

While you can use a thin-client to access your new desktop I am using rdesktop client software. It is very responsive even over the Internet and it allows you to share folders with the remote desktop. This way you can exchange files securely and easily.

The feature that was driving me mad was remote audio. You can also import audio output from the remote desktop. H…

iPod Touch trouble

I'll first start telling you that I just love it: The iPod Touch is the coolest PDA-like device I've used. The size seems just right and though it's a bit pricey I ended up buying a couple of them as one of my kids wanted to get rid of his Creative ZEN-V that needs to be reseted every few songs (crap).

However I am really disappointed to discover that while the iPod works nicely with WEP or WPA-PSK wifi protected networks, it does not support Enterprise WPA (that uses a Radius server for user authentication). That renders the unit almost useless in our campus.

I've been told that if I pay $20 for an additional software then I'll be able to use a VPN client software that comes with it, but still no Enterprise WPA. Unfortunately I am not in the mood of shelling out a dollar more to Apple. I do think that they are too driven to make even more money out of us, unsuspecting customers, which does not improve their brand image in my mind.

I am afraid I'll have to do this…

Reviving an old laptop

Image
Not sure what is the proper adjective for a three year old laptop. But apart from the language issue the thing is that I was asked to give a clean start to an HP nc6000 laptop. It seemed a no-brainer to install Windows XP SP2 or so I thought.

While the install worked as expected, there were bad news afterwards: The system booted but nothing worked as expected: Graphics card,Ethernet, SD memory slot, Cardbus slots and Wifi adapter did not work at all.

I am not sure whether the laptop was shipped with a driver's CD-ROM or not. The owner told me he had nothing like that.

A few Google searches later I've discovered several drivers websites trying to make a buck out of the poor souls that could not find the drivers CDs. Some users also complained about HP not making the drivers available and, of course, standard drivers on SP2 not working with HP hardware.

Later on I did find an entry on an HP website that contained the drivers. The problem is that it actually contained too many driver…

Buying Arduinos in Spain

Unfortunately, my mood light project destroyed the microcontroller when I plugged in the protoboard shield with the RGB led while the power was on.

A few days ago I've ordered another arduino board that I would use as the controller for the mood light. I was looking for a cheaper alternative so I've found a good deal on eBay from NKC Electronics, a company in Florida that sells different kits. I bought from them a serial arduino (or Freeduino as they call it) in kit form.

While I am aware of twodifferent companies in Spain selling arduino boards (but not kits), they have a shipping cost which is almost double than many USA-based companies. The fact that the Euro is now stronger than the dollar makes the shipping cost even cheaper now.

It is beyond my knowledge how come shipping cost from Florida to Valencia can be cheaper than from another city in Spain. But this seems to be the case. Of course a local supplier may be preferred if you are in a hurry.

Now that my only arduino at ho…

Arduino mood light

Image
I recently saw the cool mood lamp by Philips and I liked it. What I did not like was the price. I set myself to discover what the industry has to offer in terms of high-power LEDs. It turns out that since the old 20mA red LEDs the market has evolved in such a way that it seems the light appliances of the future might be completely LED-powered.

Now there are 3W and 10W LEDs available. Either monochrome or RGB. I like LEDs as they last forever (I've never seen a LED that stopped working unless it was due to a current overload).

High power LEDs are not cheap but they are very easy to control from a micro-controller using PWM (Pulse Width Modulation). They need DC low voltage power sources.

I did a test with an Arduino board and a protoboard with a ULN2003 that I've used to control a 3W RGB LED.


I programmed a never ending random sequence and this is the source code. Just connect each led (R,G,B) to the outputs 9,10 and 11 of the Arduino. If you need more current then use a Darlington…

Not impressed with Apple service

Image
As I mentioned on my previous post, my iMac needs a new RAM. I called the shop to be sure they have a technician on the shop and I was told they had one from Monday to Friday. As it was Friday afternoon I thought that if I was lucky they could double check Apple's diagnostic software diagnose: Faulty RAM. This way I could be back home with the iMac in the same trip.

I brought the iMac to the Apple shop I've bought it from, but I was told I had to leave it there (why am I not surprised?) and luckily they will call me next Wednesday. In hindsight I realized they should have stressed the "luckily" part.

Next Monday I've got a call from the "technician". The conversation goes more or less like this: Hi Sir, this is from the Apple shop. I'm trying to have a look at your computer but it is password protected so I cannot log in. I mentioned him that all that I did was to run Apple Diagnostic software and I've got a RAM error right away. Using the system,…

iMac 2007 not behaving, again!

Just after installing a software update that required a restart (I guess a kernel or firmware upgrade) our iMac did it again: After the initial chime, it started beeping and it refused to boot up.

In a previous post I mentioned that as three beeps means a RAM memory problem it may well be caused by a non properly seated memory module. So this time I remove the power cable and I opened the memory hood on the bottom of the case. It looked ok but, just in case, I took the memory out and I plugged it in again. It looked to fit well (before and after).

Unfortunately this procedure caused no change on system behavior: After the initial chime the system will beep twice and then it will continue making three beeps until you power it off.

Knocking the unit did not help either. It's time to consider the choice of sending the unit back to Apple. But as I could not do this on a Sunday afternoon I decided to try to learn more about the issue. Googling lead me to some awful stories. I guess I'…

Vertical Plotter article

Image
The March issue of Circuit Cellar Inc magazine is out and it features an article I've authored about the canvas painting machine I built a while ago. A video of it was also included here.

It all started when I learned about another project on the net. However, though I have tried to contact the authors they've never answered any of my emails.

Keeping myself out of trouble

Image
Just when the anger from a previous rip-off on eBay fades away, I'm watching myself doing it again: I was bidding on an item that had only 30 minutes left. I went to do other things and when I was back I tried to see what had happened. However, what I've obtained was the warning shown here. Apparently the auction had been canceled.

After checking my emails I realized that I had been outbid by another bidder who actually won the bid. Nothing surprising here, but a few minutes later another email informed me that the auction can been canceled "Cancelled - Results Null and Void" was the subject. However not much useful information was provided, or so I thought

We're writing to let you know that eBay has ended the following item you were bidding on due to factors beyond the seller's control:

Item Number - 200201885499
Item Title - BRAND NEW *iPod touch* 16GB 16 GB WIFI,TOUCH WIDESCREEN

As eBay removed the item, you are no longer obliged to send payment for it. Howeve…

Selling virtual goods

I know it is not new, but I've been surprised when my younger kid told me he was selling several of his accounts of certain on-line games for some money to his classmates.

I just hope he'll stay out of trouble, but I'm surprised of his entrepreneurship character.

Open Citizen's Network

Image
In my recent trip to northern Finland I had the opportunity to use a cool network service in the Oulu area: panOULU is an open wifi network you can freely.

Freely meaning several things: not only that you do not have to pay but also that you do not need any type of user ID, which is great if you happen to just be visiting the area for a few days.

Just opening your laptop and being able to use the network with the peace of mind it is not going to cost you an arm and a leg it's just great. I was able to upload the photos to my Picasa account so my family and friends could be updated. This same action would had been outrageously expensive should I were using the GPRS or 3G connection (getting the photos printed and sending them by a courier service is actually cheaper than your cellphone data service).

This week I've read that European regulators are asking the mobile operators to reduce users costs when using their mobile data services abroad. The point is that as far as the EC is …

For your flying pleasure

Image
Not much could I anticipate this morning when I woke up at 4:00am to be, as advised, two hours in advance the boarding time of my international flight to Paris. It was actually the first round of a tiresome trip to northern Finland.My final destination was Raahe but I was flying from Valencia to Oulu. And to do this it seems one possible choice was to go through Paris and Helsinki. I bought my ticket online, with the freedom that gives no having any miles program, to the cheapest seller (not sure it is the safest choice now, but read on).I usually try to avoid Madrid airport, but I recently read on a BBC News article that Paris – Charles De Gaulle – was one of the worst airports in Europe. The only problem I've got there in the past was that they tend to add letters to the gate numers, so you may have, for example, several 53 gates. Of course the tickets do not reflect this “feature”. I'm writing this on my laptop while sitted on a very comfortable chairs next to gate 20a at …