Posts

Showing posts from June, 2014

Raspberrypi : Step-by-Step Configuration as a Samba Server

If you want to use your RPI as a 24x7 on file sharing server, you need to follow the instructions given below to install SAMBA server in you RPI.

Install the samba server using following command
sudo apt-get install samba samba-common-bin

Add new user group for samba using following commad
sudo groupadd sambausers

Add new user and add this user to samba user group sudo useradd -G sambausers testuser
Set password for this user using following command sudo passwd testuser
Create directory to setup samba share (create directory in usb drive in my example) sudo mkdir /media/usb0/share sudo chown :sambausers /media/usb0/share/
Open samba configuration file and update as shown below

sudo nano /etc/samba/smb.conf
security = user
[share] comment = RPI Share path = /media/usb0/share valid users = @users force group = sambausers read only = No create mask = 0660 directory mask = 0771
Restart samba service using following command

sudo service samba restart
Then you will be able to access the samba share from oth…

Raspberrypi : Fix for minidlna error - inssserv: warning: script 'mathkernel' missing LSB tags

I have previously written an article on how to install "miniDLNA" in RPI here. If you install miniDLNA in your Raspbian OS, sometimes you may ended up with following error/warning massage when you try to load minidlna.
"inssserv: warning: script 'mathkernel' missing LSB tags"

This is due to LSB header tags missing in Mathkernel library. In order to fix this error, please follow the instruction given below.

Open the mathkernel library file by using following command
sudo nano /etc/init.d/mathkernel

Then add following header tags just below the "#!/bin/sh"

### BEGIN INIT INFO
# Provides:          mathkernel
# Required-Start:    $local_fs 
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mathkernel library
### END INIT INFO

Then restart the minidlana using following command
sudo service minidlana restart


Raspberrypi : Step-by-Step Initial Setup with Raspbian

Image
Working with Raspberry PI (RPI) is fun. Typically in home environment, you will connect your RPI to your router and then need to control the RPI from your PC using SSH. This article describe how you can easily setup your RPI very easily in few steps.

Requirement:
Raspberry Pi (RPI) unit (I have Model B with 512 RAM)
Monitor and Keyboard connected to RPI
SD card to load the OS

Configuration Steps

1. Download the Raspbian Image (or any other distribution) from following link
    Raspbian Image here
    All the distributions here

2. Use SDFormatter tool to format your SD card with options as shown below.

3. Once you format the SD card, then write out the Raspbian image that you downloaded as shown below
    Following tools can be used
    a. dd (if you are using linux or unix in your PC)
    b. Win32diskImager in windows (please select correct device [F: SD card reader] and lick write)


4. Plug-in your SD card and boot the RPI and it will show you first configuration screen as below

5. You …

Raspberrypi : Step-by-Step Static IP Configuration

Working with Raspberry PI (RPI) is fun. If you do not want to directly plug your monitor and keyboard always to your RPI, then you need to configure Static IP on the RPI. Typically in home environment, you will connect your RPI to your router and then need to control the RPI from your PC using SSH. In a router with DHCP enabled, you need to have static IP for your RPI so that IP will not be changed even router is restarted. Following instructions will show how to set up your RPI with static IP.

Requirement:
RPI is loaded with Raspbian and complete the initial setup.
Monitor and Keyboard connected to RPI

Configuration Steps (Single Network)

Open network configuration file using following command
sudo nano /etc/network/interfaces

Update network configuration file as below.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.123.101
netmask 255.255.255.0

gateway 192.168.123.254

Save the file by pressing "CTRL+O" and exit editor by "CTRL+X"

Then resta…

Raspberrypi : Step-by-Step Configuration as a Media Server (DLNA/UnPn)

Raspberry Pi has become very popular since it is released to market since 2011. I got a Raspberry Pi as a gift from my boss. I spent quite some time to get DLNA (minidlna) work, so that I thought to list down steps here. I hope this will helpful to save hours of your time rather than trial and error approach.

Requirement:

Raspberry Pi (I have model B)
Monitor and Keyboard connected to RPI or SSH using Ethernet
Raspberry Pi is setup with Raspbian with initial setup (Ex: wifi/network setup )
[Optional] USB Wifi dongle (I use Comfast WU715N [Ralink Chipset 5370])

Configuration Steps :

Install minidlna using following command
sudo apt-get install minidlna

Configure the minidlna by editing configuration file located in "/etc/minidlna.conf". Also make sure media directories should have access to pi account, since we are going to use pi account to run minidlna service. If you are using a Wifi adapter in RPI, make sure you add network interfaces as shown below. Otherwise your dlna servi…

Raspberrypi : Step-by-Step Wifi Configuration (Single or Multiple networks)

Recently I had a chance to work with Raspberrypi Model B. Following instructions will guide you to set up wifi on Raspberrypi.

Requirement:
USB Wifi dongle (I use Comfast WU715N [Ralink Chipset 5370])
Monitor and Keyboard connected to RPI or SSH using Ethernet

Configuration Steps(Single Connection)

Open network configuration file using following command
sudo  nano /etc/network/interfaces

Update network configuration file as below. Keep it mind that default configuration files comes with "wpa-roam" command and you need to replace it with "wpa-conf".
auto lo iface lo inet loopback
auto eth0 iface eth0 inet dhcp
auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf wireless-power off iface default inet dhcp
Save the file by pressing "CTRL+O" and exit editor by "CTRL+X"

Then open wlan configuration file in following path
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Update wlan configuration file as below

ctrl_…