20111216

Yum ;-)

A nearly-vegan pad thai (no eggs, but crab & otherwise some fish sauce).


20111129

Two Thumbs Up to Koush

I just installed & tweeked Koush's Cyanogen Mod 9 alpha 11 for my Nexus S running Ice Cream Sandwich from AOSP. You can read his original message on the XDA forums.

For an engineering build it's running quite smoothly. I'm certainly looking forward to mirroring his git and building a userdebug variant. Typically this speeds up most aspects of the UI and other software since debug messages are less frequent.

A few pointers:

  • If you feel that the boot animation is continuing infinitely, you probably forgot to erase the data partition (I did, originally)
  • If you like Google Car Home, which is a great home-replacement while driving, then install it manually from a backed-up apk and install the 3rd party Car Mode Control app. The original google car home will install, but it is claimed not to work with ICS and does not show up in the launcher so there is no way to use it unless Car Mode Control is installed.
  • If you encounter "Unfortunately, Google TTS Engine has stopped" Select PicoTTS to get Navigation and My Tracks to work.

20111111

An Update

Just to dispel any confusion that might arise if people google me to dig up 'dirt'.

Yes, I am in fact single again. Yes, there may be photos of me & my ex floating around on the interwebs that seem to be very recent - and they are! I only did become single again recently, and it was a bit sudden for me too!

So is life, however, and it does go on, as they say.

It's actually really surprising how little I'm blogging these days, with the major shift changing from blogging to micro-blogging via Twitter, FaceBook, and Google+ . Sorry if I haven't been terribly vocal.

Just thought I would post an update.

Ciao!

C

20110831

Google Nexus S Android Phone Suffers USB Death

Today I am a very lucky guy, in spite of the fact that the USB OTG functionality on my Google Nexus S has just vanished. Why does that make me lucky? Well, it doesn't, but luckily I had ordered a second Nexus S that works properly with Canadian HSDPA frequencies on the Rogers network, and it arrived literally the same second that my old Nexus S stopped working. Total coincidence... I think.

Actually, I should be more specific - nothing on the old phone has stopped working except for the USB OTG controller. So when I plug my in my phone to my workstation, I receive "unable to enumerate device on port... " under Linux and "USB Device Not Recognized" under Windows 7. In layman's terms, my phone no longer works as a USB disk. 

Being a clever hacker, I managed to get the dmesg output on my Nexus S, which I hope will be of some use for people at either Google or Samsung. The source code for the Nexus S (codenamed crespo) is available, so I might look into it further some time later. 

In reference to the dmesg output below, 

"The FSA9480 chip is used on some Samsung phones to detect various accessories using sensing resistors on the ID pin of the USB port." [1]
It's likely an authentication chip - there are several vendors that provide something similar. The datasheet is only available under NDA of course. Naturally, I've tried several cables, and several different workstations, to no avail. There are many layers of software and electronics at work (or rather not at work) here, so without some chip documentation / resources, there's not really a way that I can debug this just using the source code of the Linux driver.

But just to clarify - anytime an 'err -6' appears, that corresponds to with -ENXIO "No such device or address", and anytime 'err -5' appears, it corresponds to  -EIO "I/O error", so the outlook is not good. It's likely that the chip in question had a bad solder joint and is not powering up with the rest of the phone, or it experienced a "massive" current spike from my laptop that it couldn't handle.

I believe my device is still under warranty though, so I'll certainly be shipping it back for repair soon. 

The strangest part of this whole thing is that I've kept my phone in pristine condition, which (sadly) suggests that the design quality of this Nexus S was lacking, in spite of what Google has said in various marketing videos. It could also be Fairchild's fault, if in fact it turned out to be an ESD issue. Anything that's connected on the USB should be able to handle 'typical' levels of ESD from a PC's USB pins. 

[ 2066.560942] fsa9480 7-0025: dev1: 0x0, dev2: 0x0
[ 2068.234132] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.362855] fsa9480 7-0025: fsa9480_irq_thread: err -6
[ 2068.363813] fsa9480 7-0025: fsa9480_detect_dev: err -6
[ 2068.363919] fsa9480 7-0025: dev1: 0xfa, dev2: 0xff
[ 2068.374642] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.377227] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.377957] i2c i2c-7: sendbytes: NAK bailout.
[ 2068.378051] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2068.379090] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.975317] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.977052] fsa9480 7-0025: dev1: 0x1f, dev2: 0xff
[ 2068.978903] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.991221] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.992016] i2c i2c-7: sendbytes: NAK bailout.
[ 2068.992109] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2068.993178] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.994968] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.003127] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.004982] fsa9480 7-0025: dev1: 0x10, dev2: 0x3
[ 2069.006708] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.008463] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.009962] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.010054] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2069.010498] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.012253] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.014000] fsa9480 7-0025: dev1: 0x10, dev2: 0x1f
[ 2069.015793] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.035247] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.037069] fsa9480 7-0025: dev1: 0xff, dev2: 0xff
[ 2069.038796] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.041289] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.043017] fsa9480 7-0025: dev1: 0x10, dev2: 0xff
[ 2069.044765] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.048313] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.050040] fsa9480 7-0025: dev1: 0x17, dev2: 0xff
[ 2069.051853] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.060308] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.062035] fsa9480 7-0025: dev1: 0x13, dev2: 0xff
[ 2069.063858] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.067409] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.068963] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.069124] fsa9480 7-0025: fsa9480_detect_dev: err -5
[ 2069.069209] fsa9480 7-0025: dev1: 0xfb, dev2: 0xff
[ 2069.070971] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.091186] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.092983] fsa9480 7-0025: dev1: 0x10, dev2: 0x3
[ 2069.094731] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.104292] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.105018] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.105108] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2069.106102] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.150280] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.152079] fsa9480 7-0025: dev1: 0xff, dev2: 0xff
[ 2070.153836] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.166528] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.167026] i2c i2c-7: sendbytes: NAK bailout.
[ 2070.167188] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2070.168389] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.192257] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.193986] fsa9480 7-0025: dev1: 0x10, dev2: 0x1
[ 2070.195786] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.210682] fsa9480 7-0025: dev1: 0x10, dev2: 0x0


[1] http://electronics.stackexchange.com/questions/13041/how-do-i-make-the-fairchild-fsa9280-fsa9480-fsa880-boot-pin-trigger-samsung-gal

20110829

UNetbootin on Mac OS X

Just in case anyone wants to use UNetbootin to create e.g. an Ubuntu Live USB device and it isn't working, there are two key steps that are not performed by the UNetbootin binary for OS X.

After downloading the ISO, use Disk Utility to partition your USB device. Ensure that you've selected Options -> MBR . After formatting the disk...

1) Ensure that you've marked the partition active

fdisk -e /dev/rdisk1
f 1
write
exit

2) Download syslinux and write the critical mbr binary your device.

dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/rdisk1


After that, just use UNetbootin as usual.

20110803

OMAP3 SGX EGL Drivers Add Wayland Support

Just in case anyone was wondering this is a pretty big deal. Imagination Technologies, whose 3D graphics cores drive most mobile displays, has announced support for the EGL_KHR_Image_Pixmap extensions used by the Wayland display server protocol.

For those who haven't been following, Wayland has gained a lot of momentum as a non-X-based window compositor for Linux-based operating systems. Wayland facilitates client-side rendering, similar to the Quartz compositor used in Mac OS X. It has since been adopted by Meego and Ubuntu as their preferred compositing backend.

The stated goal of Wayland is to provide a user experience where "every frame is perfect". This is a rather necessary and long overdue improvement since traditional Linux desktops based on the aging X11 display server tended to suffer from artifacts such as tearing, visible redrawing, and flickering. However, Wayland retains the capabilities to encapsulate the traditional rootless X server for legacy applications. Wayland rendering targets already exist for popular toolkits such as GTK+ and QT among others.

Check out the video below for a (slightly older) demo.



Today, Wayland support exists for graphics chipsets from Intel, AMD, NVIDIA (nouveau) and SGX (OMAP3) platforms. OMAP4 support probably isn't far off.

I guess it's time to fire up the old BeagleBoard ;-) Incidentally, happy birthday!



20110726

Canon Printer Drivers under Mac OS X

For my regular readers, please disregard this post. I'm merely using this blog post as a conglomerate location for my bug and other similar bugs that are occurring with Canon Printer drivers on Mac OS X.

Here is a list of URL's describing exactly the same issue:

https://discussions.apple.com/message/15218891#15218891
https://discussions.apple.com/message/15086171#15086171
https://discussions.apple.com/message/12138167#12138167
https://discussions.apple.com/message/12577853#12577853
https://discussions.apple.com/message/12777003#12777003
https://discussions.apple.com/message/12423314#12423314
https://discussions.apple.com/message/13276113#13276113
https://discussions.apple.com/message/15015078#15015078

I have tried every variant of UFR2 driver available from version 1.60 to version 2.25 and none of them work.

20110706

Parc Oka for the Canada Day Long Weekend

We went on a bike & camping trip to Parc Oka for the weekend and documented the trip with some photos.

Originally we were supposed to take a train to and from Deux Montagnes, which would have made this trip very easy, but the AMT had some unannounced line work. So Erin threw together some last minute improvisational plans and the "to" portion of our trip included a horrific STM then CIT commuting.

We ended up biking from St. Eustache, which was only about 5 km further. Taking the AMT from Deux Montagnes on the way back was much more accommodating for our bikes, and our bike-seats and Croozer full of camping gear / 3yo child.

I also traced our trip using MyTracks for Android, and it worked quite well. Considering how much I'm on my bike, MyTracks is practically like a personal trainer given that it records all of the stats you can imagine (latitude, longitude, bearing, speed, elevation, time, etc).

It was the perfect weekend to get away, and Parc Oka was awesome. The water provided an excellent escape from the heat that weekend.

20110524

The End of an Era

Today I arrived at my office (which just happens to be wherever I sit down with my notebook), and was quite contented to read that Linus has seemingly decided to move on to the next major version change. This will probably also include a change in the numbering system that is currently used for kernal releases, much to the appeal of GregKH.

I have been using Linux since around the 2.2 days, and have been actively hacking / employed with Linux related projects on various architectures with both the 2.4 and 2.6 kernels. I guess you could say that I have Linus and many other kernel, arch, & subsystem maintainers to thank for that.
Sentimentally speaking, I find it immensely cool that I am currently writing this blog post using a phone running Linux/Android released by a company that leveraged the power of Linux for a significant part of their commercial success. If anyone is wondering, the phone is a Nexus S and the company is Google.

Here's to all Linux hackers, wherever your workstations may be.

update-20110529: 3.0!

20110503

Time for Change

Lately I've been trying to write less political editorial on my blog, but I'll make an exception just for today.

There are some things that I'm very (indeed, historically) happy about after yesterday's Canadian Federal Election and there are things that also make my skin crawl. What those things are is an exercise for the reader to determine.

Regardless of the winners and losers of the election, I wanted to write about the topic of proportional representation in the house of commons.

Most of the time

... when somebody argues against proportional representation, they usually make the argument that small communities will suffer if they do not share the same ideals as the majority

That argument has some merit particularly when considering the right to maintain a cultural identity or a specific type of business or industry in Canada.

In this context, there are some cases where locality does play a major role. However, for the most part, Canada is everywhere-diverse in terms of culture. Almost everywhere in the country, there are people celebrating and learning about their own and different cultures, together as Canadians.

In terms of industrial locality, the issue can be fairly easily solved by transferring more power to the provincial governments and by supporting particular focus groups rather than dismantling them. It also affords voters the privilege of having an equal voice at the federal level.

That is the argument... most of the time.

Occasionally

... when somebody argues for proportional representation, they usually make the argument that large communities will suffer if they do not share the same ideals as the minority. To put more of a positive spin on it, one could also make the argument that the majority would not have the benefit of hearing the oft important message of a marginalized voice.

Why not let our political system reflect the diversity of our population? Let unique voices be heard & eliminate redundancy.

20110330

The USRP E100

I thought that I would take a moment to plug a product that I think has great potential for anyone working, experimenting, or interested in learning about digital wireless communication - the USRP E100. This device, jointly developed by Ettus Research and OpenSDR, was announced just a few months ago. It's a tightly-integrated embedded Linux solution for research into digital baseband signal processing for wireless systems.

I've worked with previous products from Ettus, like the USRP2, and have had 99% good experiences. The entire USRP product family is supported with GNURadio, which greatly facilitates signal visualization, processing, and software interfacing. The one down-side of using the USRP2 was that the only way to connect with it was by using a Gb ethernet cable (which is not a standard feature on laptop / desktop computers). The Gb ethernet port did not make the USRP2 'networkable' since it was only used for data transfer using raw ethernet packets.

The main differentiator of the E100 is that this device ships with a modular ARM board from GumStix. The stock GumStix board is powered by an OMAP3 (Cortex-A8) chip from Texas Instruments. The modular design makes repairs and upgrades easy (any COM can be used with conformant electrical and mechanical specifications). The OMAP3 has appeared in several mobile phones, but (more importantly) has also been the driving force behind a tidal wave of low-cost and powerful embedded Linux developer boards such as the BeagleBoard and BeagleBoard xM. Texas Instruments really has made a great contribution back to the developer community just by making these developer boards available. The OMAP3 processor is capable of running just about every operating system in existence, ranging from Windows Mobile to Ubuntu or Android (all flavours of Linux, and FreeBSD too). The E100 (probably) ships with Ã…ngström by default. As for interfacing, the E100 even exposes HDMI, ethernet, and USB ports so this SDR box can literally be it's own work-station. I really wish this was available back when I was working on the USRP2!

So - that's great - an SDR device that eliminates the need for an external laptop or desktop computer so the entire system consumes much less power in total.

There's just one more thing...

The way that the OMAP3 interfaces with the radio hardware is super-efficient. The TX and RX buffers are mapped directly in to the OMAP3's MMU. To the layman, this means that the Linux kernel can easily expose the radio as a regular device to userspace using Phil Ballister's driver, which is on its way upstream. Furthermore, users of TI's Code Composer Studio (or developers who choose to use CGT directly) can write DSP firmware for OMAP3's integrated C64x+ DSP. Thus, keen developers can run code on the DSP to control the baseband radio and process baseband signals directly (the way nature intended). Naturally, only one processor on the chip can 'own' the radio buffers at one time (without proper synchronization).

To summarize: the USRP2 E100 is the ideal product for most engineers researching embedded RF systems and digital baseband processing.

PS: Nice work Phil! (he was my co-mentor for GSOC2010). I would love to use the E100 for some of my more recent work with ahumanright.org to engineer a low-cost / low-power satellite modem...

20110323

GSOC 2011: I Recommend Mono.SIMD

If anyone is looking for a good GSOC 2011 project, I would suggest Mono.SIMD. If you don't already know what SIMD is, then this project probably isn't for you, but you might find it interesting nonetheless. Although the Microsoft .NET version of C# does not explicitly support SIMD, once Mono has it for x86, ARM, and others, Microsoft likely will want it as well. The ARM port is just as important (if not more) important than the x86 port, so please don't ignore it. Buy a BeagleBoard or a PandaBoard to tackle NEON SIMD, (or even buy a Plug Computer or Verdex Pro for iwMMXt) . Although some people may think that iwMMXt is old news, it still lives on with Marvell's Sheeva and ARMADA product lines. You can still do blazingly fast multimedia with iwMMXt (h264, for example) but its limited to integer operations rather than floating-point (which is more efficient for multimedia in any case). 

Chances are you already have a PC with several flavours of SSE, so you should be all set to do add x86 SIMD and at least one flavour of ARM SIMD to the Mono JIT. Read this article to see why it makes sense.

PS: Good luck to all volunteering organizations and students this year!

20110227

Death, Taxes, & Voting

Considering that less than 50% of Canadians of the age of majority actually vote, why don't we make it mandatory to vote every time an individual files their taxes?

PS: I am intentionally leaving a lot of editorial commentary out of this post.

20110226

AMD Open-Sources Video API

This is quite a leap forward for free and open-source software users everywhere.

20110216

Nvidia ARMs Themselves for a Shot at the Desktop Market

X86 chip manufacturers should probably be a little bit worried at this point, considering that Microsoft has also decided to do a full windows port to ARM. Of course, Linux has been running beautifully on ARM for almost two decades already.

Don't be fooled, Nvidia's ARM team is not only aiming at the netbook / laptop market - they're setting their crosshairs on the desktop market as well, as indicated by their roadmap.



PS: If you are reading this, and you were present at a certain meeting with me not too long ago where we were talking about buying an ARM architecture license, then I hope you are hearing this message loud and clear. My honest opinion is that you need to act now or suffer tremendously in sales.

20110213

Ahem... Picasa?

Dear Google,

Don't you think it's about time to make functional Picasa clients for Linux and Android?

Currently, I am relying on a random 3rd-party app maker to upload video from my Google Nexus S to my Google / Picasa Web account - it's a little discomforting.

Also, video transcoding for Picasa Web albums is really straight forward to do using ffmpeg from the command-line, and it will even do VP8 :) ... but still, I can only upload videos from Picasa using Windows or Mac. If you're worried about software patents, then just use a plug-in architecture with dlopen(). That way, users can supply "their own" versions of popular multimedia encoders / decoders. For closed-source platforms, just write a plug-in that uses the codecs available on that system (e.g. windows, os x).

20110125

20110124

Make

Having a modern (i.e. multi-core) workstation makes such an unbelievable difference. I can't even begin to describe how much my life has been made easier by "make -j9".

20110119

U-Boot on the TS7260

Click here for the original image