Raspberry Pi Adventures

Join me on my fun ride

Leave a comment

Change default password on Raspberry Pi

Run the following commands on your prompt to change current password


Changing password for pi.
(current) UNIX password: currentpassword
Enter new UNIX password: newpassword
Retype new UNIX password: newpassword
passwd: password updated successfully

It asks for your current password and later we type our new password

Reboot and check 🙂


Leave a comment

Root Prompt on Raspberry Pi

To get root prompt on RPi so that you dont have to type sudo all the time just run this small command and you will have a # prompt

sudo bash

Thats it done 🙂

Leave a comment

How to Shutdown Raspberry Pi

Shutting down the raspberry pi is very simple

Just key in the following

sudo shutdown -h now
sudo halt

Thats it done 🙂


power supply – How do I turn off my Raspberry Pi? – Raspberry Pi Beta – Stack Exchange


Mounting and UnMounting USB Drives on Raspberry Pi

Using OS : 2012-08-16-wheezy-raspbian

I wanted to hookup my NTFS formatted usbdrive to RPi this is how it worked for me.



1. Hooked up the usbdrive and booted my Pi

2. Now fired the command

This helps you find the name given by the system to usbdrive

It returns a lot of things but we have to find some thing similar which lists your usb drive
[ 215.537561] usb 1-1.2: new high speed USB device number 9 using dwc_otg
[ 215.639100] usb 1-1.2: New USB device found, idVendor=8564, idProduct=1000
[ 215.639135] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 215.639157] usb 1-1.2: Product: Mass Storage Device
[ 215.639185] usb 1-1.2: Manufacturer: JetFlash
[ 215.639203] usb 1-1.2: SerialNumber: 2979116540
[ 215.655004] scsi0 : usb-storage 1-1.2:1.0
[ 216.658513] scsi 0:0:0:0: Direct-Access JetFlash Transcend 16GB 1.00 PQ: 0 ANSI: 5
[ 216.660406] sd 0:0:0:0: [sda] 30871552 512-byte logical blocks: (15.8 GB/14.7 GiB)
[ 216.661158] sd 0:0:0:0: [sda] Write Protect is off
[ 216.661216] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[ 216.661904] sd 0:0:0:0: [sda] No Caching mode page present
[ 216.661950] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 216.666012] sd 0:0:0:0: [sda] No Caching mode page present
[ 216.666045] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 216.670729] sda: unknown partition table
[ 216.676001] sd 0:0:0:0: [sda] No Caching mode page present
[ 216.676034] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 216.676069] sd 0:0:0:0: [sda] Attached SCSI removable disk

3. Now to Mount the USB Drive follow these steps

3.1 Create a directory in mnt
$sudo mkdir /mnt/usb

3.2 Now to mount the directory
$sudo mount /dev/sda /mnt/usb

3.3 To confirm run the following command
$df- f

This returns
Filesystem Size Used Avail Use% Mounted on
rootfs 7.3G 2.0G 5.0G 29% /
/dev/root 7.3G 2.0G 5.0G 29% /
tmpfs 19M 248K 19M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 37M 0 37M 0% /tmp
tmpfs 10M 0 10M 0% /dev
tmpfs 37M 0 37M 0% /run/shm
/dev/mmcblk0p1 56M 36M 21M 64% /boot
/dev/sda 15G 8.1G 6.8G 55% /mnt/usb

Check the last line here.

3.4 Now you can access the content of your drive by traversing the following path
$ cd /mnt/usb

That should do it 🙂

Now some time drives are mounted as read-only
This problem for me was solved by installing the ntfs-3g package
$sudo apt-get install ntfs-3g

Read more : NTFS – Debian Wiki

Sometimes we need to specify the file system
$sudo mount /dev/sda /mnt/usb -t filesystem

where filesystem is replaced by the following
auto – this is a special one. It will try to guess the fs type when you use this.
ext4 – this is probably the most common Linux fs type of the last few years
ext3 – this is the most common Linux fs type from a couple years back
ntfs – this is the most common Windows fs type or larger external hard drives
vfat – this is the most common fs type used for smaller external hard drives

Read More: mount: you must specify the filesystem type – Ask Ubuntu

4. Now to Unmount the drive
$sudo umount /dev/sda

Run the $df -h  command to check if its removed.

Done 🙂

USB flash storage mounted as read-only filesystem (Page 1) / Newbie Corner / Arch Linux Forums


Install Bluetooth Dongle on Raspberry Pi

Using OS : 2012-08-16-wheezy-raspbian

I already had a Bluetooth dongle lying idle at home so just hooked it in and started my RPi

1. On boot i typed the following command to see if my connected dongle was visible.

This returned the following line to make sure that the dongle was detected
Bus 001 Device 004: ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter

2. Then typed in

This returned
bluetooth 166552 23 btusb,rfcomm,bnep

3. Now to install bluetooth package
$sudo apt-get install bluetooth

Note: Installation takes a while relax and enjoy for the time

4. Now after the installation is completed, run the following to get the status.
$/etc/init.d/bluetooth status

This is returned if all is good
[ ok ] bluetooth is running.

5. Now you can find your blueetooth address using the following command
$hcitool dev

This returns something like this
hci0 00:11:67:10:80:F0

6. Now we can scan for nearby devices using the following command
$hcitool scan

This returns
Scanning ...
54:9B:12:99:36:61 YourBluetoothDevice

7. Now we can run a small test to connect to the following device
$sudo l2ping -c 1 54:9B:12:99:36:61

This returns
Ping: 54:9B:12:99:36:61 from 00:11:67:10:80:F0 (data size 44) ...
0 bytes from 54:9B:12:99:36:61 id 0 time 19.28ms
1 sent, 1 received, 0% loss

Success 🙂

Brian’s Life: Wii Controller + Raspberry Pi + Python = Awesome!!
Dream Green House • Projects • Raspberry Pi & Bluetooth



Enabling SSH on Raspberry Pi and using Putty and WinSCP

Using OS : 2012-08-16-wheezy-raspbian

The latest wheezy image has SSH installed by default you just need to start the ssh service.

To start the SSH server on a Pi type it on the console or terminal window.

$sudo /etc/init.d/ssh start

To get your ip address so that you can use that in Putty or WinSCP to connect to the pi type the following
$ip addr

Now you need to look at eth0 if your RPi is connected via ethernet and note your IP Address.

Now that you have your IP Address we can connect using Putty and WinSCP



1. Enter above noted IP Address
2. Port is 22
3. Click open

If SSH is started successfully you should be able to see this screen.

WinSCP Connection

1. Enter IP Address in the Host Name Field
2. Enter Username
3. Enter Password
4. Click Login
5. If everything is ok below screen will be displayed.
6. Now you can drag and drop files from your desktop to your Pi.

Tip: To start ssh automatically at boot run the following command

$sudo update-rc.d ssh defaults
To know more about update-rd.d read the following

Making scripts run at boot time with Debian
How-To: Managing services with update-rc.d | Debian/Ubuntu Tips & Tricks
Manage Linux init or startup scripts
Update-rc.d – LQWiki

Enjoy 🙂

Enable Secure Shell (SSH) On Your Raspberry Pi | Raspberry Pi Spy
Enabling SSH on Debian Raspberry Pi « Steve @ DynamicEdge

Raspberry Pi – Enabling SSH on Debian #6 – YouTube
For those who dont have ssh installed by default can follow this video link 🙂

General Read
OpenSSH Server

Leave a comment

Raspberry Pi and OMXPlayer

Hi All,

I have installed OMXPlayer using

sudo apt-get install omxplayer

right click any video file > open with and i just typed in omxplayer the the box
and file started playin in fullscreen but there is no control i have to watch the video forcibly till the end, the playback is real smooth though.

Audio comes from the Audio Jack not via HDMI there might be some configs but i havent explored it much.

Edit After a little bit of more tinkering

Everything is run from console now.

To use omxplayer, the system must allocate at least 64MB of RAM for the GPU. Run the script and make sure there is a 192/64 Mb of RAM split between the system and GPU. A split of 128/128 can also be used:
$ sudo rpi-update 192
$ sudo reboot

omxplayer --help
Options :
-h / --help print this help
-a / --alang language audio language : e.g. ger
-n / --aidx index audio stream index : e.g. 1
-o / --adev device audio out device : e.g. hdmi/local
-i / --info dump stream format and exit
-s / --stats pts and buffer stats
-p / --passthrough audio passthrough
-d / --deinterlace deinterlacing
-w / --hw hw audio decoding
-3 / --3d switch tv into 3d mode
-y / --hdmiclocksync adjust display refresh rate to match video

To Play File
$omxplayer Filename.mp4

Keys To Control Playback
Arrow Keys : Move ahead and back
Space : Pause
Q : Quit to console

Building Omxplayer for Raspbian on the Raspberry Pi
Building Omxplayer for Debian on the Raspberry Pi
Raspberry Pi • View topic – Omxplayer and subtitles