Sunday, September 07, 2008

Linux Friendly Webcam Prolink PCC 5020



As a long time linux user, I know from personal experience that, it is difficult to find a webcam that works with linux. Nevermind about the french guy who created many linux drivers for many cheap webcams, but finding one that matches his drivers is like finding a needle in a haystack, no less.

http://mxhaard.free.fr/spca5xx.html


The fact that I chance upon this Prolink PCC 5020 webcam during the PC show 2008 & surprised to find it working relatively easily in linux. Here you go..

Although I got it for S$25 from the PC show, cheapest I found in Singapore's Sim Lim Square is S$42 from Laser. I got another piece of this cam from a PC shop in Ipoh, Malaysia for RM$60, which is around S$25. KL LauYatt should have this for around the same price, if not cheaper.

From Skype in linux, I see this as "Vega USB 2.0" webcam. It is enabled by the linux kernel with ubuntu 8.04 or Fedora 9. Even the onboard mic will be enabled as Vega USB 2.0 mic & can be used in Skype.

So, if you need a linux friendly webcam, this is it. I feels the resolution is slightly worse than when it's under windows... not sure if there is anything I can tweak though... to make it better. Overall, it's a sure fire in linux with acceptable image quality.

Just doing my part for community service.

Sunday, August 24, 2008

Cracking Singnet issued Thomson ST536V6 modem to work in M'sia


Gotten a second hand Singtel issued Thomson ST536V6 modem from the local forum for S$20. Purpose is act as backup for my mum's ADSL connection in M'sia. M'sian generally stays in terrace houses which has poorer lightning protection on the phone line. So, burning of telephone wires or modem by lightning stike happen to my mum's home once every couple of years. Telephone line surge-protector helps. Getting a cheap second hand modem sounds like a good idea also.

However, I was immediately met with problem that the modem came with a customed firmware from Singapore Singnet & the settings cannot be changed the 'usual way'.

Here is how I flashed it with the "international 7.4.3.2" version of firmware such that one can change the VPI & VCI settings to 0 & 35 for use in Malaysia.

My sources of information are from the threads/sites below:

http://simontay.blogspot.com/2007/11/thomson-speedtouch-585v6-modem-woes.html

http://mirror.opensourcehub.com/pub/speedtouch/utilities/UpgradeWiz/v4.4.2.1/

http://www.speedtouchforum.de/viewtopic.php?t=1089#8355

http://forums.hardwarezone.com.sg/showthread.php?t=1619875

http://forums.hardwarezone.com.sg/showthread.php?t=2025432&highlight=st536v6+firmware

http://forums.hardwarezone.com.sg/showthread.php?t=1511654&highlight=st536v6+firmware


After the successful firmware upgrade,

The default gateway address changed from 192.168.1.254 to 10.0.0.138.

I can set the VPI/VCI to Malaysia's 0.35. Or on some other modem, it's 0 & 35 respectively. Of course, I can't test it here right now when I'm in Singapore, but I assumed things will be easy from now, when I can change all the settings on the modem.

Singnet's firmware served to
1. Make things simpler for people using Singnet
with 1~2 computers.
2. Make things difficult for people to use it as 'bridge mode'. The need to burn a 'residential
cd is ridiculous & make things unnecessarily complicated.
3, Make things complicated for people trying to configure it for use in other countries.
The need to burn a 'residential cd' to change VPI/VCI is again ridiculous.
4, Setting the administrator password with the 'residential cd' is also too complicated.
The default 'user' without password does not confirm with what the modem's manual says & took me so long to figure out.

Let's hope the international firmware will make all things simple for this modem.

Last but no least, the administrator's account name & password is case sensitive.
The user name is actually 'Administrator' & NOT 'administrator'. Again, took me a while
to figure that out.

Side note:

1. The sole purpose of the 'residential cd' is to change the modem settings with the ISP specific firmware, where many settings are intentionally omitted to avoid tempering. The cd works only in windows where some of the autostart.inf files are automatically loaded. Linux did not detect those files at all & so the cd does not work in linux.

2. Since the 'residential cd' is 'windows only', I ran the firmware upgrade software in windows also. I did not test whether it will work in linux via vmware or wine. Do so at your own risk.

Saturday, July 12, 2008

First purchase from US online store



First of all, all those advertisements from ISP saying a broadband internet connection will let you purchase from any online stores all over the world, forget about all those. It's just not true.

To purchase from an online US store, one needs

1, a US shipping address, because most us stores simply won't ship overseas &
2, a US issued credit card, because most us stores does not accept overseas credit card.

After searching high & low for the low power AMD 4050e around the region without success. The only last resort I have is to shop online from US.

Solution is to subscribe to VPost from Singapore Post Office, where it will issue you a shipping address in US. Next is to search for a US online vendor which will accept overseas credit card. In this case, PC Universe @ Amazon is the selected vendor. So, the purchase is via PC Unverse @ Amazon & paid with a Singapore issued credit but shipment is to a a US addressed issued to me, by VPost USA.

Order processed by Amazon on Jun 6, 08 & the merchandise arrived in Singapore on Jun 20, exactly 2 weeks later, after much hassles.

And the two 45 watts ultra low power AMD X2 4050e cpu are set to replaced two of their older siblings, the 65 watts low power AMD X2 3600+ cpu.

In case, the merchandise is only available from a US store that only accepts US issued credit card, the purchase can only be made via VPost Concierge service. User need to provide the exact url address of the US store pointing to the merchandise. The concierge service staff in US will place the order for you & arrange for shipment to delivery to their US addresses. The concierge service will accept the goods in US on client behalf & subsequently ship it to the client Singapore address. The price to pay for the concierge service is S$20 plus 5% of the price of the mechandise .

Sunday, June 08, 2008

Cracking ubuntu 8.04 to work with nVidia 8200 chipset motherboard


Upgraded my 2 years old nVidia 6150 motherboard to the new nVidia 8200 motherboard recently.

Using the latest ubuntu 8.04 installation, Hardy Heron's 2.6.24 kernel simply don't work with the new chipset. The basic SATA2 controller, onboard LAN & the onboard 8200 3D chip are all not supported under the 2.6.24 kernel. Although ubuntu 8.04 can be installed with a all_generic_ide option, performance should be degraded substantially & also, no amount of tweaking with the settings can get the onboard LAN & onboard 8200 3D chips to works

The nice surprise is that, Fedora 9's 2.6.25.5 kernel works flawlessly with the new 8200 chispet. SATA2 controller & onboard LAN. The onboard 8200 3D chip requires the latest nVidia 173.14.5 to work though.

It was understood that nvidia 173.14.5 driver will support the 8200 3D chip but will not work with the 2.6.24 kernel in ubuntu 8.04.

So, here is my attempt to install customer kernel in uBuntu to work with my latest motherboard acquisition.

Following the guide from

http://www.howtoforge.com/kernel_compilation_ubuntu

I've compiled & installed the 2.6.25 kernel in ubuntu.

And with the new kernel , one can finally remove the 'all_generic_ide' option from the kernel option to take advantage of the new SATA2 controller. Edit the grub boot options as follow:

sudo vi /boot/grub/menu.lst

And to install the latest nVidia 173.14.5 driver, one need to boot to native console to install.

In Fedora, one will edit /etc/inittab to change run level from 5 to 3 to boot to native console.

In ubuntu however, one needs to issue

sudo /etc/init.d/gdm stop

then do

sudo sh NVIDIA-Linux-x86-173.14.05-pkg1.run

to install the latest nVidia driver.

Upon reboot. Viola, finally have the nVidia driver working with the 2.6.25 kernel.

Update Jun 10, 2008,

It seemed my custom-compiled kernel has missed out some sound modules & ends up the onboard sound is disabled in ubuntu.

According to the Master Kernel Thread at [url]http://ubuntuforums.org/showthread.php?t=311158[/url]

Troubleshooting:

--------------------------------------------------------------
Q. My High Definition sound (Azalia) does not work with the new kernel!:

A. This took me a long time to figure out because I didn't have sound either. You have to enable the Intel HD (Azalia) module in Advanced Linux Sound Architecture, even if it isn't Intel.

--------------------------------------------------------------

So, after recompiling the kernel enabling Device Driver, Sound, PCI Device, Intel HD Audio option, the sound is ok & the OS is perfect now for my nVidia 8200 chipset motherboard.

Sunday, November 18, 2007

Fixing Fedora 8 wireless network problems

Fixing Fedora 8 wireless network problems

Fedora 8's wireless is really disappointing.

So far, bugs findings include

1. wpa_supplicant is buggy & cannot connect.
2. default ath_5k driver conflicts with madwifi driver from livna
3. network manager is also buggy.

I have a DLink G520 using the atheros chipset. Here is how I managed to get it working.
Note: This method will give you a fixed ip 192.168.0.17(or dhcp ip if you like) & the startup
files will connect you to your preferred wireless network without any manual intervention by users
like using network manager, which does not work anyway.

1. Blacklist ath_5k in /etc/modprobe.conf & /etc/modprobe.d/blacklist.
2. Installed kmod-madwifi from livna
3. disabled network manager as it will interfere with the configuration below.
4. updated wpa_supplicant

Tricky steps:

5. Previous version of Fedora before 8, atheros chipset is recognized as ath0. In
Fedora 8, this does not work. Atheros chispet is recognized as wlan0. So, I have
changed all previous reference to ath0 to wlan0.
6. I removed the ath_5k driver from kernel as some suggested. Not sure if this is
absolutely necessary though.
7. At /etc/rc5.d, there is this file SXXwpa_supplicant. My case, XX=12. Change it to a bigger
no. I changed it to 98. Reason being, wpa_supplicant was started before other services &
so it does not work. S98wpa_supplicant makes wpa_supplicant starts after most other services.
8. 4 files to be modified/created

/etc/sysconfig/network-scripts/ifcfg-wlan0
/etc/dhclient-wlan0.conf
/etc/sysconfig/wpa_supplicant
/etc/wpa_supplicant/wpa_supplicant.conf


My configuration files are as follow:

# /etc/sysconfig/network-scripts/ifcfg-wlan0
# Atheros Communications, Inc. AR5212 802.11abg NIC
DEVICE=wlan0
ESSID=fedoragroup
BOOTPROTO=none
ONBOOT=yes
PEERDNS=yes
PERSISTENT_DHCLIENT=Y
DHCLIENTARGS=-nw
NETMASK=255.255.255.0
HWADDR=xx:xx:xx:xx:xx:xx
DHCP_HOSTNAME=
IPADDR=192.168.0.17
DOMAIN=
TYPE=Wireless
USERCTL=yes
IPV6INIT=no
CHANNEL=6
MODE=Master
RATE=Auto
GATEWAY=192.168.0.1
------------------------------------------------------------

# /etc/dhclient-wlan0.conf
interface "wlan0" {
# Don't bother with NTP over a radio link
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers, host-name;
}
-------------------------------------------------------------

# /etc/sysconfig/wpa_supplicant
INTERFACES="-iwlan0"
DRIVERS="-Dmadwifi"
# old config is INTERFACES="-iath0"
# old config is DRIVERS="-Dmadwifi"

-------------------------------------------------------------
# /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
# ctrl_interface_group=wheel
network={
ssid="fedoragroup"
scan_ssid=1
#psk="mypasskey"
psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
}

Monday, July 30, 2007

USB memory can't mount on kernel 2.6.22.1-27.fc7 & above

It is sad that yet another critical bug is found in Fedora 7. The symptom is simply, some USBthumbdrive or USB harddisks are not automatically detected & mounted since kernel 2.6.22.1-27.fc7.

The bug is documented here

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249282

And the solution as suggested on comment#25 works.

In /etc/udev/rules.d/05-udev-early.rules

Commenting out the line below does not work & it also disabled the sound card.

ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe
$env{MODALIAS}", GOTO="skip_wait"

Moving the line

ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" 

to before

ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe
$env{MODALIAS}", GOTO="skip_wait"

solved the problem.

Sunday, June 03, 2007

Fedora 7 in operation


Fedora 7 was released May 31 US time, that means Jun 1 at this part of earth. Downloaded & installed it & here is my checklist on what works & what not.

1. nVidia proprietary driver from freshrpms does not work. nVidia proprietary driver from livna works flawlessly though.

yum install kmod-nvidia

2. java

follow instructions from

http://www.mjmwired.net/resources/mjm-fedora-f7.html

java plugin for firefox 2.0 does not work. Updating firefox to 2.0.0.4 fixed that.

3. gaim renamed to Pidgin & works.

4. skype for fedora core 5 works fine in fedora 7

5. mplayer from freshrpms works.
(my mplayer essential codec from 20061022 does not play real media, copying windows-essential codec from 20060611 to /usr/lib/win32 fixed that.)

6. Realplayer works following installation instructions from

http://www.mjmwired.net/resources/mjm-fedora-f7.html

7. Citrix ICA client works

Download Citrix ICAClient-10.0-2.i386.rpm from

http://www.citrix.com/site/SS/downloads/downloads.asp?dID=2755

8. Azureus(fedora distro) works

9. DVD media with Chinese characters in label/filesnames ejects when eject button on DVD is pressed. (Hell, it does not work in FC6, I had to do a right-click & eject from the desktop to
eject a DVD)

10. SCIM installed by default, to be activated by

System --> Preferences --> Personal --> Input Method

change to 'use custome input method SCIM'

Relogin needed to have the option activated.

11. "Invisible mouse pointer" bug from nVidia driver for 6150 onboard VGA card

This is not a new problem. It was first discovered in Aug 2006 with FC5. nVidia linux driver for 6150 chipset somehow repeat this problem again in FC7. The following was excerpt from my blog in Aug 2006 on solving this very same problem. And it still works today.
-------------------------------------------------------------------------------------------------
From time to time, I will encounter a strange issue at X, where the mouse pointer becomes invisible. The mouse is obviously still working & it's movement can still be seen when it moves over menu or items on the desktop. It's just invisible.

A search on the net found this bug 182517 filed at redhat. The problem traced back to the nVidia driver. The problem is still unsolved even with nVidia graphic driver release 1.0-8762.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182517

The problem can be patched by adding

Option "HWCursor" "off"

to the VGA driver section at /etc/X11/xorg.conf

Hopefully, it will be resolved in the next nVidia driver release.
-------------------------------------------------------------------------------------------------
My xorg.conf looks like this now:

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DisableGLXRootClipping" "True"
Option "HWCursor" "off"

12. Recording from mic for use with Skype in Linux

(Excerpt from my blog dated December 2006)
-------------------------------------------------------------------------------------------------
After many months of full conversion to linux. I was disappointed yet again with a terrible bug in alsa mixer.

Firstly, I noticed that Skype cannot capture any sound from my mic, despite I can hear my own voice from the mic very clearly.

The first & most down to earth solution was run the followings at command promt:

a. alsamixer
(select capture by pressing 'tab')
(move to mic and press 'space bar' to select capture from mic)
b. for Sound blaster live users, you need to make sure 'AC97' tab volume is not zero.
(move to AC97 & push up-arrove to raise volume close to 90%)
c. /usr/sbin/alsactl store

Now, the method above surely works but it posted another problem. The setting of alsamixer is always reset upon every reboot & it just never remember to 'record from mic'.

Found the methods from the sites below but they just don't work somehow.

http://www.linuxquestions.org/questions/showthread.php?t=206782
http://forum.skype.com/index.php?showtopic=66544

After all attempts to set alsamixer settings permanently failed, my friend suggested to create a simple script to set the mixer settings to capture from the mic.

Finally it's done as follow :

a. Create a script file like 'Record_From_Mic' with the content below

amixer sset Mic,0 80%,80% unmute cap

b. At command prompt, do

chmod +x Record_From_Mic

c. From Gnome's menu, goto 'System.Preference.Personal.Sessions'
At 'Startup Program tab', click new & add 'Record_From_Mic' as startup script.

Finally, the settings is overriden at every reboot with the little script above. Thanks to
Thomas.
-------------------------------------------------------------------------------------------------
My Record_From_Mic is as follow:

amixer sset Mic,0 75%,75% unmute cap
amixer sset PCM,0 95%,95%
amixer sset Master,0 80%,80%
amixer sset AC97 Capture, 0 85%,85% unmute cap
amixer sset AC97, 0 85%,85% unmute cap


13. k3b, works. Previously device buffer status not shown during DVD burning. Now everything is displayed.

14. Firewall settings
Under System-->Administration-->Firewall and SELinux
Adding port 5900 for VNC server no longer works. Root of problem unknown.
Work around:
a. vi /etc/sysconfig/iptables
b. add the following line for port 5900

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5900 -j ACCEPT

c. System-->Administration-->Server settings-->Service--> Restart iptables