Project with a lot of songs ... and an WiFi Access Point

This volumio Project is nothing special, but i have to deal with some Music Files (30’000) and Backup, and … wy not have a Access Point on the Volumio Box? -> see third post

Setup :
Raspberry Pi B+
Hifiberry DAC+
USB Wifi Module 802.11b/g/n -> adafruit.com/products/1030
Volumio 1.50

Install Hifiberry dac+ -> hifiberry Guide

The “Update Database Process” was allways broken perhaps after 20’000 Files and the databes is only written after the end of scanning. -> So i Decide to Setup the DLNA Server in pieces of 10’000 (for testing)
the process works -> scan first 10000 files -> reboot -> add 10000 Files to dlna Server -> scan second 10000 files -> reboot -> … This works for me

2014-09-19 09_43_46-Check_MK mysite.png

  1. Initalize scan
  2. Scanning DLNA Server (5000) Songs
  3. Normal use after scan
  4. Reboot
  5. Scanning next files …

Raspberry Memory Limit is 512 MB and I have decided to make a swapfile:

free -m 

shows Swap = 0 MB means no swap

sudo nano /etc/dphys-swapfile

Write the parameter CONF_SWAPSIZE=512
Save File

sudo apt-get install dphys-swapfile
free -m 

shows Swap = 512MB swap

OK after the step above i scan the hole Library (35’000 files) at one time with success. an as you can see in the printscreen the memory is going over the 512 Mbyte. So Conclusion -> When you scan big song librarys you need enough memory for the scanning process.
2014-09-20 20_18_55-diagnosti.png

Backup:

Make Windows Folder on Server with “Share” and permissions for the “User”

On Raspberry:

cd /mnt sudo mkdir Backup sudo nano /etc/fstab
add following code to fstab and save file after

//192.168.0.12/Volumio_Backup /mnt/Backup cifs defaults,rw,username="User",password="Password",domain="Domain" 0 0
sudo mount -av

Reboot

Now you can save with

sudo dd if=/dev/mmcblk0 bs=1M | gzip -c > /mnt/Backup/Volumio.img.gz

a gziped image for Backup

Thats it.

Greetings Andi

Nice demonstration !
I wonder if there’s an intentional reason for not having swap file or partition. If there’s enough free space on a standard SD card (raspberry pi officially recommends 4GB minimum SD cards, it can be seen as the standard), then I guess there should be a swap file or partition, no?

wy not have a Access Point on the Volumio Box to share Wifi in the livin room

Buy this one -> adafruit.com/products/1030

Internetconnection is on the RJ-45 Network Interface (Cable) on the raspberry pi

First we have to install wifi Module

[code]sudo apt-get install hostapd usb-modeswitch hostap-utils iw bridge-utils

wget http://www.adafruit.com/downloads/adafruit_hostapd.zip
unzip adafruit_hostapd.zip
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.ORIG
sudo mv hostapd /usr/sbin
sudo chmod 755 /usr/sbin/hostapd[/code]

Then we have to edit hostabd settings

sudo nano /etc/default/hostapd

Add this line

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Edit hostapd.conf

sudo nano /etc/hostapd/hostapd.conf

Add the following lines

interface=wlan0 driver=rtl871xdrv ssid=yourSSID hw_mode=g ieee80211n=1 wmm_enabled=1 channel=4 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=yourWIFI password wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP

now we have to reboot the box
Next we have to edit the network interface settings

sudo nano /etc/network/interfaces

add following lines

auto lo br0 iface lo inet loopback iface eth0 inet manual iface wlan0 inet manual iface br0 inet dhcp bridge_ports eth0 wlan0

This means that for the access point we build a bridge (br0) over the ethernet (eth0) and the Wlan (wlan0) Interface. the bridge takes her IP from DHCP. This works obly if you have a DHCP router in your network an connect the router with a cable to eth0 interface.
After this step reboot again. now you can access Volumio over the IP from the bridge and the wifi Access Point is showing up on your phone. Hope so :slight_smile:. an other method is that you configure the bridge IP (br0) manually.