Posts

Cups printing problem solved!

Some weeks ago I mentioned Ubuntu's Feisty was having a weird printing problem that I and many other people reported. It was unclear what was the triggering action and where the fault might be. And it seems it was for a a reason: While everybody thought the problem was in cups code, in the end it turned out the error was on another package. D-Bus is a library that offers a high-level interprocess communication. This library might be used by cups if available. There was a bug on the last version on the library (used by both Debian and Ubuntu) that eventually caused pipes not to be closed properly. The net result was that the cups process was gathering more and more file descriptors till a limit was reached. Thanks to the joint work of many users, Martin Pitt provided a fix for Ubuntu . Your printing blues is over.

Wifi friends

I've got a call from a friend who was desperately trying to get Wi-fi working at home. The brand new PlayStation 3 was not able to use the home network as the broadband router was not configured as a DHCP server. The WiFi access point they had did not show up on any menu. When I get there I realized the WiFi access point was either dead or the power supply was not fully operational, so the whole thing was actually dead. As I was trying to be of some help and because my friend did have two wireless cards I suggested he could use the so called ad-hoc mode to network wirelessly his two computers while the Playstation was connected using and Ethernet cable to the broadband router. To get this working you need to connect one of the computers to an Ethernet port of the broadband router and then you share this connection so a second computer can use it too while it connects wirelessly to the first computer (no access point is involved here, so that is what this mode is called ad-hoc mode)...

A painful lesson

I bought some cheap airline tickets over the weekend for a family trip. I was asked to provide not only the names of the passengers but also their ID number,gender,title and birth-date. Quite annoying but I guess that might be of some use. This morning I've got the tickets delivered from the online company and my son discovers there is an error in his lastname. I email the the seller to ask for a fix as, though there is yet enough time left, I do not want to procastinate about this. My email gets answered quite fast but the directions given are somehow confusing: I should cancel the ticket and I should buy a new one. This approach in itself has two problems: On one hand being the tickets non-refundable cancelling means losing all the money (so I do no see any advantage for cancelling such a ticket) and paying, again, for the same ticket just to get your lastname fixed. But secondly, there is a chance of not getting the same schedule on sale in this second attempt of buying the tick...

Hard drive upgrade season

Image
After having passed all the subjects one of my kids was asking for a hard disk upgrade. He wanted to double his 120GB harddisk. I have written before about tools you can use to get this job done, but I am not wise enough to follow my own advice , so I decided to try new approaches to the problem. I will tell you first what did not work: I started partitioning the drive using fdisk and formatting the new partition using FAT32. My kid's data was stored on an NTFS partition but I thought FAT32 will be ok. Well ... it wasn't: While I could copy all the data the system refused to boot. Rescue disk and FIXBOOT or FIXMBR did not fix the problem, so I ended up thinking XP is not happy booting a large (240GB) FAT32 partition, so I did a conversion to NTFS using CONVERT.EXE having the new drive as a slave one. Conversion was successful but the booting problem was not going away. Installing Ubuntu and GRUB in a small partition did not help me getting WinXP to boot, though Ubuntu did boo...

AMPL: A Modeling Language for Mathematical Programming

Image
In my quest to get some calculations done, as it seems my math knowledge is less than good enough, I have had to resort to use other tools I can handle. Serendipity led me to AMPL language developed at Bell Labs (by Brian W. Kernighan et al.). AMPL is used by Operations Research practitioners to solve Linear Programming problems. But the fact that AMPL is mostly a language to express math problems does not mean it can solve them. If you have a LP problem you can express it using AMPL but you need a solver to actually solve the problem. AMPL can work with may different solvers (some free others are commercial) and the solver you use may also depend on the nature of your problem. For example, your LP problem might have non-linear constraints that some solvers can't deal with. You can download a free student version of AMPL. You can also obtain different solvers and I am using the free student version of LOQO solver by Princeton's Robert Vanderbei . Another possible choice, wi...

Meet Processing

The sample below shows a five minutes piece of code that animates a chain made of nine particles linked with springs. Although the inner core of Processing is made in Java, it is a nice tool for people not familiar nor interested on the full glory of details of Java applets but willing to create some graphical software. Click on the applet to shake the chain ... To view this content, you need to install Java from java.com Built with Processing

Joost about to leave beta

I was told about Joost some time ago at the most unexpected place by a person I just met. After having lunch with Alvy (from Microsiervos ), Francisco ( Mystrands ' founder) and Victor Fuente. Victor showed me Joost player on his laptop. It was kind of weird because we were having a drink by the beach and it seems that pub did have an open wifi with a decent bandwidth. I was shocked: that thing really worked quite decently, so I guess the result has to be even better on a standard Internet connection. You still will need an invite while they are in beta to try it out, but you can register your email address to be paged once the beta is over. But, what the heck it is that Joost thing? Well ... (in case you are too lazy to click on the link above) ... Joost is a P2P TV tuner software. You can receive a good number of TV stations with a decent quality.

Reanimating a PSS120

Image
Our old Philips MP3 clock died last week. It no longer works or starts up. In the past I was able to reset the unit to get it back to life, but this time the trick didn't do it. After reading on the net I saw many customers had to return their units with a similar problem, I guess there is a not so weird condition that reset does not cure. I managed to open the unit without breaking it and I checked the battery that seemed ok. After unplugging and plugging back the battery the unit was working again. You will need the right screwdriver for the task as it has many small screws.

Losing the weekend fight

Image
Over the weekend I've lost several battles: First one was against my TV computer. The Asrock motherboard died last week, so I bought a replacement but it was an Elitegroup VIA KM400-M . To make a long story short I tell you this mobo does not play right with my Nexus-S PCI card. Of course, figuring that out took me a good part of the weekend. I sent a support request to the manufacturer, but given the way the manage their website I'm afraid I am in for a big dissapointment. Second, I turned to my desktop to scan some pages I realized that my Ubuntu upgrade to Feisty also did bring an annoying bug that made my Acer S2W 3300U scanner not to work properly. It turns out it is a new bug that can be avoided by using the scanbuttond application (weird but true, this daemon-like application prevents the scanner to be powered down which is what causes the bug). Finally I managed to get the work done, but I'm exhausted. Those of you with your shine Vista and the same scanner are ...

Weird CUPS printing problem

Since I installed Ubuntu's Feisty Fawn my user impressions have been very good. However, some days ago I experience a weird problem when my system began to work erratically. I was not expecting it so it took me some time till I realized my filesystem was full. I did not understand why that was happening as the last time I checked there where more than 7GB of free space on that partition. But the first trouble sign was that print jobs where not printed. After some confusion I realized I had 7GB /var/log/cups/error_log file. So that was the cause of my trouble. Inside the file I had millions of lines with the error message "Too many open files". It was clear there was a problem with the printing system. I googled for that and I learned there were not one but two different reports of a similar problem. Just restarting the printing system was restoring the service (but not deleting the error_log file). As soon as I removed the error_log file and restarted cups I was back on...

OpenOffice fonts in Feisty

Image
A colleague of mine who tried the new Ubuntu 7.04 was not happy with the OpenOffice Impress tool (I'd say he was not very impressed) because certain pages were rendered using larger fonts that in the original page. This odd behavior was forcing him to patch slides that were ok for previous versions of OpenOffice. I haven't experienced the problem myself, but I told him to have a look at Launchpad to see if there was a bug report on this and, if not, to file his own bug report. It turned out that a very helpful guy reported a similar problem , its cause and several suggestions to fix it. It turns out there is nothing wrong with OpenOffice but last version of Ubuntu fails to do the right substitution with some fonts. This bug was not happening on previous Ubuntu versions though. As my friend's problem was due to the use of some TrueType fonts from Microsoft (a document migrated from PowerPoint) I suggested to install the package msttcorefonts and that fixed the problem.

eBay experiences

A few days ago I bought one item from a seller on eBay. Seller looked good. But two days after I sent my payment I got an eBay warning message telling me the seller's account has been canceled and advising me not to send any money. Unfortunately the money was already sent so there was not much I could do. Checking the seller's account feedback page revealed that the flow of feedback messages had stopped as users cannot leave feedback on a canceled account (not sure this is a good idea) even if buyers are already getting what they paid for (or a brick in a box). Let me elaborate on this: Blocking a seller account should prevent the seller to do "any more harm" (ie. to sell any new item) but the feedback information is useful mostly for buyers, so you are here punishing the buyers if they cannot post feedback for a blocked account. Some days later my product arrived ok and I was surprised when I can see I can leave feedback for this seller. In fact, it seems the seller ...

New life to the Traveling Salesman Problem

Image
I learned about this problem when I was a CS student: A salesman has to visit a set of cities and then returns home. The problem is to find the fastest/cheapest/shortest way of doing so . It is a NP-hard problem as the solution space is n! (for a n-city problem) that is impossible to be examined fully in a lifetime. It can be entertaining to do by hand, but there are many programs that may help you, like Concorde . My interest for TSP was sparked as a possible solution to the optimization problem for the drawings made with my home-made painting machine. It is not a new problem but I was not aware of the best solution possible. I was lucky enough contacting Michael Trick who, right off the bat, gave me a nice and elegant solution. I need to determine the right order for drawing a set of n lines but each line may be drawn in one direction or backwards. The solution to the problem needs to determine the drawing order of the lines plus the drawing direction for each one that makes the t...

A good moment for a backup

Image
After doing a full backup of my trusty Ubuntu 6.06 system at home I decided to give it a shot to the new Ubuntu 7.04 (aka Feisty Fawn). I just decided not to be on the cutting edge and I did the install only after other users were reporting successful installs. So far I've updated a couple of my systems, the first one, an ASUS pundit worked like a charm and the graphics card was detected ok. The second system, with an ASROCK mobo with an ATI Xpress 200 graphics card was not so lucky and though the install worked I needed to do some black magic to get the graphics working at the right resolution and, more important, to get 3D acceleration. Why is 3D needed now? Well, it is not really needed but after so many comments about all the "experimental" graphic features nicely included in the last Ubuntu I decided it will be nice to try it out (don't worry I am not posting any video to youtube). The bottom line is that the new 7.04 feels a better Ubuntu than ever before, with ...

Graphics fun

Image
I was watching some paintings by Chuck Close and I thought of doing something in that direction but, of course, letting the computer do the hard work. I'm not yet finished as my initial goal was to create a GIMP plug-in (as Photoshop is not my thing), but I started using Perl and the GD library to get results like the one in the photo. If you are interested in the perl code just drop me a line, it can work with any photo file (once you convert it to a GIF file). If you are familiar with GIMP plug-in creation you might want to help out finishing the work!

Time to switch away from Microsoft?

I have been testing Office 2007 and its new user interface. I did like it. But at the same time I did have some trouble finding some options (like the Save As ... --a hint: press the circle on the top left--) but the general feeling was that it should be easy to get use to it. However, another idea came to my mind: Over the years I have heard people from different companies saying that while OpenOffice was kind of ok they did not want to incur on the extra cost of re-train employees to learn how to use OpenOffice. The bottom-line now is that I find much easier to switch from previous versions of Microsoft Office to OpenOffice than to Office 2007. And I have not yet mentioned that file formats have changed too for Office 2007!! This fact considered alone might be addressed by not switching to Office 2007 anytime soon. This is what all the companies I know are doing. But the second most amazing thing I can see happening is that no companies are switching to the much-hyped and secured Wi...

Better video

Image
When I built the vertical plotter I mentioned one week ago I realised the video I was posting was not very good. I have received no complains but as I was painting something else over the weekend I decided to shoot it better and to fast forward a bit so as not to bore you to death. This is the result: And before you ask me, this is the photo it is coming from:

Windows Log Files

Image
Today I needed to dig on a client's set of log files. I'm happy with text-based log files, but this time most of the research has to be done on Windows 2003 Server Event Logs. The problem is that in order to view this files you have to be running Windows 2003 Server and you have to use the Event Viewer program (or so I thought). After having some trouble because I was not aware that Event Viewer is not happy when your files are read-only (as when you are handed over a copy on a CD-ROM) I decided it has to be a better way. Unfortunately, Event Viewer error message just said "wrong parameter" which is not telling you much about the cause of the problem. A bit of Google and I discovered a software gem called LogParser , which can parse most of the different log files Microsoft OSs and applications create and, to ice the cake you can present your queries using SQL sentences on the command line. Many input and output formats are supported and it can also deal with your Apa...

New article published

April 2007 Circuit Cellar #201 features an article about my research on the inner work of ECP bus that has been used in ADEMCO alarms for many years . Note : It is not available for general download but for subscribers only .

Yet another shameless copy

Once I get one project running I tend to focus not on creating a polished version of it but on the next project to do. This time I am planning to build a 3D scanner for body parts (i.e. hands, arms, head) so I can create a polygonal version of them like an sculpture. The good news is that it's been done many times before: like this one , or this other . Some people even took the time to create an open source project to develop the software for such a homemade 3D scanner. As I am yet in the early stage of the project I can only tell you that a line laser and a webcam (or photo or camcorder) are needed. The line laser is a laser that creates a line shape instead of a single spot. The cheapest alternative if you do not have one is to buy one of these straight line levels . Alternatively you can create a line laser from a laser pointer by inserting a cylindrical lens on the laser beam (any solid cylinder shape of plastic or glass can work here). Once you have the laser line you also n...