Difference between revisions of "Chumby tricks"
(added temporary streaming radio workaround, organized the sections a little better.) |
m (→Listening to Internet Radio Stations: added tip on changing stream sample rates (found on forum)) |
||
Line 24: | Line 24: | ||
* Enjoy the streaming music. | * Enjoy the streaming music. | ||
* To stop playback, simply press <code>ctrl+C</code>. | * To stop playback, simply press <code>ctrl+C</code>. | ||
+ | * Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code> | ||
=Streaming music from SlimServer to chumby= | =Streaming music from SlimServer to chumby= |
Revision as of 14:31, 16 November 2007
NOTE - this page is for Ironforge production chumby devices - for alpha prototypes, please see Chumby Tricks for Foo/Katamari
Contents
- 1 Hidden screen in Control Panel
- 2 Open a secure shell console on the chumby
- 3 Listening to Internet Radio Stations
- 4 Streaming music from SlimServer to chumby
- 5 Built in web server
- 6 Custom alarms
- 7 Your own opening animation
- 8 Your own Control Panel
- 9 Launching sshd at startup
- 10 Make your chumby click when you touch the screen
- 11 Run processes on start-up
- 12 Mount NFS partitions
Hidden screen in Control Panel
- Open the Control Panel, select "Settings", then "Chumby Info"
- In the upper right, you'll see a little "pi" symbol - touch it
- You'll see a screen with some interesting buttons:
- SSHD will launch the builtin Secure Shell Daemon
- FILES will open up a simple file system browser
- REBOOT will reboot the chumby device
Open a secure shell console on the chumby
- Start
sshd
using the hidden Control Panel screen - Using an SSH client, log in:
- For Microsoft Windows, you can use PuTTY.
- For MacOS X and Linux, use the command
ssh
from a terminal window
- Use the IP listed on the hidden screen, with the username "root". It will not require a password. For instance, if your chumby has the IP
192.168.1.100
, on Linux or Mac, the command would be:
ssh 192.168.1.100 -l root
- You should get a big ASCII chumby logo
Listening to Internet Radio Stations
- Connect to your Chumby via SSH as mentioned above.
- In your command line, enter
btplay http://internet.radio.station.url:port/stream.mp3
and press return. Be sure to replace the address with the complete address of the internet radio station. - Enjoy the streaming music.
- To stop playback, simply press
ctrl+C
. - Got Chipmunk syndrome? (audio plays too fast) try
btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3
Streaming music from SlimServer to chumby
Stream music from your computer to your chumby using SlimServer!
- Download and install SlimServer
http://www.slimdevices.com/su_downloads.html
on your computer. - Use a Unix-style line-end compatible(linefeeds rather than carriage return line breaks) text editor (TextEdit for Mac, EditPad Pro for Windows) to create a file called "debugchumby" (no extension).
- Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")
#!/bin/sh btplay http://ip.of.your.server:9000/stream.mp3 &
- Verify the IP address is the IP address of the computer that SlimServer is running on.
- Save the file to a USB flash drive, insert into your chumby, and reboot.
- Play your music via the SlimServer web interface, and music should play through the chumby's speakers.
- Enjoy!
Built in web server
On startup, the chumby launches a small HTTP server on port 80, which displays wireless statistics information - to view this page, get the IP of the chumby from the Settings->Chumby Info screen in the Control Panel, and type http://ip.of.the.chumby/
into a browser.
You can add CGI scripts to this webserver:
- Open a console on the chumby using SSH
- create a directory at
/psp/cgi-bin
- add your CGI scripts there
- Make sure CGI scripts have execute permissions (chmod +x script_Name)
You can now access those scripts using the URL http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script
Custom alarms
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files
- Get a USB flash drive, and copy your MP3 file to the top level
- To override alarm 1, rename the file
alarm1.mp3
- To override alarm 2, rename the file
alarm2.mp3
- ...or to override both, rename the file
alarm.mp3
- the individual files will override this one. - Plug the USB flash drive and boot your chumby - when an alarm goes off, it will use your files instead of the built in sounds
Don't make these files too big - no larger than a couple of megabytes.
Your own opening animation
If you'd like to replace the little chumby animation that happens when you start up, do the following:
- Make your Flash animation that you want to run, be sure it calls
fscommand("quit")
at the end - Put it on a USB flash drive, and call it "opening.swf"
- Plug it into the back of your chumby and reboot!
Your own Control Panel
Note: Requires software release 1.2 or later
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:
- Put it on USB flash drive, and call it
controlpanel.swf
- Plug it into the back of your chumby and reboot!
If you have an older software release you can do something similar with a USB dongle, with the file debugchumby
containing:
#!/bin/sh chumbyflashplayer.x -i /mnt/usb/controlpanel.swf
Launching sshd at startup
- Open up a console on the chumby
- At the console, type:
touch /psp/start_sshd
- Now
sshd
will be started whenever the chumby successfully connects to a network! - To stop this behavior in the future, type:
rm /psp/start_sshd
If you don't want to happen all the time, you can do this instead from a USB flash drive:
- On the USB flash drive, create an empty file called
start_sshd
. - Plug it into the back of your chumby and reboot!
Make your chumby click when you touch the screen
You can have the chumby give you some simple audio feedback when you touch the screen
- Open up a console on the chumby
- Type
echo 1 > /proc/chumby/touchscreen/touchclick
- To turn it off, type
echo 0 > /proc/chumby/touchscreen/touchclick
Run processes on start-up
- The only way to do this right now is to use a USB drive: create a file called
debugchumby
and put shell script commands in there. This will run on start-up. - If you want to run commands as soon as you log in, you can edit your /psp/.profile file.
- You should probably first make a backup copy of the original:
cp /psp/.profile /psp/.profile.orig
- Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby):
vi /psp/.profile
- Add whatever commands (try the chumby click echo command).
- Now when you reboot, these commands should run WHEN YOU LOG IN.
Mount NFS partitions
In order to NFS mount a remote filesystem from chumby, do the following:
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs
Example:
mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs