Jukebox

The jukebox is the touchscreen machine set up on a shelf and usually displaying ugly texts and buttons with occaionally old music videos. It also plays music.

Behind it is a small raspberry pi with a 32GB sdcard.

= To use it =

Changing the music playing
It has a MPD (Music Player Daemon) running. This means that anyone with a MPD client (gmpc for linux, MPDroid for Android, Auremo for Windows, more listed here) can access the playlist, change it, put new songs, change the volume, etc.

It sits on 192.168.1.20 on the port 6660 (the default MPD port)

Playing some movies
The raspberry pi can play movies fluently thanks to a decent acceleration hardware, but that requires to use a specific player, named omxplayer and limits the playable movies to movies encoded in x264 (a very common codec for MP4 files).

To play a movie :

- ssh to 192.168.1.20 using pi/raspberry

- cd Video to find several working files

- omxplayer to play it.

Exit with 'q' or 'ESC'

To copy a movie from your computer to the jukebox, you can use scp:

scp pi@192.168.1.20:/home/pi/

Scanning the network
By clicking "NMAP scan", the jukebox will try to identify machines on the network and give their IP. This is very convenient in case you are working on a headless machine like a raspberry pi. Be careful however, several machines, like recent smartphones or iThings try to be very stealthy and can escape detection.

More details
The scanning is done as superuser with the -sn --send-ip options on the 192.168.1.* address range.

-sn means "just scan for hosts, do not try to check which ports are open". By default it does send pings of 4 different types to every address.

--send-ip means that the scanning occurs at the IP level, not at the ethernet one. I could be wrong but this seemed to allow more wifi-connected devices to be detected.

With the current setting, it takes about 30 seconds to do a whole scan.

There is also a manually curated file named 'knownmachines' in the jukebox directory. It stores the known IP and MAC addresses of various machines. The jukebox program reads it at startup (so you have to restart the program if you modify it) and attributes each host an identification if it matches a known IP or MAC address.

Non detected machines
A lot of smartphones try to be stealthy on networks they connect to. They are valued targets to attackers, so, often they will not answer to any kind of ping, even at the cost of disobeying to the TCP protocol specification. If you don't see your phone or tablet on the scan, it can be totally normal.

Someone with more network skills than me could probably set up a packet sniffer that would manage to gather information on these devices nonetheless. The current setup is very basic and not even close to what can be achieved for detecting machines on the local network.

I dream that someone playing with software-defined radio added some 3G and LTE unencrypted packet headers sniffing...

= To hack it =

ssh to 192.168.1.20 using pi/raspberry

The default menu application is present in Geist/jukebox/ It is a python script that is a very good example of lazy and bad programming : tons of os.system calls which even sometime go call "sudo killall -9". Try to not recoil in horror if you want to modify this program !

It is a git repository cloned from 192.168.1.42. Feel free to push modifications!