WebCam on Asus N20A notebooks

Well, I gave this built-in webcam a try today. `Cheese’ does show the image, but it’s upside-down.

A quick lsusb shows

1
2
3
4
5
6
7
8
9
10
Bus 002 Device 002: ID 064e:a116 Suyin Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 147e:1000
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

It’s obviously 064e:a116, so I googled it, and this turns out:

This camera module is known to be mounted upside-down in some notebooks. There is currently no documented way to rotate the image at the device level. If you don’t mind holding your computer upside-down, the camera should work fine.

WELL, if I hold my notebook upside-down, my LCD will also be upside-down, so the video I see will still be upside-down, no ?

android-pdk

Android porting development kit could be obtained by

1
make pdk pdk_all

in your top repo dir. You can find the pdk doc in out/target/common/docs/online-pdk. If you open index.html directly you will find the css is all messed up. The quickest way might be moving the directory to /var/www, install one web server (I use thttpd) then open http://localhost/online-pdk/.

The document is far from complete but it’s still a good reference to save a lot of time.

Integrate emacs23 with emacsen on Debian

I’m quite disappointed about the unicode support of emacs22 so I decided to give emacs23 pretest a try. It turns out to be quite nice but it doesn’t include Debian’s debian-startup.diff patch and I don’t want to add it to the source code. So, I decided to solve it in my .emacs file. Here is the related script:

1
2
3
4
5
6
7
8
9
10
11
12
;; hacks to use debian emacsen in emacs23                                                                                     
(if (not (string-match "^23." emacs-version)) nil
(setq load-path
;; more paths could be added here
(append (list "/usr/share/emacs/site-lisp"
"/usr/share/emacs/site-lisp/global") load-path)
)
(defconst debian-emacs-flavor 'emacs22
"A symbol representing the particular debian flavor of emacs running.
Something like 'emacs21, 'xemacs21, etc.")
(load-library "debian-startup")
(debian-startup debian-emacs-flavor))

And I also realized the GUI version of emacs doesn’t bring me any good then the console version, so I’m running it without X now. Much easier to use.

x-hacker

1
2
3
4
> /home/john/usr/lib/python2.6/site-packages/planet/feedparser.py(2699)parse()
-> result['feed'] = feedparser.feeddata
(Pdb) p result
{'feed': {}, 'status': 200, 'updated': time.struct_time(tm_year=2009, tm_mon=5, tm_mday=30, tm_hour=18, tm_min=20, tm_sec=46, tm_wday=5, tm_yday=150, tm_isdst=0), 'version': None, 'encoding': 'UTF-8', 'bozo': 0, 'headers': {'x-nananana': 'Batcache', 'transfer-encoding': 'chunked', 'content-encoding': 'gzip', 'vary': 'Cookie, Accept-Encoding', 'server': 'nginx', 'last-modified': 'Sat, 30 May 2009 18:20:46 +0000', 'connection': 'close', 'etag': '"6d6a931c57ea74fb68476ac28bb7a24c"', 'cache-control': 'max-age=300, must-revalidate', 'date': 'Sat, 30 May 2009 18:20:46 GMT', 'x-hacker': "If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.", 'content-type': 'text/xml; charset=UTF-8', 'x-pingback': 'http://asleepfromday.wordpress.com/xmlrpc.php'}, 'etag': '"6d6a931c57ea74fb68476ac28bb7a24c"', 'href': 'http://asleepfromday.wordpress.com/category/0xlab/feed/', 'entries': []}

If you’re reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.

Hey, I was just trying to fix planet feed reader…

What we are doing now, and how to join force.

We have been receiving a lot of emails asking about what 0xlab is doing now, and exactly how to cooperate with us.

First of all, we have been fairly busy recently. If you have tried to port Android to other platform, then you will know it’s not an easy task. We have some familiar porting issues, such as the documents provided by hardware manufactures are either vague or incomplete, the BSP is outdated (ancient), code is a mess or even completely unusable. And we also have some new issues, such as Android platform’s big code base and lack of proper document (I’m talking about lower level here), or what Goggle said in their presentations is way different then what’s in the code, and I don’t even want to start with many hard-coded assumptions about hardware (G1), etc.

Rant aside. What’s been keeping us busy:

  • Port several wireless modules to several popular platforms.
  • Graphic acceleration.
  • Multimedia enrichment. (Reads: port other open source codes)I’m not going to dive into details here. We will do a code drop sometime in June, and our members will blog about their work, so the technical details will be revealed then. We will also open up our development mailing list, so people can discuss there.

Next question is: how to join force? The answer is quite simple: just like any open source project. After the code drop, try it out, report bugs, send us patches, join mailing list, talk on the IRC (#0xlab), etc. - all the usual stuffs. That also means we won’t work on any specific product. So, if you’re interested in developing android based product, send your own developers to join and grow with us.

Now, advertisement time: join FreedomHEC Taipei, Matt and Jserv will talk about bootloader there.

Doxygen and Android source code

It turns out doxygen can be quite handy if you want to read android code. It supports javadoc style, so it could generate documents for the java files. It supports qt style, so the c++ code is also taken care of. Inheritance diagrams, integration with gnu global, etc. are quite useful as well.

0xlab Launch

0xlab is a innovative movement. Taiwan, our home country, has been doing IT hardware manufacture for quite a long time and is fairly successful. The thing about hardware manufacture is that it’s all about cost-down. Once your competitors know how to make the same product, it all goes down to the scale and production management.

On the other hand, the software industry in Taiwan has always been poor, as long as I can remember. The only two big local (maybe not so local) software companies here are TrendMicro and Cyberlink. Considering the fact that Taiwanese students always do great in the global programming competitions, the performance of software industry is relatively not that significant.

The involvement of FOSS here used to be in a really really bad condition. Giants like Asus has been using FOSS to create consumer products for years, but they didn’t really understand how to play nice with other kids, until suited by people like Harald Welte. It’s not like “I’ll only open up if I absolutely have to”, the involvement of FOSS is actully becoming a good business strategy now. Just think about why giants like Intel, Novell, Apple and Google are getting more and more involved in open source. There are reasons behind all these.

We should really use our advantage in hardware to join this trend. 0xlab is the first step, and I hope there are many to follow.

Google Calendar: offline mode broken?

If I access Google Calendar with Google Chrome now it will ask me to enter password again. After that it will do a brief redirect then drop me right back to the password screen. The redirect looks like below, so I would guess the “locallogin” view doesn’t work for me.

Since Google Gears is always enabled in Chrome, it means I cannot use it to access my calendar now.