## Tuesday, February 19, 2013

### Samba configuration on Raspbmc 1.0

Now that I installed version 1.0 of Raspbmc, a donation-based Debian Wheezy / XBMC OS for the Raspberry Pi. I needed to set up my services again, i.e. Samba, Zero Configuration, iTunes server, Apple networking and time machine. Samba took me a little bit mainly because there is so much confusing information on the 'net. So here is my brain dump on how to get Samba 3.6.6 configured:

/etc/samba/smb.conf:

----------------------- Network Related Options -------------------------
[global]
workgroup = SVENHOME
server string = %h Samba Server Version %v
netbios name = PI
usershare allow guests = yes

# --------------------------- Logging Options -----------------------------
log file = /var/log/samba/log.%m
max log size = 50
syslog = 0

# ----------------------- Standalone Server Options ------------------------
security = user
passdb backend = tdbsam
obey pam restrictions = yes
passwd program = /usr/bin/passwd %u
map to guest = bad user
unix extensions = no
lock directory = /var/cache/samba

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
name resolve order = hosts wins bcast

[devices]
browsable = yes
guest ok = yes
path = /media
force user = root

[homes]
comment = Home Directories
browseable = no
writable = yes

[music]
path = /media/Iomega_HDD/music
force user = pi
comment = Music
browseable = yes
writeable = yes
fstype=NTFS
public=yes

[pictures]
path = /media/Iomega_HDD/pictures
force user = pi
comment = Pictures
browseable = yes
writeable = yes
fstype=NTFS
public=yes


Add pi to the samba users:
sudo smbpasswd -a pi
sudo smbpasswd -e pi
sudo smbpasswd -e pi

And log on from Windows 8 as SVENHOME\pi and ditto from my laptop running Ubuntu 12.04 LTS without a hitch.

## Sunday, February 10, 2013

### Arduino Laser Show: I

So, this popular German computer magazine called C't now also publishes "C't hacks", and I got a copy. Anton and I were immediately drawn to the Arduino-controlled low-cost laser light show. The main ingredient - besides the Arduino and the laser - are the read/write mechanics of two old hard disks. So I got some junk 2.5" HDs from work and we opened them up. After removing the platters we found that the galvos (the electromagnetic drivers of the read/write head unit) were pinned out over  ribbon cable to a little connector, and we didn't know which pins were data and which galvo power. First useful job for the new lab power source! After trying all possible combinations we found them, but they  were different for the two little drives. What was also interesting and useful for later was that 0.1 V would already drive them to center, so I am not sure we'll even need a motor driver for that. A simple Mosfet would probably do. Since Arduino Analog Write is PWM at 900Hz, we might need a Low-pass RC element as well, we'll see. For this first stage, we needed to solder wire to the tiny pins - glad we had that giant magnifying lamp from the San Jose lab! We put plumber's putty over the pins to keep everything protected.  The green laser was ordered tonight as well, and we cut little mirrors from the HD platters. Intense excitement!