Chumby Software Applications, Scripts and Tools
This page is an attempt to document the various scripts and applications which come pre-installed on a stock Chumby distribution.
Contents
- 1 /proc
- 2 Scripts
- 2.1 Chumby inputs and outputs
- 2.2 Chumby Info
- 2.3 Chumby Settings
- 2.4 Daemons and housekeeping
- 2.5 Linux stuff
- 2.6 Chumby Actions
- 2.7 Chumby state wait
- 3 Applications
- 3.1 amixer
- 3.2 aplay
- 3.3 arecord
- 3.4 btplay
- 3.5 chumbhowld
- 3.6 chumbipod
- 3.7 chumbipodd
- 3.8 chumbpipe
- 3.9 chumbpop
- 3.10 chumbradio
- 3.11 chumbradiod
- 3.12 chumbyAuth
- 3.13 chumby_set_volume
- 3.14 chumbyflashplayer.x
- 3.15 chumbyradio
- 3.16 chumbytorrent
- 3.17 cpi
- 3.18 curl
- 3.19 dcid
- 3.20 eject
- 3.21 exportKeys
- 3.22 fbwrite
- 3.23 gdbserver
- 3.24 headphone_mgr
- 3.25 hexdump
- 3.26 imgtool
- 3.27 memstress
- 3.28 mountmon
- 3.29 mp3.x
- 3.30 openssl
- 3.31 perl
- 3.32 scp
- 3.33 ssh
- 3.34 switchwait
- 3.35 udevinfo
- 3.36 udevstart
- 3.37 udevtest
- 3.38 usb
- 3.39 wget
/proc
Another page has details on Chumby device settings information on /proc
Scripts
All of these scripts are found in /usr/chumby/scripts/
Chumby inputs and outputs
ap_scan
ap_scan - Scans for wireless networks and outputs XML. If /tmp/hidden_ssid exists, the script will switch the SSID of the wireless interface to the SSID defined in /tmp/hidden_ssid before initiating the scan. If the interface was configured with a different SSID prior to a wireless scan that read from /tmp/hidden_ssid, the script will restore the original SSID when the scan has completed.
chumby_set_mute
Set the "mute" volume of the Chumby. Mute affects the Chumby speaker but not the headphones. Is this correct?
chumby_set_pan
Set the "balance" level of the Chumby. Is this correct?
chumby_set_volume
Set the master volume of the Chumby.
Chumby Info
get_voltage.sh
With no arguments, reports raw values from /proc/chumby/battery-voltage If battery or line is specified, gets specified value and converts to approximate voltage.
log-rollover-enable
Enable log-rollover in crontab
macgen.sh
Outputs wireless NIC hardware address
guidgen.sh
Extracts chumby putative ID from crypto processor
network_running.sh
Determines whether the network is running
Chumby Settings
chumby_version
Displays the software, firmware and hardware versions
syntax: /usr/chumby/scripts/chumby_version [-s -f -h -n -t --rfs1 --rfs2] -s - display software version -f - display firmware build number -h - display hardware version number -n - display hardware serial number -t - display hardware time since last crypto processor power cycle --rfs1 - display RFS1 md5sum --rfs2 - display RFS2 md5sum
disable_intro
Disable the intro screen.
download_cp
Downloads the latest Control Panel configured for this chumby, typically to /tmp
enable_intro
Enable the intro screen.
reboot_normal.sh
Reboots the Chumby -- gracefully
Daemons and housekeeping
flashplayer_watchdog
Script that watches for flashplayer hangs or exits?
headphone_manager
Daemon responsible for disabling internal speakers when external headphones/speaker is plugged in
log-rollover
Script to roll over /var/log/messages
Usually invoked from crontab:
50 2,6,10,14,18,22 * * * /usr/chumby/scripts/log-rollover
mkdevs
Simple script to automatically populate a /dev directory.
Mountmon scripts
See mountmon.conf for list of environment variables available on input and required output values
mountmon_utils.sh
Utility functions used by mountmon scripts
add.sh
"Add" event script for mountmon
mount.sh
Mount event script for mountmon
remove.sh
Remove event script for mountmon
umount.sh
Unmount event script for mountmon
network_status.sh
Polls the status of the network interface and outputs XML to /tmp/chumby/network_status.xml
sync_time.sh
Synchronize clock with network time server
- Called by sync_time_state.sh
sync_time_state.sh
Set or read the sync_time_state from /psp/use_ntp
time_zone.sh
update.sh
Autoupdate script
Linux stuff
script_locations.sh
Set default script directory locations (environment variable)
service_control
Service control wrapper script
Usage: service_control service_name action [args]
This just gets the ETC_INIT_DIR value from script_locations.sh then invokes ${ETC_INIT_DIR}/${service_name} action [args]
service_getpid
Get process id(s) of running service
service_list
Get list of running services
Chumby Actions
start_control_panel
Responsible for starting the control panel in the correct mode
This is a pretty elaborate script. It checks for Control Panel updates on the network and USB drives. It checks and restarts the music player as needed, erases the display (manually!), and then starts the Control Panel flash applet.
It would be nice if we could replace this script with custom functionality in-place, but since it's on a read-only path, we can't. The Flash Applet can easily be replaced, however, by altering /tmp/cp_path or by supplying a replacement on a USB drive (see Chumby tricks ).
Calling this script directly is not enough to safely start the Control Panel.
start_intro
start_network
Starts the network after the network config has been written
start_network.sh
symlink to start_network
start_opening_anim
start_sshd.sh
Start the SSH Daemon
stop_control_panel
Stop the control panel widget from playing
update_now.sh
Sets the paranoid boot flag to boot into autoupdate mode and force an immediate reboot.
Chumby state wait
wait_for_link
Wait for the (network?) interface to establish link before proceeding
wait_for_opening
Wait for opening animation to start.
wait_for_usb
Wait for the usb subsystem to finish loading before proceeding
Applications
These applications are in /usr/bin.
- Note: Busybox tools are not included in this list.
amixer
aplay
arecord
btplay
chumbhowld
chumbipod
chumbipodd
Documented at Chumby as an iPod server.
chumbpipe
chumbpop
chumbradio
From the forum: "Require[s] an as-yet unreleased hardware accessory." [1]
chumbradiod
chumbyAuth
chumby_set_volume
chumbyflashplayer.x
This is the Adobe Flash Lite 3 Player customized for the chumby
chumbyradio
chumbytorrent
cpi
Usage : cpi [--help] | [-p] [-a] [-d] [-r] Interface with Crypto Processor Options: --help Display this help screen -k <KEYID> Use the specified key ID (default is 0) -r <FILE> Read query XML from FILE (ignored if valid -i specified) -w <FILE> Write result XML to FILE (ignored if valid -o specified) -i Read query XML from stdin -o Write result XML to stdout -p Write putative ID of specified key index to stdout -a
curl
dcid
eject
exportKeys
fbwrite
gdbserver
headphone_mgr
hexdump
Dump a file or pipe in hex
imgtool
Puts an image on the Chumby screen or captures the screen to an image file.
Try this to see how it works:
chumby:~# /usr/bin/imgtool --mode=draw /www/images/chumby_logo.png
Here's an example of capturing the screen to an image file
chumby:~# /usr/bin/imgtool --mode=cap /tmp/capture.jpg
Syntax: /usr/bin/imgtool [options] file where file is output (mode=cap) or - to write to stdout, or if mode==draw, a .jpg or .png image file to write to frame buffer and options are any of the following: --debug Increase verbosity --resize=n (64) Resize options (draw mode only) --gamma=f (2.2) Screen gamma (for png decode) --quality=pct (30) JPEG capture quality (0-100) --fb=n (0) Write to / read from frame buffer (0 or 1) --fmt={jpg,png} (jpg) Format to write (if mode==cap) --mode={cap,draw} (draw) Capture frame buffer to file (cap) or draw image file to frame buffer --help Display this message
- Note: PNG capture is not supported yet on the version I have.
Here's a neat trick. Put this in /psp/cgi-bin/image
#!/bin/sh echo "Content-type: image/jpeg" echo "Refresh: 5; #" echo "" /usr/bin/imgtool --mode=cap -
Now open "http://your-chumby-ip-address/cgi-bin/custom/image". You should see your Chumby screen there. And it refreshes!
memstress
mountmon
mp3.x
openssl
Open SSL tool
perl
This is perl, v5.8.8 built for linux
scp
Secure copy
ssh
Secure shell (ssh to another machine)
switchwait
udevinfo
udevstart
udevtest
usb
wget
Get a file from the web