Friday, August 17, 2007

Acer Aspire 4310, Acer CrystalEye webcam (064e:a101) on Ubuntu Linux

The Ubuntu Linux version is:

$ cat /etc/issue.net
Ubuntu 7.04

The Linux kernel version is:
$ uname -a
Linux xxx-laptop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

The fresh install will detect the webcam:
dmesg | grep Crystal
[ 22.116000] uvcvideo: Found UVC 1.00 device Acer CrystalEye webcam (064e:a101)

Camorama and other applications that do not support v4l2 will not work. The webcam driver uvcvideo (linux-uvc) supports v4l2 only. v4l1 is officially deprecated.

To test, you can use Ekiga softphone or to take webcam snapshots use luvcview.
Source code: http://mxhaard.free.fr/spca50x/Investigation/uvc/luvcview-20070512.tar.gz

You will also need libsdl1.2-dev (for SDL libraries) and build-essential (for building tools like gcc and make utility).
$ sudo aptitude install build-essential libsdl1.2-dev
$ wget http://mxhaard.free.fr/spca50x/Investigation/uvc/luvcview-20070512.tar.gz
$ tar zxvf luvcview-20070512.tar.gz
$ cd luvcview-20070512
$ make
$ make install


To make it user-friendly, create a Custom Application Launcher pointed to this script:
#!/bin/bash
# will place snapshots in Desktop
cd ~/Desktop
# will produce pnm: Netpbm PPM "rawbits" image data,
# instead of default MJPEG format that the webcam does not support
luvcview -f yuv


If you have questions, post them at http://www.ubuntuforums.org and point them from here.

Wednesday, August 15, 2007

Acer Aspire 4310, Broadcom (bcm43xx) chipset on Ubuntu Linux

The Ubuntu Linux version is:

$ cat /etc/issue.net
Ubuntu 7.04

The Linux kernel version is:
$ uname -a
Linux xxx-laptop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux


The fresh install will detect the WLAN hardware but will fail on initialization (use dmesg to see kernel messages):
$ dmesg
bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed.
atkbd.c: Unknown key pressed (translated set 2, code 0xd4 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e054 ' to make it known.

The first line looks for the Broadcom firmware. The second and third lines is a response to pressing the Bluetooth key.

Update: This forum [*] reports that there is a Bluetooth key for turning it on/off, but there is no Bluetooth chip!

[*] http://forums.whirlpool.net.au/forum-replies-archive.cfm/797583.html

The following is the output of lspci:
$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5787M Gigabit Ethernet PCI Express (rev 02)
03:00.0 Network controller: Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (rev 01)
0a:06.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
0a:06.2 Generic system peripheral [0805]: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)
0a:06.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)


First, install bcm43xx-fwcutter. fwcutter is a tool which can extract firmware from various source files. It's written for BCM43xx driver files.
$ sudo aptitude install bcm43xx-fwcutter


You will get the following error message:
Preconfiguring packages ...
Selecting previously deselected package bcm43xx-fwcutter.
(Reading database ... 88014 files and directories currently installed.)
Unpacking bcm43xx-fwcutter (from .../bcm43xx-fwcutter_1%3a006-1_i386.deb) ...
Setting up bcm43xx-fwcutter (006-1) ...
--22:15:56-- http://boredklink.googlepages.com/wl_apsta.o
=> `wl_apsta.o'
Resolving boredklink.googlepages.com... 72.14.203.118
Connecting to boredklink.googlepages.com|72.14.203.118|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
22:15:57 ERROR 404: Not Found.

dpkg: error processing bcm43xx-fwcutter (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
bcm43xx-fwcutter
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up bcm43xx-fwcutter (006-1) ...
--22:15:57-- http://boredklink.googlepages.com/wl_apsta.o
=> `wl_apsta.o'
Resolving boredklink.googlepages.com... 72.14.203.118
Connecting to boredklink.googlepages.com|72.14.203.118|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
22:15:58 ERROR 404: Not Found.

dpkg: error processing bcm43xx-fwcutter (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
bcm43xx-fwcutter


Just proceed and download the firmware/driver:
$ wget http://sidulus.textdrive.com/bcmwl5sys.zip


Extract the firmware from the driver:
$ sudo bcm43xx-fwcutter -w /lib/firmware ~/Desktop/bcmwl5.sys


This will create lots of new files in the /lib/firmware directory, this is the firmware part of the driver that will make your card work with ubuntu!

Also put the driver in the kernel folder:
$ uname -r
2.6.20-15-generic
$ sudo bcm43xx-fwcutter -w /lib/firmware/2.6.20-15-generic ~/Desktop/bcmwl5.sys


Your WLAN card should now work!


Resources

* http://boredklink.googlepages.com/ubuntuguide

If you have questions, post them at http://ubuntuforums.org/, and point them from here.