Installing Ubuntu on USB Pendrive

Do you want to use your OS everywhere you go? Then the best way is to install it in your pendrive. Here’s a very simple 3 step procedure to install Ubuntu on your USB pendrive (in Windows):

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

Though the name of the page says “create a usb stick on windows”, you can install any version of Ubuntu you want (provided you have its ISO file). Go ahead. Enjoy Ubuntu on the go!

Tata Photon+ in Ubuntu 10.04

As of today, Tata Photon+ EC152 doesn’t work on Windows 7. And they don’t have any patch or upgrade too. It works perfectly on Windows XP.
I tried and got it working on Linux – Ubuntu ‘Lucid Lynx’ 10.04
Here are the few simple steps:
1. Install the following libraries:
i. usb-modeswitch-data
ii. usb-modeswitch
(To download these libraries u’d need a net connection :D)

2. Open /etc/usb_modeswitch.d/12d1:1446 as root and change this line:

TargetProductList = “1001,1406,140c,14ac” to
TargetProductList = “1001,1406,140c,14ac,140b”

2.Right click on Network connections icon on Top right corner and select “Edit connections”(or goto System> Preferences> Network Connections)
3. Goto “Mobile Broadband” tab,
In the IPv4 settings, select Method: “Automatic (PPP)”

4. In ‘Mobile Broadband’ tab, set the following:
Number: #777
Username: your Tata Photon+ number@photon.ttml.in
e.g. 9221475882@photon.ttml.in
password: internet

No change in PPP settings.
Apply.

5. There’ll be notification that “Tata Indicom (Photyon+)” connection established and your photon should start working.
Conn established

Happy Surfing!

Microcontroller programming in Linux

Are you using Windows Vista or 7 and want to work on your microcontroller??
Then you would have definitely faced 2 problems in:
1. Using your USB programmer to burn the code into the uC. The digitally signed driver issue.
2. Using a USB to Serial converter to test serial communication.

I was fed up of trying different things and so i thought of giving a try to Linux.
I am working on AVRs on Ubuntu 10.10 now.

For dumping the code: On Linux, I just had to install the following packages:
libusb0 – library to using USB for programming
avrdude – the programmer.
thats it.
Run the normal avrdude commands & done! (run as Superuser or root ($sudo avrdude … )).

For serial communication: I installed “Cutecom“, a GUI based serial terminal (like hyperterminal of windows XP). Run it from the console ($ cutecom). It shows 4 serial devices namely “/dev/ttyS0” to “/dev/ttyS3”. For using USB to Serial cable, manually type in the device name as “/dev/ttyUSB0”. Thats it! you can now test all your serial communication.

For writing and compiling the code there is “avr-gcc“. Or if you are familiar with CodevisionAVR on windows, you can install the same using “wine”… but remember to configure “wine” for windows XP before installing.

Note: I tried to program using Linux on VMware on windows 7… but it was not working.

Indian Radio Online URLs

Indian Radio Online Streaming URLs:

radio nimbooda: http://www.radionimbooda.com/nim128.wax
Radio plus: http://www.radioplus.mu/live/RadioPlus.asx OR mms://mediaserver.intnet.mu/radioplus
Radio Mirchi: http://www.radiofiji.com.fj/asx/radiomirchi.asx
Desi Radio: http://radio3.desi-radio.com/
Radio NRI: http://205.188.215.230:8024/
Radio Teentaal: http://www.radioteentaal.com/masala128.asx OR http://www.radioteentaal.com/masala128.m3u
Apna Radio: http://www.apnaradio.com/live/media64/ApnaRadio.asx
Mast Radio: http://www.mastradio.com/modules/mod_shoutcastextended/mastradio.asx
Bombay Beats: mms://bb.1.fm/bbfm128k?MSWMExt=.asf
Spice Radio: http://www.addate.com/spiceradio/spicerdasx.asx
Radio Tarana: mms://ac1.streaming.net.nz/tarana1

To play in Ubuntu, Open Totem Movie Player(default player)
File> Open Location and one of the above URLs.
Thats it!

Installing Ubuntu on External Hard Drive

I had this terrible problem where no linux distribution (i tried all- ubuntu, fedora, opensuse) was able to get install on my laptop. It showed some I/O Buffer error.

So, recently i bought a 500GB Seagate Portable Hard drive and was determined to install Ubuntu (10.04 LTS) on it.
After some googling i found the following site very useful:
http://www.pendrivelinux.com/ubuntu-804-usb-hard-drive-install/#more-372

Actually, the process is exactly same as a normal Ubuntu install, except for the last step.
Here you have to select the proper location for installing the boot loader(GRUB) which should be your external Hard drive.
And it works like a breeze…

The I/O Buffer problem came whenever i tried to auto mount the internal hard drive partitions. From Gparted i found the drive names and i manually mounted them using:

$sudo mount -t ntfs /dev/sda1 /media/drive_name

It works!

Windows gave error, then linux…

Today my seminar got over. Phew!!! But over the past few days i am being troubled by OS. Not my academic subject, but Windows & Linux.
In windows7 my user profile got corrupted. Had a tough time resolving that.
And now in Ubuntu 9.10, there is some “buffer I/O error” is coming. probably a bad sector in linux drive. But i am not able to reinstall ubuntu too.
Dekhta hu kya ho sakta hai…till then enjoy!

Setting up FTP Server in ubuntu

Want to access your files from anywhere in your network(LAN)? You can setup your PC/Laptop as an FTP server & then access your files from anywhere within the network.

Vsftpd is the most easy ftp server to setup.
Installing vsftpd:
From Synaptic:
Goto Synaptic Package Manager. Search for “vsftpd”. Mark for installation & apply. or
From terminal typeout:
$ sudo apt-get install vsftpd

There are various settings that needs to be done before starting. These are specified in the configuration file for vsftpd located in “/etc/vsftpd.conf”. The default configuration is a little bit paranoid, not so usable for file sharing.
We can edit this, but lets keep a copy of the original somewhere.
$ sudo cp /etc/vsftpd.conf /etc/vsftpd_conf_original.txt

Now,we start editing the options:
1. Open the configuration file using:
$ sudo gedit /etc/vsftpd.conf

2. I have used the following configuration for my FTP server. It allows anonymous access and anonymous users are jailed(thats the term used) to the chroot(eg. /home/ftp will be the default) directory. Enable/ Uncomment these lines in vsftpd.conf:
(Replace “abhishek” with your username on linux)
listen=YES
anonymous_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
xferlog_enable=YES
chown_uploads=YES
chown_username=abhishek
ftpd_banner=Welcome to Abhishek's FTP service.
chroot_local_user=NO
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd

Keep other options as default.
Save. Restart the FTP server (as below).

3. To run this server:
sudo /etc/init.d/vsftpd start
To stop it:
sudo /etc/init.d/vsftpd stop
To restart it:
sudo /etc/init.d/vsftpd restart

4. You can make changes to the configuration file anytime. But remember to restart the ftp server, using the above command, to apply the changes.
After this your ftp server should start functioning.

5. To Allow FTP access to files outside the home directory chroot, see the Reference#2 below.

To access the files, there are many ways.
1. Open a browser like Internet explorer, firefox, opera etc. Type the url as
“ftp://servername” for anonymous access. e.g. ftp://10.117.113.24 or
“ftp://username@servername” for login. e.g. ftp://abhishek@10.117.113.24
Then the files will get listed.
In this method, you can only download files from the FTP server.

2. Using gFTP- Install gFTP from Synaptic Package Manager. Run it from Applications>Internet>gFTP. Enter the username and password to login(For anonymous access, give username as “anonymous” and any relevant password). Then start sharing files.

3. Using Command Prompt-
In windows, open command prompt or
In Linux, open terminal
and type:
ftp servername or
ftp ftp://username@servername

To download a file use:
ftp>get remote-file [local-file]
To upload:
ftp>put local-file [remote-file]
To close connection:
ftp>close
For other commands use Ref#3 below.

Some Reference posts that will be helpful:
1. Howto: Easy FTP with vsftpd
2. Allowing FTP access to files outside the home directory chroot
3. List of FTP commands for the “Microsoft command-line FTP client” or “Linux terminal – FTP client”