Tuesday, February 24, 2009

Misguided by intermittency

I was completely flabbergasted by a what I thought should be rather simple to do. which is bluetooth on Linux. Well I bought a USB bluetooth dongle, and tried connecting my recently purchased Samsung Duo mobile using Ubuntu/8.10. Strangely I could not discover the mobile. Even strange was that I could detect other laptops, and bluetooth headsets. But not my mobile. My mobile however could discover my system's bluetooth. But I could not get pairing working. Eventually managed to install Blueman, was able to discover my mobile. I managed to connect. But just once. Never again. I tried using it in Windows XP, and guess what I was able to connect but just once.

After wasting hours, I gave up. Then when I was installing Intrepid on someone's laptop which had bluetooth, I was able to discover my mobile without any problem whatsoever. Repeated attempts confirmed that bluetooth was working fine with my mobile. I later got a bluetooth stereo headset with a2dp profile. I could use it with my mobile without any problems. I could also get it to work on Windows XP. But again just once. Then I began to get suspicious about the bluetooth dongle. Well off I went to buy another, less expensive one. And without any problem I could connect to my mobile, also to my headset on Linux. The same case with Windows XP.

For a person who never had problems getting hardware to work, using a bluetooth seemed to be a tough nut to crack; thanks to the intermittent dongle. Fortunately for me my ego is still intact. All along I was suspecting incompatibilities with the mobile's bluetooth profiles. Anyway here is what I feel is the moral of the story : "If it is too difficult to setup, it's most likely broken."

Tuesday, February 17, 2009

Encoding Videos for Samsung Duo SCH-W339

The video files converted using the script for C5320 does not work with Samsung Duo SCH-W339. Well ... actually I lied. It does work, except that the extension has to be changed from .3gp to .mp4. I learnt it the hard way. I do not know why it is so. Anyway the C5320 has no problem with the extension being .3gp or .mp4. So here is the (not so updated) script for converting videos to mp4 for use in Samsung Duo SCH-W339. It just adds an additional line to change the extension:

#!/bin/bash

FILENAME=`echo $1|cut -d "." -f 1`
SIZE=qcif

CHANNELS=1
SAMPFREQ=22050
ABITRATE=48

FPS=25

ffmpeg -i $1 -s $SIZE -vcodec h263 -acodec aac -ac $CHANNELS -ar $SAMPFREQ -r $FPS -ab $ABITRATE -y $FILENAME.3gp
mv $FILENAME.3gp $FILENAME.mp4
exit 0

BSNL EvDO on Ubuntu/8.10

It seems the airprime driver has been removed from Ubuntu/8.10 (for good). usbserial with the option module seems to be doing a good enough job.

Converting videos for use in C5320

Huawei C5320 does not come with any video converting software. So for those who own it and most other mobiles you can convert the video using ffmpeg. Windows and Linux versions are available. For those who use Linux, I have provided a script for converting your videos. I have only checked conversion from avi (divx/xvid) to 3gp (resolution is qcif i.e. 176x144). For wmv files (atleast the ones I have), there are some audio/video sync issues. The script takes the video file as its argument. The following is the script:


#!/bin/bash

FILENAME=`echo $1|cut -d "." -f 1`
SIZE=qcif

CHANNELS=1
SAMPFREQ=22050
ABITRATE=48

FPS=25

ffmpeg -i $1 -s $SIZE -vcodec h263 -acodec aac -ac $CHANNELS -ar $SAMPFREQ -r $FPS -ab $ABITRATE -y $FILENAME.3gp

exit 0