Monday 2 December 2013

All aboard.

I've got my server set up.
I'm using a Raspian distro and running BTSync (http://www.bittorrent.com/sync) to create my own cloud storage (like Dropbox but hosted on my server and free(ish)).
I now know where my files are stored, even if they aren't very interesting to anyone else.
The spec, if anyones interested:
Raspberry Pi Model B running Raspian on a 32GB SD card
500GB WD hard drive (swap partition on this)
120GB no-name hard drive which I can remove and store off site.
D-link powered USB hub to power the Pi and the drives.
1 square foot bit of MDF with holes in it.
Some cable ties


Friday 25 October 2013

What now ?

The new project is a home server. I want to have a play with phpBB so need to set up something that will run it. I'm also looking to use it as a NAS to backup all the PCs in the house to a centralised disk.
I'm thinking that the Raspberry Pi will not take much power running 24/7 (it uses about 3w, about the same as a mobile phone charger - which I might well use to power it). It'll replace the Freecom FSG-3 which is a Linux-based NAS with a 160GB drive in it (I really need a bit more than that to back up several PCs).


 FSG-3 - coming to an Ebay near you soon in all likelihood.

Friday 26 July 2013

A new project - XBMC and GPIO

One of the great things about the Raspberry Pi is that the OS is on an SD card, so if you want to play around with another distro you can simply get another card, burn an image and away you go.
So last night I removed the existing distro and installed XBMC so that I could try and play a specific video file (a blu-ray DVD rip).
Th install was quick and faultless (ever heard a M$ user say that ?) and in half an hour the video was playing.
I'm now thinking that the Pi shutdown needs a bit of tweaking so I'm going to start looking into making a hardware power controller. What I want is a single button that starts and stops the Pi; first thoughts are a relay that, once activated, holds itself on and a shutdown script that uses a GPIO pin to release the relay (might need two relays, not drawn the circuit yet).
Got a busy weekend but will press on in any spare moments.

Friday 26 October 2012

Use for a pi

So I bought a Raspberry Pi, but didn't know what to do with it. After casting around for ideas, and discussing it I came to the conclusion that what I really needed was the ability to add extra storage to an iphone, ipad or nexus 7 (when I say needed....).
Of course I could have gone out and bought a Seagate Satellite but there were two reasons why I didn't :
1. They cost £150
2. Where's the fun in that ?

First thing I needed was to make the Pi wifi enabled, a PiFi if you will, so after a bit of research I was off to ebay to bag a usb dongle :

I got this one because I have read that it's easy to get working and it was. It also has the advantage of having a removable antenna (I've got a remote antenna with a magnetic base which might come in handy). 
Firstly I installed Debian Wheezy and got the dongle working by following instructions on this site.
A bit of tweaking of /etc/network/interfaces to get it working as I wanted :
auto lo
iface lo inet loopback
iface wlan0 inet static
address 192.168.5.1
netmask 255.255.255.0
network 192.168.5.0
broadcast 192.168.5.255
gateway 192.168.5.1
iface eth0 inet dhcp

All ok so far. Next step is to  get it to act as a wireless access point. I had a look here and it pointed me in the right direction; I needed to install hostapd so
sudo apt-get install hostapd
then  created a file called /etc/default/hostapd which contains :
DAEMON_CONF="/etc/hostapd/hostapd.conf"
next I created/edited /etc/hostapd/hostapd.conf :
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

ssid=RaspAP
hw_mode=g
channel=8

wpa=2
wpa_passphrase=wlanpassword

wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
beacon_int=100
auth_algs=3
wmm_enabled=1
Next I installed a dhcp server to hand out ip addresses
sudo apt-get install dhcp3-server
Edit /etc/dhcp/dhcpd.conf :
 DHCPDARGS="wlan0";
default-lease-time 6000;
max-lease-time 72000;
log-facility local7;
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.11 192.168.5.35;
option broadcast-address 192.168.5.255;
option subnet-mask 255.255.255.0;
}
Rebooted and BOOM ! it gives out IP addresses and I can ssh into it via wifi.

I then installed and configured samba and can now read files over wifi.