Chumby tricks

From Chumby Wiki
Revision as of 17:15, 26 November 2007 by Ksteele (Talk | contribs)

Jump to: navigation, search

NOTE - this page is for Ironforge production chumby devices - for alpha prototypes, please see Chumby Tricks for Foo/Katamari

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

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.

Run processes on Log In

  • 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).
  • After rebooting, these commands should run upon logging into the console.

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

Screwed up your touchscreen calibration?

If you messed up your touchscreen calibration to the point that you can't even restore it through the Special Options mode, create a file called 'ts_settings' on a USB dongle with the contents:

136,3768,3835,-3540

...put the dongle in one of the USB ports in back of your chumby and reboot. This restores the calibration to factory settings, which is at least good enough to let you navigate the Control Panel to the calibration section.

Use wired Ethernet

Note: This has only been tested with the Linksys USB200M USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.

  • create a debugchumby file with the following contents:
#!/bin/sh
insmod /drivers/usbnet.ko
insmod /drivers/asix.ko
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0
ifconfig rausb0 inet 1.1.1.1
  • copy the debugchumby script to a USB drive
  • insert the USB Ethernet adapter (Linksys USB200M) into a chumby USB port
  • insert the USB drive into the other chumby USB port
  • power on your chumby