Archive for the intrepid Category

Bluetooth internet connection using mobile phone under Ubuntu 8.10

Posted in Asus N10Jc, bluetooth, internet, intrepid, linux, Nokia, ubuntu on January 26, 2009 by rvshiro

Hardware use :
1. Asus N10Jc (BT-ready)
2. Nokia E66 (3G mobile phone with BT-ready)
3. A valid 3G-enable GSM simcard (Indonesia Telkomsel Flash)

The idea is not so new as I believe anyone has known about it already ….  So, now I’d like to have an internet connection using Nokia E66 via Bluetooth connection under Ubuntu 8.10 on N10Jc.

Before we do the next step, make sure the following parts are already install / ready i.e.:
1. Bluetooth program ($ sudo apt-get install bluetooth bluez)
2. wvdial ($ sudo apt-get install wvdial)
3. A valid 3G / GPRS connection account from your mobile operator

As you know, BT applet has been installed automatically the 1st time you install Ubuntu on Asus N10Jc. So there’s no need to talk about installing this BT applet and I assume, your Asus BT has been running properly ….
If you’re not sure, you can open the terminal (xterm) and write :

$ lsusb

the result will look like this :

Bus 004 Device 002: ID 0b05:1712 ASUSTek Computer, Inc. BT-183 Bluetooth 2.0+EDR adapter

Meaning you BT is running properly.

Next is to activated the phone’s  bluetooth that will be used, in this case is Nokia E66. Just press / choose the following keys on Nokia E66 :

Menu -> Connectivity -> Bluetooth -> On

After all BT turn on, please do the following :

$ sudo hcitool scan

Note the mac address and device name.

Next is to make a backup copy of your rfcomm.conf, by typing :

$ sudo cp /etc/bluetooth/rfcomm.conf /etc/bluetooth/rfcomm-ori

Then type

$ sudo gedit ./

Copy – paste the following script and save it


echo “Setting up Bluetooth Connection ” # Scan MAC Address
mac=`hcitool scan | grep device-name | awk ‘{print $1}’`
echo “Mac Address : $mac ”

# Scan channel DUN
channel=`sdptool search DUN | grep “Channel:” | awk ‘{print $2}’`
echo “Channel : $channel ”

echo “Editing /etc/bluetooth/rfcomm.conf ”
rm /etc/bluetooth/rfcomm.conf
echo “rfcomm0 {” >> /etc/bluetooth/rfcomm.conf
echo “bind yes;” >> /etc/bluetooth/rfcomm.conf
echo “device ${mac};” >> /etc/bluetooth/rfcomm.conf
echo “channel ${channel};” >> /etc/bluetooth/rfcomm.conf
echo “}” >> /etc/bluetooth/rfcomm.conf

# Binding rfcomm to device
echo “Bind rfcomm0 to device $mac on channel $channel ”
rfcomm release 0
rfcomm bind 0 $mac $channel

# Dial up using wvdial
echo “Open up ppp for bluetooth ”

You should replace the “device name” above with the result from “sudo hcitool scan” (in this case, my device name is E66) .
Make sure it’s executable by changing the permission as follow :

$ sudo chmod +x ./

We also need to modified wvdial.conf.

$ sudo gedit /etc/wvdial.conf

Then just copy – paste the below setting :

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”internet
Modem = /dev/rfcomm0
Phone = *99#
Modem Type = Analog Modem
Stupid Mode = 0
Baud = 460800
Auto DNS = 1
Dial Command = ATDT
Ask Password = 0
ISDN = 0
Username = “xxxx
Password = “xxxx

Make sure you input, appropriately, the bold parts above for the wvdial.conf.
1. APN name
2. Phone number
3. Your user name given by your mobile operator
4. Your password given by your mobile operator

Now, it’s finished…

To execute / connect it just type in terminal :


The Nokia E66 will prompt you, whether to connect or not, answer ‘Yes’. And it will execute the script.

To stop the connection, just press Ctrl-C.

Happy browsing ….

nb. you might try with other notebooks and mobile phones. There’s chance that you can use this script. If not, it’s just unlucky and you’re on your own.

script resource :

Fingerprinting under Ubuntu 8.10 on Asus N10Jc (fingerprintGUI-0.5.tar.gz)

Posted in Asus N10Jc, intrepid, linux, ubuntu on January 14, 2009 by rvshiro

this step-by-step howto was performed using fingerprintGUI-0.5.tar.gz with some limitation for gnome-screensaver and polkit (as described inside the packages under “Some Known Limitations”). If you’re interestested to use gnome-screensaver FP login, please use 0.6 ver. and up..
which not covered in this blog

Fingerprinting on Ubuntu 8.10 for my Asus N10Jc doesn’t come out of the box. It doesn’t install the needed software automatically. As for the repository, it only provides fprint-demo which is never work on my N10Jc. Fprint-demo doesn’t recognised the fingerprint device on N10Jc, it also doesn’t provide the option to choose device based on  bus:address, perhaps there’ll be some development to address this issue but currently, as of Jan 2009, it doesn’t have the capability to choose device based on that. So, we must install it manually (and it’s pretty straighforward, hassle-free installation).

And this is the way I did.

After browsing on the net for quite some time, I’ve found this web site :

Download the latest file (at the time of this writing the latest version is fingerprintGUI-0.5.tar.gz).
And do the following :

step 1
$ tar -zxvf ./fingerpintGUI-0.5.tar.gz

step 2
$ cd ./fingerprint-0.5

step 3
$ sudo ./ –with-upek

There must be ‘no errors’ in this step.

Next step is to make sure “gdm” is your default display manager.

step 4
$ cat /etc/X11/default-display-manager

The result should be  “/usr/sbin/gdm”
Make sure you have no face browser for gdm activated like this but use login screen like this (no user list)
Also, make sure autologin is disable

step 5
$ sudo gdmsetup
choose ‘Security’ tab, make sure ‘Enable Automatic Login’ is empty (no tick, no anything)


Then follow these several steps :

step 6
$ sudo cp /etc/pam.d/common-auth /etc/pam.d/common-auth-no-fingerprint

Next is to edit

step 7
$ sudo gedit /etc/pam.d/gdm

edit ‘auth   requisite’ to become ‘# auth   requisite’
This avoids PAM to ask for a username prior to fingerprint authentication

step 8
$ sudo gedit /etc/pam.d/common-auth

Insert at the first line ‘auth   sufficient debug’

step 9
$ sudo gedit /etc/pam.d/polkit

Change the line ‘@include common-auth’ to ‘@include common-auth-no-fingerprint’

step 10
$ sudo gedit /etc/pam.d/gnome-screensaver

change the line ‘@include common-auth’ to ‘@include common-auth-no-fingerprint’
Then, do the following :

step 11
$ lsusb

Notice the ID 147e:1000, this is your fingerprint device. There’s no info when you see it (I don’t know why).
But if you’re curious or not sure just write this command :

step 11a
$ lsusb -v -d 147e:1000

You will see the manufacturer is Touchstrip and the product is Fingerprint sensor

Take a look at Bus xxx Device xxx on the left of ID 147e:1000
After you note the bus and device (they keep changing whenever you restart Ubuntu), then do :

step 12
$ sudo chmod 777 /dev/bus/usb/xxx -R

The ‘xxx’ is the Bus address you see on the step 4 above. This step will allow you to safe your fingerprint scan after you activating the program. If you think it’s unsafe ’cause it gives permission to all, don’t worry. Once you reboot the system, it will back to default permission policy (755)

step 13
From the Menu you can choose
System -> Preference -> Fingerprint GUI

or from the xterm

step 13a
$ fingerprintGUI

Then the program will start. Choose :

step 14
unknown vendor (0x147e) unknown device (0x1000)

step 15
click ‘Next’ button, then choose which finger you want to scan …

step 16
click “Next’ then you start scanning.

At this step, if you don’t perform the 12th step above, you won’t be able to safe the scan result. You should scan the same finger 3 times. After it finish, it will ask whether you want to scan other finger. You can scan all of your fingers, but the default GDM login will only use 1 finger.

If you choose “No” or “cancel”, you will go to the next screen.
In this screen you can try / verify to use fingerprint under several login scheme. Practically I only need for GDM and sudo.

Once it recognised your fingerprint, then you’re ready to use it. Just reboot and each time you login, it will show you fingerprint scan rather than user and password..

If you want to add more fingers, do perform step 11 to the rest. The same goes for new users who want this fingerprint login. Just login under the designated user account (user and password), then start with the 11th step above up to the 16th.

Good luck,

nb. Thanks to Wolfgang Ullrich and Daniel Drake for hacking the code, source:

Asus N10Jc : Memperbaiki webcam yang terbalik di Ubuntu 8.10

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Setelah selesai instalasi Ubuntu 8.10, webcam Asus N10Jc dapat bekerja dengan baik. Sayangnya image yang ditangkap terlihat terbalik di layar notebook. Untuk mengatasi hal ini, perlu dilakukan langkah-langkah berikut :

$ sudo apt-get install subversion
$ svn checkout svn://
$ gedit ./uvcvideo-alt.patch

Copy – paste script dibawah ini :

diff -uN UVCVIDEO_v0.1.0/uvc_video.c UVCVIDEO_patched/uvc_video.c
— UVCVIDEO_v0.1.0/uvc_video.c    2008-06-26 10:41:01.000000000 +0200
+++ UVCVIDEO_patched/uvc_video.c    2008-06-27 12:09:20.000000000 +0200
@@ -371,23 +371,81 @@
return data[0];

+/* This patch should work ONLY with YUY2 image formats, also known as YUYV or
+ * YUV422 formats.
+ * This patched function allows to overturn video images from an upside-down
+ * orientation to a normal one. The conversion consists in copying 4 bytes at a
+ * time (Y0,U0,Y1,V0) corresponding to 2 pixels from the frame (coming from the
+ * video source) to the buffer that will be used by the application requesting
+ * the video stream. But in order to satisfy the YUY2 image format byte has to
+ * be copied in this way: Y1 U0 Y0 VO. Bytes are copied in a bottom-up
+ * direction into the reversed frame.
+ * “data” stores a sequence of pixels coming from the video source.
+ * This sequence is not a full frame or a full row of pixel, but just an
+ * ordered vector of pixels (from top-left to bottom-right), whose
+ * represents just an area of the current frame and which size (“nbytes”) is
+ * not constant. In fact this function has to be called hundreds of times
+ * before a frame is completed. Each time “data” contains the next part of the
+ * current frame (upside-down). At the end data stored in “mem” buffer will be
+ * used by the application who requested the video stream.
+ * No memory allocation is needed because pixel order is modified directly
+ * while copying from “data” into “mem” buffer (i.e. in each call of this
+ * function), and not just once when the frame is already completed.
+ */
static void uvc_video_decode_data(struct uvc_video_device *video,
struct uvc_buffer *buf, const __u8 *data, int len)
struct uvc_video_queue *queue = &video->queue;
unsigned int maxlen, nbytes;
void *mem;
+    /* Patch variables */
+    unsigned int i, pixel_size;
+    __u8 *ptr_tmp;

if (len <= 0)

/* Copy the video data to the buffer. */
+    /* How many bytes are needed to complete the buffer? */
maxlen = buf->buf.length – buf->buf.bytesused;
+    /* Where do pixels stored in “data” have to be copied? */
mem = queue->mem + buf->buf.m.offset + buf->buf.bytesused;
+    /* How many bytes really can be copied into “mem”? */
nbytes = min((unsigned int)len, maxlen);
–    memcpy(mem, data, nbytes);
–    buf->buf.bytesused += nbytes;

+    /* “pixel_size” depens on the pixel color depth (bpp),
+     * but in YUY2 image format is constant and equal to 2.
+     */
+    pixel_size = video->streaming->format->bpp / 8;
+    /* In each loop 4 bytes are modified and copied into “mem” buffer. */
+    for (i = 0; i < nbytes; i += 2 * pixel_size) {
+            /* “queue->mem + buf->buf.m.offset” is the base-address
+             * where to start to store the current frame. This
+             * address refers to a preallocated area (just for a
+             * sigle frame) taking part in a circular buffer, where
+             * to store a fixed number of sequent frames.
+             */
+        ptr_tmp = (__u8 *)(queue->mem + buf->buf.m.offset
+            /* Go to the end of this frame. */
+            + video->streaming->cur_frame->wWidth * pixel_size
+            * video->streaming->cur_frame->wHeight
+            /* Go back for the number of already copied bytes. */
+            – buf->buf.bytesused
+            /* Go back for the number of bytes (4 bytes) to be
+             *  copied in this cycle.
+             */
+            – 2 * pixel_size);
+        /* The order of copied bytes is changed from
+         * (Y0 U0 Y1 V1) to (Y1 U0 Y0 V1), i.e. from
+         * (#0 #1 #2 #3) to (#2 #1 #0 #3).
+         */
+        ptr_tmp[0] = ((__u8 *)(data + i))[2];
+        ptr_tmp[1] = ((__u8 *)(data + i))[1];
+        ptr_tmp[2] = ((__u8 *)(data + i))[0];
+        ptr_tmp[3] = ((__u8 *)(data + i))[3];
+        /* Update “byteused” value. */
+        buf->buf.bytesused += 2 * pixel_size;
+    }
/* Complete the current frame if the buffer size was exceeded. */
if (len > maxlen) {
uvc_trace(UVC_TRACE_FRAME, “Frame complete (overflow).\n”);

Setelah di save, selanjutnya lakukan :

$ patch < uvcvideo-alt.patch
$ make

Hingga langkah ini, tidak boleh terjadi “error”. Kalo terjadi, berarti ada yang salah dalam mengutip patch diatas.
Selanjutnya :

$ sudo gedit Makefile

dan ubah :

INSTALL_MOD_DIR := usb/media


INSTALL_MOD_DIR := ubuntu/media/usbvideo


$ sudo modprobe -r uvcvideo

$ sudo make install

$ uname -r

Catat hasil outputnya, hsl saya adalah 2.6.27-9-generic

$ sudo cp uvcvideo.ko /lib/modules/’masukkan hasil uname -r diatas’/ubuntu/media/usbvideo

$ sudo depmod -ae

$ sudo modprobe uvcvideo

Mudah2an bisa …

source :

Asus N10Jc : Mengaktifkan suara pada Ubuntu 8.10

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Untuk mengaktifkan suara, lakukan langkah berikut :

$ sudo gedit /etc/modprobe.d/alsa-base

tambahkan baris ini :

options snd-hda-intel position_fix=1 model=3stack-6ch-dig

Save dan reboot.

sumber :

Instalasi Ubuntu 8.10 pada Asus N10Jc-HV006

Posted in Asus N10Jc, intrepid, linux, ubuntu on December 28, 2008 by rvshiro

Instalasi Ubuntu 8.10 pada Asus N10Jc pada umumnya mudah dan tidak memiliki hambatan yang berarti.
Hampir semua fungsi dasar bekerja dengan baik dan juga tombol-tombol pada keyboard.

Beberapa hal yang tidak bekerja sebagaimana mestinya setelah selesai booting Ubuntu adalah :
1. Suara
2. Kamera (bisa diaktifkan tetapi gambarnya terbalik)
3. Scanner untuk fingerprint tidak aktif secara default.

Kunci / tombol pada keyboard yang tidak berfungsi ketika ditekan tombol “Fn” :
1. Tombol C (ada gbr monitor bertuliskan huruf “S”)
2. Tombol V (ada gbr kamera)
3. Space bar (ada gbr org lari)
4. Tombol zoom (kedua sebelah kiri tombol power)
5. Tombol F2 (ada gbr antena pemancar).
6. Switch aktivasi wireless (disamping kiri, dkt konektor USB), hy berfungsi untuk on/off BlueTooth, sdgkan WLAN (Atheros) tetap nyala.

Untuk me-nonaktifkan wireles, bisa dilakukan melalui command line dgn perintah :

$ sudo ifconfig wlan0 down

atau melalui GUI, klik kanan pada bar wireless, kmd hilangkan tanda centang (V) pada “Enable Wireless”

Tombol yang harus dibuat patch / script :

1. Switch dual GPU di sebelah kiri notebook.
Tanpa script, Ubuntu hanya mengenal graphic yang digunakan pada saat instalasi.
Bila kita berpindah, maka X11 (GUI) tidak akan jalan… Command Line tetep bisa…

Disarankan mengaktifkan GPU Nvidia pada saat instalasi. Bila tidak diaktifkan, maka compizfusion tidak bisa digunakan.