Jul 15 2010

Use ZTE AC580 3G Dongle in your Ubuntu – Setup using China Telecom Service

I got my 3G connection the other week! Hurray!

Armed with the latest Ubuntu 10.04, I tested…

…but nothing works out of the box…

Since it was my first dip in the world of ZeroCD configuration, it took me sometime to figure out how to make things work.

The methods listed here work for the ZTE AC580 3G Dongle. I am using China Telecom’s 3G service, so there will be a variation on the Network Manager configuration settings with what you have.

Assumptions:

1. Your 3G Dongle is inserted before boot-up to Ubuntu

For starters, you need to install usb-modeswitch – this allows your 3G Dongle to automatically switch to modem mode upon insertion to the USB interface of your computer. Fire up Synaptic, look for the package “usb-modeswitch”, and install. [HIGHLY RECOMMENDED]

The usbserial driver can be used on the AC580, so all we have to do is load it…

First, fire up terminal and check your USBs via lsusb command. The ensuing list should bring up something like this:

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 093a:2500 Pixart Imaging, Inc. USB Optical Mouse
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 19d2:0094 ONDA Communication S.p.A.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a5c:2145 Broadcom Corp.
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
Bus 002 Device 002: ID 17ef:480a Lenovo
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The ID that says “ONDA Communication S.p.A. is what we need to fire up. BTW, if you have successfully activated modem mode in your 3G dongle, the ID would change from:

Bus 006 Device 003: ID 19d2:0026 ONDA Communication S.p.A.

to

Bus 006 Device 003: ID 19d2:00** ONDA Communication S.p.A. (** meaning, something else than 0026)

After getting the ID, time to make use of modprobe usbserial command:

sudo modprobe usbserial vendor=0×19d2 product=0×0094

The produce ID is for my case, yours may vary…

Well, you don’t want to manually enter that command every time you fire up your Ubuntu box, so we will load the driver automatically:

sudo gedit /etc/modules

And then insert the following line at the end:

usbserial vendor=0×19d2 product=0×0094

Remember to change the product code – it should be similar with the results from the command lsusb with usb-modeswitch doing the dirty work.

Network Manager should now be able to detect the 3G dongle. Setup Mobile Broadband…

For China Telecom, use the following:

Number: *99***1#
Username: CARD
Password: CARD

After that… ENJOY MOBILE FREEDOM!!!


Dec 2 2009

HOWTO: UBUNTU 9.10 ON LENOVO THINKPAD SL300

I’d like to share how I have managed so far with Ubuntu 9.10 on my Lenovo Thinkpad SL300.

This is my system specifications:

Lenovo Thinkpad SL300

Processor: Intel Core Duo CPU T5670 @ 1.80GHz

Video GPU: Nvidia 9300M GS

Memory: 4 GB
(being listed as 3.9 GB as the Nvidia chip syphoon some memory for more performance)

Storage: 320GB ATA Hitachi
(the supplied 150GB hard disk died on me during my recent trip to Peru. Major failure! Thanks to that incident I have upgraded!)

At the moment, I am running Ubuntu 9.10 Karmic Koala 64-bit edition. Except for the external microphone which until now I have yet to use successfully, everything works out of the box. You need to do a few tweaks though to make the webcam working; also be very mindful about external media – there is an issue on suspend/hibernate if you have external media mounted (such as SD card, external hard disk through USB).

RECOMMENDED: CLEAN INSTALL. This means that you have to wipe out your hard disk sans the important files you work with (Documents, Music, Video, all other folders). Ubuntu 9.10 is well known to break systems using the upgrade path from Ubuntu 9.04.

1. Install Ubuntu. During the partitioning process, I recommend that you set at least 20GB for the filesystem (”/”). For the swap partition, I recommend that you set it at 4GB – I know it’s a lot of space, but if you are planning for a memory upgrade to maximize the performance of your rig in the future this will save you a lot of trouble. For all the remaining space, you can allocate it to your home directory (/home). If you have internet connection at this point of the installation process, the installer will automatically install updates related to the distribution.

2. Boot to the newly installed Ubuntu 9.10 in your hard disk. Select System > Software Sources. I always download Ubuntu Software from the Main Server as the mirrors are sometimes lagging or incomplete. Go to the “Other Software” Tab, enable the two unmarked options: http://archive.canonial.com/ubuntu karmic partner and http://archive.canonical.com/ubuntu karmic parnter (Source Code). Close the window – the system will ask you to update your sources list. I suggest to cancel so that we can integrate this step with the addition of the Medibuntu repositories.

3. Add Medibuntu repositories – open Terminal from Applications > Accessories. Cut and paste the following (remember that when you paste via keyboard, use Crtl+Shift+V):

sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release
-cs).list –output-document=/etc/apt/sources.list.d/medibuntu.list

4. And then:

sudo aptitude update && sudo aptitude install medibuntu-keyring && sudo aptitude update

5. And then:

sudo update-apt-xapian-index

6. Now, we are ready to install additional software. I tend to install language support first (since I’m in China and from time to time I have to input Chinese characters), and enable iBus. You can do this by going to System > Administration > Language Support

7. Install your graphics card driver (I have the Nvidia chip) – go to System > Administration > Hardware Drivers. At this point your system should be able to auto detect your graphics card. Use the latest driver (at the time of writing, the latest version is 185). You may opt to restart your system before further installation of other software.

8. I recommend installing ubuntu-restricted-extras to get support from proprietary formats and additional fonts. You can do this through Synaptic Package manager under System > Administration > Synaptic Package Manager. Make a quick search for “ubuntu-restricted-extras”, then check it for installation. Alternatively, you can use the Terminal:

sudo apt-get install ubuntu-restricted-extras

9. Media Players? I use VLC and Exaile. You can search for these on Synaptic Package Manager or install them through Terminal:

sudo apt-get install exaile vlc

10. I use the following for office productivity: Adobe Reader, Planner, Google Earth, Filezilla, Hugin (for panorama picture stitching). Yours may vary… you can always use Synaptic Package Manager or the Ubuntu Software Center to look for your favorite applications. If you want to use the same suite of software I use, open Terminal and type the following:

sudo apt-get install acroread planner googleearth filezilla hugin

TWEAKS!

The following are the tweaks that I had to do in order to make my system connect properly to Windows shares in my office network.

1. Edit nsswitch.conf

sudo gedit /etc/nsswitch.conf

Erase all the old code and paste the new code below:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference’ and `info’ packages installed, try:
# `info libc “Name Service Switch”‘ for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

2. Edit smb.conf – I had to do some tweaks on this configuration file in order to display Windows shares in Chinese properly, and also to resolve some addressing issues within my office network (YOU DO NOT NEED TO DO THIS IF YOU ARE NOT WORKING ON LANGUAGE SPECIFIC SHARING ENVIRONMENTS):

sudo gedit /etc/samba/smb.conf

Paste the code below just under the [global] heading:

dos charset = CP936
unix charset = UTF-8
display charset = UTF-8

Additionally, edit Remember to change “workgroup = WORKGROUP ” to something else (your workgroup name i.e. WORKGROUP or MSHOME or MSOFFICE etc.). You may also want to add a line below “workgroup = WORKGROUP” that looks like this:

netbios name = your_computer_name

To know your computer’s name, type in Terminal:

hostname

3. You may encounter a problem installing ttf-mscorefonts-installer. If you are the unlucky few, try this:

sudo gedit /var/lib/dpkg/info/ttf-mscorefonts-installer.postinst

Find the following lines:

# Base URL for Microsoft fonts
# Can be more than one to try, but here we just use SF.net’s redirection,
# which will work in most cases. The others serve as fallbacks to retry.

Below the last line above, add the following codes:

MYURL=”http://downloads.sourceforge.net/project/corefonts/the%20fonts/final/”
MYMIRROR=”?use_mirror=internode”

Then change the following lines (located in line 150) from:

if ! wget –continue –tries=1 –dns-timeout=10 –connect-timeout=5 –read-timeout=300 $QUIET_ARG –directory-prefix . –no-directories –no-background $URLROOT$ff ; then

to

if ! wget –continue –tries=1 –dns-timeout=10 –connect-timeout=5 –read-timeout=300 $QUIET_ARG –directory-prefix . –no-directories –no-background $MYURL$ff$MYMIRROR ; then

Save the file and exit.

Special thanks goes to user NovaSci from the Ubuntu Forums for sharing this trick.

4. After doing number 3 above, try re-installing ttf-mscorefonts-installer through Synaptic or Terminal

sudo apt-get install ttf-mscorefonts-installer

5. Webcam. In order for the webcam in your SL300 to work properly, you need to have uvcvideo loaded in quirks mode. To do this:

sudo gedit /etc/modprobe.d/uvcvideo.conf

Paste the following one line code:

options uvcvideo quirks=16

Restart your system. Check that the webcam works (you can use the webcam software “Cheese” or the popular “Skype” for testing)

NOW, your Ubuntu 9.10 on your precious Lenovo Thinkpad SL300 is ready to do your bidding!


Nov 5 2009

HOWTO: Make Samba Display Chinese Characters of Windows (2003 Server) Share Folder Names and File Names Correctly on Ubuntu 9.10

Well, after research on the Samba threads, I finally have my Ubuntu 9.10 displaying Chinese Characters of my network’s Windows 2003 Server Share Folders and File Names. Here’s how:

Open Terminal

sudo gedit /etc/samba/smb.conf

Insert the following code under [global]

dos charset = CP936
unix charset = UTF-8
display charset = UTF-8

Now my Ubuntu 9.10 setup is complete


Nov 1 2009

Ubuntu 9.10 Karmic Koala on Lenovo Thinkpad SL300

Got the latest Ubuntu 9.10 running on my Thinkpad SL300 (ditched the Hasee Q310N now that my wife got the HP dv3 Pavilion Notebook). Some remarks:

1. Boot up time is noticeably faster.

2. Nice GUI during login. This is a welcome change.

3. Everything works well out of the box. The Ubuntu One service is a welcome addition, however more should have been done to introduce new users. As it is, it leaves many clueless on what to do.

4. Seems like we don’t have to use the Thinkpad SL series patch for the special keys – the brightness and the volume keys are fixed. The only key combination that does not work is the Fn+F8 key.

5. Disk Utility (Palimpsest) is installed. Takes advantage of the S.M.A.R.T. capabilities of the hard disk and warn you in advance if there are pending failures.

Some things which I think regressed:

1. I am able to happily connect to my office’s Windows shares in Jaunty, but with Karmic, it is broken. My usual edits on /etc/nsswitch.conf do not work anymore. I am currently monitoring the forums if someone has also encountered the same problem. Could it be Gnome related problem?

2. Network Manager does not connect you properly with ADSL. As a workaround, I use “pppoeconf” on the terminal to set my username and password, and then launch the service from there or type in the terminal “sudo pon dsl-provider”.

3. Empathy looks nice, but I still like the old and reliable Pidgin. There are some conveniences that were not carried on to Empathy from Pidgin, for instance, the ability to show to your contacts in Empathy about your status when you set it in the indicator applet.

4. ibus is cool, but for a major release do we really have to set things right on our bash file? Totally uncool…

5. Opera cannot take advantage of ibus input unless you make changes in /usr/bin/opera:

At the top of the file, find the following lines:

#!/bin/sh
# Location of the Opera binaries
OPERA_BINARYDIR=/usr/lib/opera

die () {
    for arg
    do echo “$arg”
    done >&2
    exit 1
}

On the next line immediately following the last character, insert the following lines:

#For ibus compatibility
export QT_IM_MODULE=XIM

That should do the trick.

6. Suspend to RAM does not work.
Update: Remove/unmount any external storage devices first

7. Suspend to Disk does not work. The forums report that I should have a swap space in my hard disk equivalent to my system’s RAM (I’m running 64 bit and my RAM is 4GB – their telling me to sacrifice 4GB of disk space for my swap). I don’t find it good – my previous setup in Jaunty had a swap space of 2GB and it works pretty darn well.

Overall though, it is a solid release. I will update this section when I encounter something unusual.


Mar 3 2009

Getting back on Marketing

Lately I have been engaged in defining my wife’s marketing management for their line of high power LED lights. Yesterday, she asked me if I want to come aboard in their group to do the marketing for their overseas operations.

I am thinking of getting this opportunity to add it in my list of experiences. This could be my ticket for a career shift.

:-)


Jan 4 2009

New year, new theme, new ambitions, new purpose…

2009 has arrived. Time flies so fast! For most of us, the new year is associated with change. Keeping in touch with tradition and trend, I have decided to change the theme of my blog, as well as change the direction of my posts. In particular, I want to be as thought-provocative with hints of positive outlook as much as possible.

New ambitions – yes, better health, better pay, and better wheels! :-)

By the way, thanks to Michael Tyson for producing a very nice Wordpress theme for the whole world to use.


Dec 12 2008

How to record Skype calls in Ubuntu 8.10 without removing Pulseaudio or doing any fancy workarounds through Terminal

Ever since Ubuntu’s switch to Pulseaudio, many people lost the ability to record Skype calls. I am very much affected – and it is really annoying to dig into your system’s settings and overhaul the sound drivers (especially for Linux newbies). Some advocate the removal of Pulseaudio and having it replaced with Esound, but that’s a solution that is not very pleasant – you are bound to break your system as the removal of Pulseaudio will also remove the ubuntu-desktop metapackage, which is responsible for making “smart” updates.

I found a very good solution just recently – Skype Call Recorder

After installing the software, go to Applications > Skype Call Recorder. The software will automatically configure itself with the settings that you already have (assuming that you have your Skype call settings right – the sound in, sound out, and ringing settings). The Skype Call Recorder will prompt you to record all conversations that you will accept or initiate, and save it as a MP3 file in the ~/Skype Calls directory.

This has made my day! Rock on, GNU/Linux!


Nov 30 2008

Reviving the Hasee Q310N Notebook

Got my hands on a brand new battery for my Yingqi’s old notebook – a Hasee Q310N. After my wife’s “forceful” negotiations, this is now my main battle gear.

This notebook runs on Genuine Intel T2300 Dual Core CPU (1.66 Ghz), Intel GMA 950, 80 GB of hard disk space, and 1 GB of RAM. I upgraded the few bits that could be touched – the hard disk (basically, I swapped the original hard disk of the SL300 since my Yingqi is not known to consume that much virtual real estate… hehehe…), and the RAM (this unit is capable of up to 4 GB, but I opted to only have 2 GB. If only this baby had its own graphics card…).And of course – my favorite part: install Ubuntu Linux 8.10 as the OS.

Everything is well except the clumsy keyboard – sure, you can type on it, but man… it sucks! After a few weeks using the SL300, I feel sorry for letting it go. The keys jump around so much – you can see it bounce together with the frame of the computer. The best solution would be to put some reinforcement from behind the keyboard set – I’ve seen the technician lift it off during the RAM upgrade and I think I can experiment a little bit on it.

Performace wise – it is perfect for a road warrior like me. Using Ubuntu 8.10, everything works perfect out of the box. The footprint is smaller compared to the SL300 (well, you have a monstrous graphics card underneath that machine so you’d expect that it should have more space and vents!).

The one thing that amazes me is the battery life – I did not expect this unit to be running more than 3 hours off a single charge. Perhaps it is because of the generic ACPI that the unit uses which in turn the Linux Kernel effectively exploits. Now I can enjoy doing something on a long trip – like work on my blog, play some games, watch movies, etc.

Will be posting some more observations as time goes by. I might consider having the old battery module repaired and exchanged with good lithium cells to make my mobile fun go to six hours!


Nov 30 2008

Car reaches 45,500 kilometres

My Haima Family car (it is literally named that way) a.k.a. Mazda 323 reached 45,500 kilometres a few days ago. Went to the Haima Chaoyang Service Center yesterday to have it checked and serviced.

A few quirks after reaching this milestone:

1. Fuel tank cover hard to open, as a result: broken fuel tank cover latch. I broke it while refuelling in 4th Northern Ring Road.
2. Bad sound produced at the rear right speaker – dirt comes in to the speakers, producing the unwanted crackle whenever you turn on the volume.
3. Loose belt drive for the air-conditioning freon pump in the engine – that’s to be expected… for economy cars at most…

Even after reaching 45,500 kilometres, this car still acts like brand new. The value I get for the price I paid is unbelievable.


Nov 24 2008

Uploading Pictures to the L2 Gallery

I’m uploading ALL of the pictures I have taken so far ever since I got my D70 to my gallery. Oh boy, what a pain… I think it will take me a million years before I finish uploading all of them.

It’s all a matter of internet connectivity speed…

Nonetheless, it will be completed, as long as I keep my vigilant about it!


?>