http://wiki.chumby.com/api.php?action=feedcontributions&user=Chumby&feedformat=atomChumby Wiki - User contributions [en]2024-03-28T09:34:31ZUser contributionsMediaWiki 1.23.9//wiki.chumby.com/index.php?title=Chumby_Service_Settings_in_/pspChumby Service Settings in /psp2011-12-29T01:54:04Z<p>Chumby: /* /psp/network_configs */</p>
<hr />
<div>=/psp=<br />
==/psp/alarm_volume==<br />
<br />
Contains an integer value denoting the volume of the alarms. Valid values are 0 to 100.<br />
<br />
==/psp/alarms==<br />
<br />
'''File format:'''<br />
<br />
<alarms><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
</alarms><br />
<br />
'''Parameter values:'''<br />
<br />
Parameters can appear in any order.<br />
<br />
* name - Alarm name<br />
* enabled - Is the alarm active or inactive? Valid values are "0" (inactive) and "1" (active)<br />
* action<br />
* action_param<br />
* auto_dismiss<br />
* param_description<br />
* param<br />
* arg<br />
* type<br />
* duration<br />
* snooze<br />
* time<br />
* when - Valid values are "Once", "Daily", "Weekends", "Weekdays", "Sundays", "Mondays", "Tuesdays", "Wednesdays", "Thursdays", "Fridays", "Saturdays"<br />
* backup - Is a backup alarm active or inactive? Valid values are "0" (inactive) and "1" (active)<br />
* backupDelay<br />
<br />
==/psp/cgi-bin/==<br />
==/psp/crontabs/==<br />
===/psp/crontabs/root===<br />
==/psp/disable_intro==<br />
==/psp/firsttime==<br />
==/psp/hostname==<br />
==/psp/hosts==<br />
==/psp/ifdate.xml==<br />
==/psp/localtime==<br />
Contains a copy of the timezone file specified in /psp/timezone<br />
<br />
==/psp/mute==<br />
<br />
Contains an integer value denoting the sound output mute status. Valid values are 0 (mute disabled) and 1 (mute enabled).<br />
<br />
==/psp/network_config==<br />
Contains XML for the currently selected network configuration.<br />
<br />
==/psp/network_configs==<br />
Contains XML for the list of network configurations. <br />
<br />
Format<br />
<br />
&lt;configurations&gt;&lt;configuration username=&quot;&quot; nameserver2=&quot;&quot; nameserver1=&quot;&quot; gateway=&quot;&quot; netmask=&quot;&quot; ip=&quot;&quot; allocation=&quot;&quot; key=&quot;&quot; encoding=&quot;&quot; encryption=&quot;&quot; auth=&quot;&quot; hwaddr=&quot;&quot; ssid=&quot;&quot; type=&quot;&quot; /&gt;&lt;/configurations&gt;<br />
<br />
* '''username''' - username for WPAEAP and WPA2EAP (reserved for future use on Chumby 8)<br />
* '''allocation''' - Either "static" or "dhcp"<br />
* '''nameserver2''' - Contains IP address of the secondary DNS server. Blank if DHCP used<br />
* '''nameserver1''' - Contains IP address of the primary DNS server. Blank if DHCP used<br />
* '''gateway''' - Contains IP address of gateway. Blank if DHCP used<br />
* '''netmask''' - Contains netmask. Blank if DHCP used<br />
* '''ip''' - IP address for static IP address otherwise blank<br />
* '''key''' - Security key for WPA, WPA2, or WEP, password for WPAEAP and WPA2EAP<br />
* '''encoding''' - "ascii" or "hex", encoding of the key<br />
* '''encryption-''' - "NONE" for open access points or Ethernet, "WEP" for WEP, "AES" or "TKIP" for WPAPSK and WPA2PSK<br />
* '''auth''' - "OPEN" for open access points or Ethernet; "WEPAUTO", "WPAPSK" or "WPA2PSK" for secure wifi access points<br />
* '''hwaddr''' - contains the MAC address of the wireless access point or blank for LAN<br />
* '''ssid''' - ethernet or the SSID of the WLAN access point<br />
* '''type''' - "lan" for ethernet, or "wlan" for wifi<br />
<br />
The following characters must be correctly escaped otherwise they won't be accepted (in the Chumby One - the Chumby Classic does not seem to mind)<br />
<br />
Character Escape Code<br />
<br />
* " &amp;quot; <br />
* ' &amp;apos; <br />
* < &amp;lt; <br />
* > &amp;gt; <br />
* & &amp;amp;<br />
<br />
==/psp/pan==<br />
==/psp/shoutcast_search==<br />
Contains the last search string used in the search box for the SHOUTcast music source in the Control Panel.<br />
<br />
==/psp/slimserver_ip==<br />
==/psp/timezone==<br />
Contains the timezone selected in the Control Panel, typically a path to a timezone file relative to /usr/share/zoneinfo<br />
<br />
==/psp/timezone_city==<br />
Contains the city and country of the time zone selected in the Control Panel, separated by tab and terminated by a linefeed.<br />
<br />
==/psp/ts_settings==<br />
Contains four or five numbers separated by commas. The first four are the calibration settings, and are values in touch screen units (not pixels).<br />
<br />
The first is the X coordinate of the left screen edge, the second is the offset to that value to reach the right screen edge. The third is the Y coordinate of the top screen edge, the second is the offset to reach the bottom screen edge. Note that this last value is negative.<br />
<br />
To convert from touch screen values to screen pixels, the formulae are:<br />
* pixel_x = 320 * (touch_x - ts_settings[0]) / ts_settings[1]<br />
* pixel_y = 240 * (touch_y - ts_settings[2]) / ts_settings[3]<br />
<br />
The use of the fifth number is not yet clear.<br />
==/psp/udev/==<br />
==/psp/url_streams==<br />
==/psp/use_ntp==<br />
==/psp/volume==<br />
Contains the value of the volume slider, in the range 0 through 100</div>Chumby//wiki.chumby.com/index.php?title=Chumby_Service_Settings_in_/pspChumby Service Settings in /psp2011-12-29T01:47:45Z<p>Chumby: /* /psp/network_configs */</p>
<hr />
<div>=/psp=<br />
==/psp/alarm_volume==<br />
<br />
Contains an integer value denoting the volume of the alarms. Valid values are 0 to 100.<br />
<br />
==/psp/alarms==<br />
<br />
'''File format:'''<br />
<br />
<alarms><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
<alarm name="" backupDelay="" backup="" action_param="" action="" auto_dismiss="" param_description="" param="" arg="" type="" duration="" snooze="" enabled="" time="" when="" /><br />
</alarms><br />
<br />
'''Parameter values:'''<br />
<br />
Parameters can appear in any order.<br />
<br />
* name - Alarm name<br />
* enabled - Is the alarm active or inactive? Valid values are "0" (inactive) and "1" (active)<br />
* action<br />
* action_param<br />
* auto_dismiss<br />
* param_description<br />
* param<br />
* arg<br />
* type<br />
* duration<br />
* snooze<br />
* time<br />
* when - Valid values are "Once", "Daily", "Weekends", "Weekdays", "Sundays", "Mondays", "Tuesdays", "Wednesdays", "Thursdays", "Fridays", "Saturdays"<br />
* backup - Is a backup alarm active or inactive? Valid values are "0" (inactive) and "1" (active)<br />
* backupDelay<br />
<br />
==/psp/cgi-bin/==<br />
==/psp/crontabs/==<br />
===/psp/crontabs/root===<br />
==/psp/disable_intro==<br />
==/psp/firsttime==<br />
==/psp/hostname==<br />
==/psp/hosts==<br />
==/psp/ifdate.xml==<br />
==/psp/localtime==<br />
Contains a copy of the timezone file specified in /psp/timezone<br />
<br />
==/psp/mute==<br />
<br />
Contains an integer value denoting the sound output mute status. Valid values are 0 (mute disabled) and 1 (mute enabled).<br />
<br />
==/psp/network_config==<br />
Contains XML for the currently selected network configuration.<br />
<br />
==/psp/network_configs==<br />
Contains XML for the list of network configurations. <br />
<br />
Format<br />
<br />
&lt;configurations&gt;&lt;configuration username=&quot;&quot; nameserver2=&quot;&quot; nameserver1=&quot;&quot; gateway=&quot;&quot; netmask=&quot;&quot; ip=&quot;&quot; allocation=&quot;&quot; key=&quot;&quot; encoding=&quot;&quot; encryption=&quot;&quot; auth=&quot;&quot; hwaddr=&quot;&quot; ssid=&quot;&quot; type=&quot;&quot; /&gt;&lt;/configurations&gt;<br />
<br />
* '''username''' - username for WPAEAP and WPA2EAP (reserved for future use on Chumby 8)<br />
* '''allocation''' - Either "static" or "dhcp"<br />
* '''nameserver2''' - Contains IP address of the secondary DNS server. Blank if DHCP used<br />
* '''nameserver1''' - Contains IP address of the primary DNS server. Blank if DHCP used<br />
* '''gateway''' - Contains IP address of gateway. Blank if DHCP used<br />
* '''netmask''' - Contains netmask. Blank if DHCP used<br />
* '''ip''' - IP address for static IP address otherwise blank<br />
* '''key''' - Security key for WPA, WPA2, or WEP, password for WPAEAP and WPA2EAP<br />
* '''encoding''' - "ascii" or "hex", encoding of the key<br />
* '''encryption-''' - "NONE" for open access points or Ethernet, "WEP" for WEP, "AES" or "TKIP" for WPAPSK and WPA2PSK<br />
* '''auth''' - "OPEN" for open access points or Ethernet; "WEPAUTO", "WPAPSK" or "WPA2PSK" for secure wifi access points<br />
* '''hwaddr''' - contains the MAC address of the wireless access point or blank for LAN<br />
* '''ssid''' - ethernet or the SSID of the WLAN access point<br />
* '''type''' - "lan" for ethernet, or "wlan" for wifi<br />
<br />
The following characters must be correctly escaped otherwise they won't be accepted (in the Chumby One - the Chumby Classic does not seem to mind)<br />
<br />
Character Escape Code<br />
<br />
* " &amp;quot; <br />
* ' &amp;apos; <br />
* < &amp;lt; <br />
* > &amp;gt; <br />
* & &amp;amp;<br />
<br />
==/psp/pan==<br />
==/psp/shoutcast_search==<br />
Contains the last search string used in the search box for the SHOUTcast music source in the Control Panel.<br />
<br />
==/psp/slimserver_ip==<br />
==/psp/timezone==<br />
Contains the timezone selected in the Control Panel, typically a path to a timezone file relative to /usr/share/zoneinfo<br />
<br />
==/psp/timezone_city==<br />
Contains the city and country of the time zone selected in the Control Panel, separated by tab and terminated by a linefeed.<br />
<br />
==/psp/ts_settings==<br />
Contains four or five numbers separated by commas. The first four are the calibration settings, and are values in touch screen units (not pixels).<br />
<br />
The first is the X coordinate of the left screen edge, the second is the offset to that value to reach the right screen edge. The third is the Y coordinate of the top screen edge, the second is the offset to reach the bottom screen edge. Note that this last value is negative.<br />
<br />
To convert from touch screen values to screen pixels, the formulae are:<br />
* pixel_x = 320 * (touch_x - ts_settings[0]) / ts_settings[1]<br />
* pixel_y = 240 * (touch_y - ts_settings[2]) / ts_settings[3]<br />
<br />
The use of the fifth number is not yet clear.<br />
==/psp/udev/==<br />
==/psp/url_streams==<br />
==/psp/use_ntp==<br />
==/psp/volume==<br />
Contains the value of the volume slider, in the range 0 through 100</div>Chumby//wiki.chumby.com/index.php?title=Developing_Widgets_for_Chumby:_Insignia_TVDeveloping Widgets for Chumby: Insignia TV2011-08-11T23:47:00Z<p>Chumby: /* Overview */</p>
<hr />
<div>==Overview==<br />
http://files.chumby.com/wikiimages/deviceimages/insigniactv.jpg<br />
<br />
The Insignia Connected TV is the first TV to support the chumby app network. This TV uses a Flash player known as Stagecraft 1.2, which is similar to Flash Lite 3.1. The capabilities of this Flash player are similar to those of desktop Flash player 8, meaning it uses AVM1 (ActionScript 2). When creating applications with standard Flash tools, it's recommended to set the publish settings to Flash 8, but avoid "filters" and "blend modes", which are not supported in Flash Lite.<br />
<br />
==Screen resolution==<br />
<br />
The TV's screen resolution as seen by a Flash application is 960*540. The apps are typically displayed in one of two states:<br />
* In a 600*450 window, along with a small view of the current TV program in the upper right corner of the screen<br />
* In a 684*130 non-interactive "preview", beneath a larger view of the current TV program<br />
<br />
In order for your application to be usable in both modes, 2 swfs should be uploaded, one of which should have a stage size of 684*130. The system will detect the swf dimensions and display the correct one based on the current mode.<br />
<br />
==Remote control input==<br />
<br />
The directional keys on the TV's remote control are received as standard (Up, Down, Left, Right, and Enter) keys by the application. In addition, the apps have access to 4 special keys labeled A-D on the remote, and a few other useful keys, listed below along with their key codes:<br />
<pre><br />
var KEY_C:Number = 0x100001f;<br />
var KEY_D:Number = 0x1000020;<br />
var KEY_A:Number = 0x1000021;<br />
var KEY_B:Number = 0x1000022;<br />
var CHANNEL_UP:Number = 0x1000004;<br />
var CHANNEL_DOWN:Number = 0x1000005;<br />
var THUMB_UP:Number = 0x2000007;<br />
var THUMB_DOWN:Number = 0x2000008;<br />
</pre><br />
<br />
==Full-screen media-enabled applications==<br />
<br />
By default apps are not able to play audio or video, because there could be a conflicting video window already present in a corner of the screen. An app can send a request to the Control Panel (CP) to be relaunched with audio/video enabled. The request is sent via Flash's LocalConnection mechanism, and allows the application to specify parameters that it will receive as _root variables once it's relaunched. These are the relevant constants:<br />
<br />
<pre><br />
var LC_NAME:String = "_chumby_lc"; // connection name<br />
var LC_RELAUNCH_AV:String = "relaunch_av"; // request to be relaunched with audio/video enabled (600*450)<br />
var LC_RELAUNCH_AV_FULL:String = "relaunch_av_full"; // request to be relaunched with a/v at full-screen (960*540)<br />
var LC_RELAUNCH_NO_AV:String = "relaunch_no_av"; // request to be relaunched without a/v enabled (600*450)<br />
</pre><br />
<br />
Here is an example:<br />
<br />
<pre><br />
var lc = new LocalConnection();<br />
lc.send(LC_NAME, LC_RELAUNCH_AV, { param1:"something", param2:"something else" } );<br />
</pre><br />
<br />
==Saving temporary and permanent state==<br />
<br />
Apps can also use the LocalConnection mechanism to send up to 384 characters of temporary state information to the CP. The CP will pass that string to the app using the variable _root._chumby_widget_state when starting up the app. State information gets cleared when the user switches to a different channel, so more permanent configuration variables should be stored on the server using the standard [[Widget_Parameter_Example | widget parameters]] mechanism. Here is an example of sending state information to the CP:<br />
<br />
<pre><br />
lc.send("_chumby_lc", "app_state", _root._chumby_widget_instance_id, stateInformationString );<br />
</pre></div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2011-08-11T23:46:00Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
| Chumby8<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
| https://lh6.googleusercontent.com/-yYuYncwE3b8/TinzW0G1zCI/AAAAAAAAADM/GVWag1DNhJw/silvermoon.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
| Codename: Opus/Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128 MB DDR2 SDRAM<br />
<br />
800x600 touchscreen<br />
<br />
Integrated speakers (mono or stereo option)<br />
<br />
Headphone/line output<br />
<br />
8.7" widex 6.75" tall x 5.5" deep<br />
<br />
Microphone input<br />
<br />
+5V, 2.5A input<br />
<br />
802.11 b/g WiFi<br />
<br />
1 USB 2.0 HS port<br />
<br />
Dimmable backlight<br />
<br />
CompactFlash, MMC and SD support<br />
<br />
2 USB 2.0 ports<br />
<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Insignia Infocast 8"<br />
| Insignia Infocast 3.5"<br />
| chumby for Android<br />
| Insignia Connected TV<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast3.5.jpg<br />
| https://lh4.googleusercontent.com/-AkP7fxO6Sf4/Tin0eIFG7xI/AAAAAAAAADY/AuMqgJDqVeM/android.png<br />
|http://files.chumby.com/wikiimages/deviceimages/insigniactv.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
| Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio<br />
| [http://www.chumby.com/pages/android More information]<br />
| 32" NS-32E859A11<br />
<br />
42" NS-42E859A11<br />
<br />
[http://www.bestbuy.com/insigniaconnectedtv Product information]<br />
<br />
[http://wiki.chumby.com/index.php/Developing_Widgets_for_Chumby:_Insignia_TV Developer information]<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2011-08-11T23:30:11Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
| Chumby8<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
| https://lh6.googleusercontent.com/-yYuYncwE3b8/TinzW0G1zCI/AAAAAAAAADM/GVWag1DNhJw/silvermoon.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
| Codename: Opus/Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128 MB DDR2 SDRAM<br />
<br />
800x600 touchscreen<br />
<br />
Integrated speakers (mono or stereo option)<br />
<br />
Headphone/line output<br />
<br />
8.7" widex 6.75" tall x 5.5" deep<br />
<br />
Microphone input<br />
<br />
+5V, 2.5A input<br />
<br />
802.11 b/g WiFi<br />
<br />
1 USB 2.0 HS port<br />
<br />
Dimmable backlight<br />
<br />
CompactFlash, MMC and SD support<br />
<br />
2 USB 2.0 ports<br />
<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Insignia Infocast 8"<br />
| Insignia Infocast 3.5"<br />
| chumby for Android<br />
| Insignia Connected TV<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast3.5.jpg<br />
| https://lh4.googleusercontent.com/-AkP7fxO6Sf4/Tin0eIFG7xI/AAAAAAAAADY/AuMqgJDqVeM/android.png<br />
|<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
| Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio<br />
| [http://www.chumby.com/pages/android More information]<br />
| 32" NS-32E859A11<br />
<br />
42" NS-42E859A11<br />
<br />
[http://www.bestbuy.com/insigniaconnectedtv Product information]<br />
<br />
[http://wiki.chumby.com/index.php/Developing_Widgets_for_Chumby:_Insignia_TV Developer information]<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2011-08-11T23:22:46Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
| Chumby8<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
| https://lh6.googleusercontent.com/-yYuYncwE3b8/TinzW0G1zCI/AAAAAAAAADM/GVWag1DNhJw/silvermoon.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
| Codename: Opus/Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128 MB DDR2 SDRAM<br />
<br />
800x600 touchscreen<br />
<br />
Integrated speakers (mono or stereo option)<br />
<br />
Headphone/line output<br />
<br />
8.7" widex 6.75" tall x 5.5" deep<br />
<br />
Microphone input<br />
<br />
+5V, 2.5A input<br />
<br />
802.11 b/g WiFi<br />
<br />
1 USB 2.0 HS port<br />
<br />
Dimmable backlight<br />
<br />
CompactFlash, MMC and SD support<br />
<br />
2 USB 2.0 ports<br />
<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Insignia Infocast 8"<br />
| Insignia Infocast 3.5"<br />
| chumby for Android<br />
| Insignia TV<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast3.5.jpg<br />
| https://lh4.googleusercontent.com/-AkP7fxO6Sf4/Tin0eIFG7xI/AAAAAAAAADY/AuMqgJDqVeM/android.png<br />
|<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
| Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio<br />
| [http://www.chumby.com/pages/android More information]<br />
| [http://wiki.chumby.com/index.php/Developing_Widgets_for_Chumby:_Insignia_TV More information]<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2011-08-11T15:10:34Z<p>Chumby: Undo revision 3129 by Brenda (talk)</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}}<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off <br />
<br />
{{thumb|infocast}}<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quit the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client (Windows users can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY], Mac/Linux users can use <code>ssh</code> from a terminal window), log in as the user '''root''' with no password. e.g. {{Command|ssh 192.168.1.100 -l root}}<br />
* Note: the IP is visible from the Chumby Info screen as well as the hidden Control Panel screen<br />
* You should get a big ASCII chumby logo<br />
<br />
==Enabling a password for SSH - the easy way==<br />
In software version 1.0.7 (at least) the passwd command is built-in. So setting a password should be as easy as mounting the root filesystem read/write (per notes below) and typing<br />
{{Command|passwd root}}<br />
It should be noted that there is another account called "default" which also has no password.<br />
<br />
==Enabling a password for SSH - the hard way==<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model, but for each you will need to connect to your Chumby via SSH.<br />
<br />
=== ...on Ironforge ===<br />
{{thumb|ironforge}}<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
{{Command|mkdir /psp/etc}}<br />
{{Command|cp -rd /etc/* /psp/etc}}<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before<br />
!after<br />
|-<br />
|root::10933:0:99999:7:::<br />
|root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|}<br />
<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
{{Command|mount -t loop -o bind /psp/etc /etc}}<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
<br />
=== ...on Falconwing and Infocast 3.5 ===<br />
{{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
{{Command|mount -o remount,rw /}}<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
{{Command|mount -o remount,ro /}}<br />
<br />
That's it!<br />
<br />
'''Note''': When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
= Music customizations =<br />
<br />
==Streaming from an mp3 server (shoutcast / icecast / etc.)==<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
# Connect to your Chumby via SSH as mentioned above.<br />
# In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
# Enjoy the streaming music.<br />
<br />
* '''To stop playback''' press <code>ctrl+C</code>.<br />
* '''To adjust volume''' run <code>chumby_set_volume '''100'''</code> where the 100 can be 0-100.<br />
* '''Stream pitch too high?''' try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
==Streaming music from SlimServer to chumby==<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or two and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
==Streaming music from Nicecast==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know the LAN IP address of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
==Streaming music from GNUMP3d==<br />
<br />
See [[GNUMP3d]].<br />
<br />
==Streaming XM Satellite Radio==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
==Streaming SIRIUS Satellite Radio==<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
=== Install uSirius ===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
=== Install TVersity ===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
=== Install XAMPP ===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
=== Downloading the PHP Script ===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download [http://framework.zend.com/download the Zend Framework], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check some random unreferenced forum thread) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
=== Set up in the Chumby ===<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
==Changing the order of music sources==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Built in web server=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Alarm customizations=<br />
==Custom alarm sounds==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
==Custom alarm actions==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
==Custom alarm ring screen==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
= Boot up, default screen, control panel customizations =<br />
==Customizing the opening animation==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
== Your own splash screens ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
=== Bootloader Screens ===<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
=== Kernel Screen ===<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
=== Init Script Screen ===<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
==Using a custom Control Panel==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
= Scheduled tasks, auto-execution of tasks =<br />
== Launching sshd at startup ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
==Entering Night Mode Automatically==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1<br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
<br />
'''Additional Note:''' You can make Chumby enter Night Mode automatically without resorting to this trick, at least as of firmware 1.0.7. You can create a custom alarm that has no sound, but has an action set to enter Night Mode. Be aware that if you have any other alarms (possibly silent) that trigger after that, the Chumby will come out of night mode.<br />
<br />
'''Crontab Note:''' crontab is broken in the November, 2010 update with incorrect path and file permissions. The simplest fix is to edit with 'crontab -c /psp/crontabs -e'. You may also need to change the ownership of /psp/crontabs/root from chumby:chumby to root:root; do this with 'chown root:root /psp/crontabs/root'. For more details see http://forum.chumby.com/viewtopic.php?id=5673<br />
<br />
==Run processes on start-up==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be placed either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
==Running something at boot without debugchumby (IronForge Chumby Classic ONLY)==<br />
{{thumb|ironforge}}<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
#!/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
==Run processes on Log In ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Make your chumby click when you touch the screen=<br />
{{thumb|ironforge}}<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Mount NFS partitions=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
{{thumb|ironforge}} <br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
{{thumb|ironforge}} <br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
[Note than on the Chumby One, the Trendnet TU-ET100C is discovered by /sbin/udhcpc as "eth0"]<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
'''Rocketfish RF-GWII008''' - The [http://www.rocketfishproducts.com/products/gaming/RF-GWII008.html Rocketfish LAN Adapter for Nintendo Wii] uses the ASIX AX88772 chipset and can be configured simply by adding a new network connection from the control panel. Rocketfish is an internal Best Buy brand and the adapter can be found at most Best Buy stores.<br />
<br />
=Use wifi protected by a capture page=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=Clock overlay=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values, and you must include the "comment" attribute even with an empty value.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
<br />
<event type="FMRadio" value="play" comment="105.3"/> // play the specified station (added in CP 2.8.72)<br />
<event type="FMRadio" value="stop" comment=""/> // stop playing the radio (added in CP 2.8.72)<br />
<event type="FMRadio" value="preset" comment="1"/> // play the specified preset station, numbered 0 through 3 (added in CP 2.8.72)<br />
<event type="FMRadio" value="scan" comment="up"/> // scan to the next strong station "up" or "down" (added in CP 2.8.72)<br />
<event type="FMRadio" value="tune" comment="105.3"/> // increment ("up") or decrement ("down") the frequency by the local step (added in CP 2.8.72)<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
{{Command|/sbin/ifconfig rausb0 down}}<br />
Enable:<br />
{{Command|/sbin/ifconfig rausb0 up}}<br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
= Other, more complicated customizations =<br />
* [[VolumeChangeWithAccelerometer|Changing the volume using the accelerometer]]<br />
* [[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]<br />
* [[Web Browser]]</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2011-08-11T15:10:03Z<p>Chumby: Undo revision 3130 by Brenda (talk)</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}}<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off <br />
<br />
{{thumb|infocast}}<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quit the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client (Windows users can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY], Mac/Linux users can use <code>ssh</code> from a terminal window), log in as the user '''root''' with no password. e.g. {{Command|ssh 192.168.1.100 -l root}}<br />
* Note: the IP is visible from the Chumby Info screen as well as the hidden Control Panel screen<br />
* You should get a big ASCII chumby logo<br />
<br />
==Enabling a password for SSH - the easy way==<br />
In software version 1.0.7 (at least) the passwd command is built-in. So setting a password should be as easy as mounting the root filesystem read/write (per notes below) and typing<br />
{{Command|passwd root}}<br />
It should be noted that there is another account called "default" which also has no password.<br />
<br />
==Enabling a password for SSH - the hard way==<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model, but for each you will need to connect to your Chumby via SSH.<br />
<br />
=== ...on Ironforge ===<br />
{{thumb|ironforge}}<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
{{Command|mkdir /psp/etc}}<br />
{{Command|cp -rd /etc/* /psp/etc}}<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before<br />
!after<br />
|-<br />
|root::10933:0:99999:7:::<br />
|root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|}<br />
<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
{{Command|mount -t loop -o bind /psp/etc /etc}}<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
<br />
=== ...on Falconwing and Infocast 3.5 ===<br />
{{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
{{Command|mount -o remount,rw /}}<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
{{Command|mount -o remount,ro /}}<br />
<br />
That's it!<br />
<br />
'''Note''': When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
= Music customizations =<br />
<br />
==Streaming from an mp3 server (shoutcast / icecast / etc.)==<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
# Connect to your Chumby via SSH as mentioned above.<br />
# In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
# Enjoy the streaming music.<br />
<br />
* '''To stop playback''' press <code>ctrl+C</code>.<br />
* '''To adjust volume''' run <code>chumby_set_volume '''100'''</code> where the 100 can be 0-100.<br />
* '''Stream pitch too high?''' try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
==Streaming music from SlimServer to chumby==<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or two and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
==Streaming music from Nicecast==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know the LAN IP address of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
==Streaming music from GNUMP3d==<br />
<br />
See [[GNUMP3d]].<br />
<br />
==Streaming XM Satellite Radio==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
==Streaming SIRIUS Satellite Radio==<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
=== Install uSirius ===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
=== Install TVersity ===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
=== Install XAMPP ===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
=== Downloading the PHP Script ===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download [http://framework.zend.com/download the Zend Framework], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check some random unreferenced forum thread) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
=== Set up in the Chumby ===<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
==Changing the order of music sources==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Built in web server=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Alarm customizations=<br />
==Custom alarm sounds==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
==Custom alarm actions==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
==Custom alarm ring screen==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
= Boot up, default screen, control panel customizations =<br />
==Customizing the opening animation==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
== Your own splash screens ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
=== Bootloader Screens ===<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
=== Kernel Screen ===<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
=== Init Script Screen ===<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
==Using a custom Control Panel==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
= Scheduled tasks, auto-execution of tasks =<br />
== Launching sshd at startup ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
==Entering Night Mode Automatically==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1<br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
<br />
'''Additional Note:''' You can make Chumby enter Night Mode automatically without resorting to this trick, at least as of firmware 1.0.7. You can create a custom alarm that has no sound, but has an action set to enter Night Mode. Be aware that if you have any other alarms (possibly silent) that trigger after that, the Chumby will come out of night mode.<br />
<br />
'''Crontab Note:''' crontab is broken in the November, 2010 update with incorrect path and file permissions. The simplest fix is to edit with 'crontab -c /psp/crontabs -e'. You may also need to change the ownership of /psp/crontabs/root from chumby:chumby to root:root; do this with 'chown root:root /psp/crontabs/root'. For more details see http://forum.chumby.com/viewtopic.php?id=5673<br />
<br />
==Run processes on start-up==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be placed either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
==Running something at boot without debugchumby (IronForge Chumby Classic ONLY)==<br />
{{thumb|ironforge}}<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
#!/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
==Run processes on Log In ==<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Make your chumby click when you touch the screen=<br />
{{thumb|ironforge}}<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Mount NFS partitions=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
{{thumb|ironforge}} <br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
{{thumb|ironforge}} <br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
[Note than on the Chumby One, the Trendnet TU-ET100C is discovered by /sbin/udhcpc as "eth0"]<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
'''Rocketfish RF-GWII008''' - The [http://www.rocketfishproducts.com/products/gaming/RF-GWII008.html Rocketfish LAN Adapter for Nintendo Wii] uses the ASIX AX88772 chipset and can be configured simply by adding a new network connection from the control panel. Rocketfish is an internal Best Buy brand and the adapter can be found at most Best Buy stores.<br />
<br />
=Use wifi protected by a capture page=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast}} {{thumb|infocast3.5}} <br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=Clock overlay=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values, and you must include the "comment" attribute even with an empty value.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
<br />
<event type="FMRadio" value="play" comment="105.3"/> // play the specified station (added in CP 2.8.72)<br />
<event type="FMRadio" value="stop" comment=""/> // stop playing the radio (added in CP 2.8.72)<br />
<event type="FMRadio" value="preset" comment="1"/> // play the specified preset station, numbered 0 through 3 (added in CP 2.8.72)<br />
<event type="FMRadio" value="scan" comment="up"/> // scan to the next strong station "up" or "down" (added in CP 2.8.72)<br />
<event type="FMRadio" value="tune" comment="105.3"/> // increment ("up") or decrement ("down") the frequency by the local step (added in CP 2.8.72)<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
{{thumb|ironforge}} {{thumb|falconwing}} {{thumb|infocast3.5}} <br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
{{Command|/sbin/ifconfig rausb0 down}}<br />
Enable:<br />
{{Command|/sbin/ifconfig rausb0 up}}<br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
= Other, more complicated customizations =<br />
* [[VolumeChangeWithAccelerometer|Changing the volume using the accelerometer]]<br />
* [[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]][http://www.casinoenligne555.org/|casino]<br />
* [[Web Browser]]</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2011-07-22T23:33:30Z<p>Chumby: /* Chumby devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
| Chumby8<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
| https://lh6.googleusercontent.com/-yYuYncwE3b8/TinzW0G1zCI/AAAAAAAAADM/GVWag1DNhJw/silvermoon.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
| Codename: Opus/Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128 MB DDR2 SDRAM<br />
<br />
800x600 touchscreen<br />
<br />
Integrated speakers (mono or stereo option)<br />
<br />
Headphone/line output<br />
<br />
8.7" widex 6.75" tall x 5.5" deep<br />
<br />
Microphone input<br />
<br />
+5V, 2.5A input<br />
<br />
802.11 b/g WiFi<br />
<br />
1 USB 2.0 HS port<br />
<br />
Dimmable backlight<br />
<br />
CompactFlash, MMC and SD support<br />
<br />
2 USB 2.0 ports<br />
<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Insignia Infocast 8"<br />
| Insignia Infocast 3.5"<br />
| chumby for Android<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast3.5.jpg<br />
| https://lh4.googleusercontent.com/-AkP7fxO6Sf4/Tin0eIFG7xI/AAAAAAAAADY/AuMqgJDqVeM/android.png<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
| Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio<br />
| [http://www.chumby.com/pages/android More information]<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-11-30T23:03:54Z<p>Chumby: /* Sending events to the Control Panel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
{{Command|ssh 192.168.1.100 -l root}}<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
{{Command|mount -t loop -o bind /psp/etc /etc}}<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
{{Command|mount -o remount,rw /}}<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
{{Command|mount -o remount,ro /}}<br />
<br />
That's it!<br />
<br />
'''Note''': When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
'''Further note''': It appears that in software version 1.0.7 (at least) the passwd command is built-in. So setting a password should be as easy as mounting the root filesystem read/write (as above) and then just typing "passwd root". It should be noted that there is another account called "default" which also has no password.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values, and you must include the "comment" attribute even with an empty value.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
<br />
<event type="FMRadio" value="play" comment="105.3"/> // play the specified station (added in CP 2.8.72)<br />
<event type="FMRadio" value="stop" comment=""/> // stop playing the radio (added in CP 2.8.72)<br />
<event type="FMRadio" value="preset" comment="1"/> // play the specified preset station, numbered 0 through 3 (added in CP 2.8.72)<br />
<event type="FMRadio" value="scan" comment="up"/> // scan to the next strong station "up" or "down" (added in CP 2.8.72)<br />
<event type="FMRadio" value="tune" comment="105.3"/> // increment ("up") or decrement ("down") the frequency by the local step (added in CP 2.8.72)<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
{{Command|/sbin/ifconfig rausb0 down}}<br />
Enable:<br />
{{Command|/sbin/ifconfig rausb0 up}}<br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
<br />
'''Additional Note:''' You can make Chumby enter Night Mode automatically without resorting to this trick, at least as of firmware 1.0.7. You can create a custom alarm that has no sound, but has an action set to enter Night Mode. Be aware that if you have any other alarms (possibly silent) that trigger after that, the Chumby will come out of night mode.<br />
<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-11-30T23:01:15Z<p>Chumby: /* Sending events to the Control Panel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
{{Command|ssh 192.168.1.100 -l root}}<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
{{Command|mount -t loop -o bind /psp/etc /etc}}<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
{{Command|openssl passwd -1}}<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
{{Command|mount -o remount,rw /}}<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
{{Command|mount -o remount,ro /}}<br />
<br />
That's it!<br />
<br />
'''Note''': When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
'''Further note''': It appears that in software version 1.0.7 (at least) the passwd command is built-in. So setting a password should be as easy as mounting the root filesystem read/write (as above) and then just typing "passwd root". It should be noted that there is another account called "default" which also has no password.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
<br />
<event type="FMRadio" value="play" comment="105.3"/> // play the specified station (added in CP 2.8.72)<br />
<event type="FMRadio" value="stop" comment=""/> // stop playing the radio (added in CP 2.8.72)<br />
<event type="FMRadio" value="preset" comment="1"/> // play the specified preset station, numbered 0 through 3 (added in CP 2.8.72)<br />
<event type="FMRadio" value="scan" comment="up"/> // scan to the next strong station "up" or "down" (added in CP 2.8.72)<br />
<event type="FMRadio" value="tune" comment="105.3"/> // increment ("up") or decrement ("down") the frequency by the local step (added in CP 2.8.72)<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
{{Command|/sbin/ifconfig rausb0 down}}<br />
Enable:<br />
{{Command|/sbin/ifconfig rausb0 up}}<br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
<br />
'''Additional Note:''' You can make Chumby enter Night Mode automatically without resorting to this trick, at least as of firmware 1.0.7. You can create a custom alarm that has no sound, but has an action set to enter Night Mode. Be aware that if you have any other alarms (possibly silent) that trigger after that, the Chumby will come out of night mode.<br />
<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:44:48Z<p>Chumby: /* Entering Night Mode Automatically */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:44:32Z<p>Chumby: /* Changing the order of music sources */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:44:25Z<p>Chumby: /* Custom alarm ring screen */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:44:09Z<p>Chumby: /* Enabling and disabling the wireless connection */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:44:01Z<p>Chumby: /* Setting up an adhoc wifi network */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:43:53Z<p>Chumby: /* Sending events to the Control Panel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:43:44Z<p>Chumby: /* Clock overlay */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:43:35Z<p>Chumby: /* SSH with a password */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:43:11Z<p>Chumby: /* Configure your chumby to connect wirelessly through a Macintosh laptop */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:43:00Z<p>Chumby: /* Using a browser to see what's on your chumby */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:42:30Z<p>Chumby: /* Initiating a channel change */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:42:21Z<p>Chumby: /* Mixing local widgets into a channel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:42:13Z<p>Chumby: /* Use wifi protected by a capture page */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:42:05Z<p>Chumby: /* Mount NFS partitions */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:58Z<p>Chumby: /* Run processes on Log In */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:43Z<p>Chumby: /* Run processes on start-up */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:35Z<p>Chumby: /* Launching sshd at startup */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:27Z<p>Chumby: /* Your own Control Panel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:17Z<p>Chumby: /* Your own splash screens */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:10Z<p>Chumby: /* Your own opening animation */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:41:02Z<p>Chumby: /* Custom alarm actions */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:40:51Z<p>Chumby: /* Custom alarm sounds */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:40:44Z<p>Chumby: /* Built in web server */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:40:30Z<p>Chumby: /* Streaming XM Satellite Radio */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:40:19Z<p>Chumby: /* Streaming music from Nicecast */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:40:02Z<p>Chumby: /* Open a secure shell (SSH) console on the chumby */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-10-28T20:39:44Z<p>Chumby: /* Hidden screen in Control Panel */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast3.5_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
'''Kensington K33929EU USB Mini Dock with Ethernet''' [http://eu.kensington.com/kensington/en/gb/p/553/K33929EU/usb+mini+dock+with+ethernet.aspx] works perfectly with my chumby one. I didn't use any of the methods above, I just configured a new connection using the control panel.<br />
<br />
I'd previously borrowed a friend's unbranded version (physically identical except that the colours of the plastics were reversed). In both cases the Ethernet chipset is reported as "ASIX AX88772".<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use openssl:<br />
openssl passwd -1<br />
The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:<br />
Password:<br />
Veriying - Password:<br />
<DISPLAYED_HASH><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)<br />
=[[Connect through 3G|Connect through a 3G USB modem (and share it via wifi)]]=<br />
=[[Web Browser]]=</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-10-28T20:38:29Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Insignia Infocast 8"<br />
| Insignia Infocast 3.5"<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast3.5.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
| Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-07-27T19:10:18Z<p>Chumby: /* Changing the order of music sources */</p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use htpasswd on a system with apache-utils (or similar package):<br />
htpasswd -nm root<br />
The -n creates a new password, the -m means md5, and root is the username to put in the file. It will look like this:<br />
New password:<br />
Re-type new password:<br />
root:<HASH HERE><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. Some htpasswd versions generate the seed as $apr1$abcdefgh$, which is not acceptable in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use htpasswd on a system with apache-utils (or similar package):<br />
htpasswd -nm root<br />
The -n creates a new password, the -m means md5, and root is the username to put in the file. It will look like this:<br />
New password:<br />
Re-type new password:<br />
root:<HASH HERE><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. Some htpasswd versions generate the seed as $apr1$abcdefgh$, which is not acceptable in the chumby shadow file. You cannot simply remove the "apr" from the hash -- you must find a version of htpasswd that generates hashes that do not start with $apr1$, or manually pick your own md5 salt in the form <code>$1$RaNdmStf$</code> and enter it into an MD5 password hasher [http://sherylcanter.com/encrypt.php like this one].<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)</div>Chumby//wiki.chumby.com/index.php?title=Chumby_tricksChumby tricks2010-06-21T00:08:18Z<p>Chumby: </p>
<hr />
<div>'''NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see [[Chumby Tricks for Foo/Katamari]]'''<br />
<br />
'''NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!'''<br />
<br />
Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend [http://www.editpadpro.com/ EditPad Pro].<br />
<br />
The chumby also has a lightweight version of [http://en.wikipedia.org/wiki/Vi vi] built in.<br />
<br />
=Hidden screen in Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
* Open the Control Panel, select "Settings", then "Chumby Info"<br />
* In the upper right, you'll see a little "pi" symbol - touch it<br />
* You'll see a screen with some interesting buttons:<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** FILES will open up a simple file system browser<br />
** REBOOT will reboot the chumby device<br />
** FB CGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** OFF will turn chumby off<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
* Open the Control Panel<br />
* Tap the "Insignia" logo in the upper left<br />
* Tap the "pi" symbol in the upper right of the gray area<br />
* You'll see a screen with many buttons<br />
** SSHD will launch the builtin Secure Shell Daemon<br />
** QUIT will quite the Flash Player<br />
** REBOOT will reboot the chumby device<br />
** FBCGI - Enable to access frame buffer (/dev/fb content) via cgi<br />
** XHAIRS will turn on a small crosshairs cursor<br />
** OFF will turn chumby off<br />
** REPAIR SAFE MODE will allow recovery of the Special Options mode from USB<br />
** DEL PHOTO CACHE will clear the internal cache of photos<br />
** DEL THUMB CACHE will clear the internal cache of photo thumbnails<br />
** DEL STORED PHOTOS will clear the photos stored internally<br />
** DEL STORED VIDEOS will clear the videos stored internally<br />
<br />
=Open a secure shell (SSH) console on the chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* Start <code>sshd</code> using the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]]<br />
* Using an SSH client, log in:<br />
** For Microsoft Windows, you can use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].<br />
** For MacOS X and Linux, use the command <code>ssh</code> from a terminal window<br />
* Use the IP listed on the [[Chumby_tricks#Hidden_screen_in_Control_Panel|hidden Control Panel screen]] with the username "root". It will not require a password. For instance, if your chumby has the IP <code>192.168.1.100</code>, on Linux or Mac, the command would be:<br />
ssh 192.168.1.100 -l root<br />
* You should get a big ASCII chumby logo<br />
<br />
=Listening to Internet Radio Stations=<br />
'''NOTE: this functionality is now available in the Control Panel, under Music->My Streams'''<br />
<br />
* Connect to your Chumby via SSH as mentioned above.<br />
* In your command line, enter <code>btplay http://internet.radio.station.url:port/stream.mp3 </code> and press return. Be sure to replace the address with the complete address of the internet radio station.<br />
* You can also use the radiogizmo.org database if you don't know the URL of the stream. For example, this tunes into wfmu: <code>btplay http://radiogizmo.org/wfmu</code>. This tunes into a random station: <code>btplay http://radiogizmo.org/wfmu</code>. You can see what stations are in the database by going to radiogizmo.org. <br />
* Enjoy the streaming music.<br />
* To stop playback, simply press <code>ctrl+C</code>.<br />
* You can control volume with <code>chumby_set_volume 100</code>, where the 100 can be any number between 0 (mute) and 100 (full volume).<br />
* Got Chipmunk syndrome? (audio plays too fast) try <code> btplay --output=alsa:plug:dmixer http://internet.radio.station.url:port/stream.mp3 </code><br />
<br />
=Streaming music from SlimServer to chumby=<br />
<br />
'''(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)'''<br />
<br />
Stream music from your computer to your chumby using SlimServer!<br />
<br />
* Download and install SlimServer <code>http://www.slimdevices.com/su_downloads.html</code> on your computer.<br />
* 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).<br />
* Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")<br />
#!/bin/sh<br />
btplay http://ip.of.your.server:9000/stream.mp3 &<br />
* Verify the IP address is the IP address of the computer that SlimServer is running on.<br />
* Save the file to a USB flash drive, insert into your chumby, and reboot.<br />
* Play your music via the SlimServer web interface, and music should play through the chumby's speakers.<br />
* Enjoy!<br />
<br />
<br />
<br />
Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:<br />
<br />
First steps before you ever go near the Chumby:<br />
<br />
*Download and Install Slimserver<br />
*After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)<br />
*Wait a moment or twom and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).<br />
*I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.<br />
<br />
'''To find the IP address of your Mac:'''<br />
I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.<br />
<br />
On the Chumby:<br />
*Go to control panel<br />
*Go to Music<br />
*Go to My Streams<br />
*Set up a new stream<br />
*Enter the URL: http://the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3<br />
*The type of stream is an mp3<br />
<br />
On your Mac:<br />
*Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again<br />
*Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"<br />
<br />
=Streaming music from Nicecast=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
[http://rogueamoeba.com/nicecast/ Nicecast] is a music broadcast system for the Apple Macintosh published by [http://rogueamoeba.com/ Rogue Amoeba]. To stream music from that program to your chumby, try the following steps:<br />
<br />
* Start the Nicecast application on your host machine<br />
* Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes<br />
* Open the "Nicecast Server" window from the "Window" menu.<br />
* Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields<br />
* On the chumby, select "Music", then "My Music Streams".<br />
* Hit the "New" button.<br />
* Tap the "URL" text block(should say "http://")<br />
* Enter the string [http://address:port http://address:port number] substituting the address and port number from step 4 above, then press the enter key on the lower right<br />
* Set the name of the stream to "Nicecast", if you like<br />
* Tap "DONE"<br />
* Select the item in the list of streams, then hit the play button.<br />
<br />
You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know to LAN IP of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.<br />
<br />
=Streaming music from GNUMP3d=<br />
<br />
See [[GNUMP3d]].<br />
<br />
=Streaming XM Satellite Radio=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
To stream XM Radio to your chumby, you will need a couple pieces of software: [http://www.millardsoftware.com/uxm/ uXM] & [http://tversity.com/home/ TVersity]. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with [http://www.millardsoftware.com/content/usirius-10-release-candidate-7/ uSirius].<br />
<br />
'''TVersity'''<br />
*Download and install TVersity (it installs as a service on your machine)<br />
*It should start running as a service after you install it, if not select Advanced->Start Sharing<br />
*Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.<br />
*Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.<br />
*Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.<br />
*Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.<br />
<br />
'''uXM'''<br />
*Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.<br />
*Click Settings...Enter your XM Subscription login information and click OK.<br />
*Click Start<br />
*Click URLs<br />
*Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.<br />
*Go to TVersity and click the "Sharing" Tab.<br />
*Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...<br />
*Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")<br />
*Select the Advanced button and make sure the Transcode is set to Always" Click Submit<br />
<br />
''OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.''<br />
*Use firefox or other RSS Reader. In firefox go to the TVersity server (http://ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).<br />
*Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"<br />
*Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).<br />
*Copy the link location (the URL) of the channel you want (XM 8 - The 80s)<br />
*You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a [http://tinyurl.com/ TinyURL].<br />
*Go to your chumby and access the My Streams feature.<br />
*Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.<br />
*Push play and you should be hearing XM streamed to your Chumby.<br />
*Repeat for your other streams.<br />
<br />
=Streaming SIRIUS Satellite Radio=<br />
<br />
With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to [http://forum.chumby.com/viewtopic.php?pid=14403#p14403 this forum thread].<br />
<br />
Here's the software you'll need to make it work:<br />
*[http://www.millardsoftware.com/usirius/ uSirius] (for generating audio streams from Sirius)<br />
*[http://tversity.com/home/ TVersity] (for converting the streams into streaming MP3s)<br />
*[http://www.apachefriends.org/en/xampp-windows.html XAMPP for Windows] (for creating easy station URLs for Chumby to use)<br />
<br />
Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.<br />
<br />
'''Note:''' An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.<br />
<br />
==Step 1: Install uSirius and TVersity==<br />
===Installing uSirius===<br />
*Download and install uSirius from the link above.<br />
*Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.<br />
*If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.<br />
*Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.<br />
<br />
===Installing TVersity===<br />
*Download and install TVersity from the link above.<br />
*TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".<br />
*Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".<br />
*Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".<br />
<br />
==Step 2: Install XAMPP and the PHP Script==<br />
===Installing XAMPP===<br />
*Download and install XAMPP from the link above.<br />
*When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.<br />
*You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.<br />
*From the same computer, check to make sure this page works: http://localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.<br />
<br />
===Downloading the PHP Script===<br />
*The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework from [http://framework.zend.com/download this page], unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.<br />
*Download this PHP file (check the forum thread for now) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.<br />
<br />
==Step 3: Setting up the Chumby==<br />
*Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".<br />
*To add a new SIRIUS station, click "New".<br />
*For the URL, enter: http://your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).<br />
*Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.<br />
*Repeat the steps above for each new SIRIUS station.<br />
<br />
=Built in web server=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), 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 <code>http://ip.of.the.chumby/</code> into a browser.<br />
You can see the network statistics from <code>http://ip.of.the.chumby/cgi-bin/wifi</code> and you can see memory statistics from <code>http://ip.of.the.chumby/cgi-bin/memstats</code>. <br />
<br />
You can add CGI scripts to this webserver:<br />
* Open a console on the chumby using SSH<br />
* create a directory at <code>/psp/cgi-bin</code><br />
* add your CGI scripts there<br />
* Make sure CGI scripts have execute permissions (chmod +x ''script_Name'')<br />
You can now access those scripts using the URL <code>http://ip.of.the.chumby/cgi-bin/custom/name_of_your_script</code><br />
<br />
<br />
For a more complete web server, see [[Chumby as a web server]].<br />
<br />
=Custom alarm sounds=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files<br />
* Get a USB flash drive, and copy your MP3 file to the top level<br />
* To override alarm 1, rename the file <code>alarm1.mp3</code><br />
* To override alarm 2, rename the file <code>alarm2.mp3</code><br />
* ...or to override both, rename the file <code>alarm.mp3</code> - the individual files will override this one.<br />
* 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<br />
<br />
Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as <code>alarmmon.mp3</code>, <code>alarmtue.mp3</code>, etc.<br />
<br />
=Custom alarm actions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm fires off, the Control Panel will look for script <code>/mnt/usb/post_alarm_action_N</code> where N is a one-based index of the alarm. If not present, looks for <code>/mnt/usb/post_alarm_action</code>. If either present, it will be executed when the corresponding alarm is stopped by the user.<br />
<br />
=Your own opening animation=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
If you'd like to replace the little chumby animation that happens when you start up, do the following:<br />
* Make your Flash animation that you want to run, be sure it calls <code>fscommand("quit")</code> at the end<br />
* Put it on a USB flash drive, and call it "opening.swf"<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Your own splash screens=<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
During a normal boot, before the opening animation, the chumby displays a series of four images on the screen. The first two are displayed by the bootloader and are fairly easy to modify. The third is displayed by the kernel (and normally identical to the bootloader's 2nd image) and requires recompiling the kernel. The final is displayed by the init script (/etc/init.d/rcS) and is easy to modify on a Chumby One, but maybe not on a Classic.<br />
<br />
'''WARNING''': These all involve modifying parts of your Chumby that aren't really intended to be modified. Do all of this at your own risk.<br />
<br />
'''Bootloader Screens'''<br />
<br />
The bootloader's two normal splashscreens are stored in named sections in the configuration block. To replace the first one with the image splash.png which you've placed in /mnt/storage or /mnt/usb do this:<br />
<br />
<pre><br />
cd /mnt/storage or /mnt/usb<br />
stop_control_panel<br />
config_util --cmd=getblock --block=img1 > img1.bin.bak<br />
imgtool --mode=draw splash1.png<br />
dd if=/dev/fb0 of=splash.bin bs=640 count=240<br />
config_util --cmd=putblock --block=img1 < splash.bin <br />
</pre><br />
to restore:<br />
<pre><br />
config_util --cmd=putblock --block=img1 < img1.bin.bak <br />
</pre><br />
<br />
Note that I stop the control panel to prevent it from drawing anything to the frame buffer since we're using the frame buffer to convert the image. Another option is to switch to and STAY the default clock widget, which only redraws once a minute. The last four commands:<br />
# back up the existing splash screen<br />
# draw your new image onto the screen, converting it into the right format in the process<br />
# pull the converted image out of the frame buffer<br />
# save the converted image into to config block<br />
<br />
For the second screen, do the same process but replace all the "img1"s with "img2"<br />
<br />
'''Kernel Screen'''<br />
<br />
This one is a pain and requires [[Hacking Linux for chumby|building an entire new kernel]]. I won't cover that part, but if you already are building a kernel, you can change the splash screen it displays by:<br />
# convert the image to the framebuffer format using steps <tt>imgtool</tt> and <tt>dd</tt> as above and copy splash.bin into your linux source directory<br />
# in the linux source directory, do <tt>scripts/bin2c &lt;splash.bin >splash.c</tt><br />
# back up include/chumby_boot_logo_2.h somewhere<br />
# replace the very long string in <tt>include/chumby_boot_logo_2.h</tt> with the body of splash.c<br />
<br />
Compile, install and reboot and you should now have a new 3rd splash screen.<br />
<br />
'''Init Script Screen'''<br />
<br />
This is the easiest of all on a Chumby One. Dunno about a Classic, never worked with one. <br />
# compress your image to a 320x240 baseline (non-progressive) JPEG<br />
# get it onto the chumby (referred to below as /mnt/storage/splash.jpg)<br />
# ssh to the chumby<br />
# test that your image can be displayed with <tt>imgtool --mode=draw /mnt/storage/splash.jpg</tt><br />
# remount the root partition as read/write: <tt>mount -o remount,rw /</tt><br />
# back up current splash screen <tt>cp /bitmap/320x240/chumby_logo.bin.jpg /mnt/storage/chumby_logo.bin.jpg</tt><br />
# copy your new image on top of the current one: <tt>cp /mnt/storage/splash.jpg /bitmap/320x240/chumby_logo.bin.jpg</tt><br />
# <tt>reboot</tt> to see changes and get the root partition back read-only<br />
<br />
=Your own Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
So, you're so ambitious, you created you *own* Control Panel! Congratulations! Here's how to use it:<br />
* Put it on USB flash drive, and call it <code>controlpanel.swf</code><br />
* Plug it into the back of your chumby and reboot!<br />
<br />
If you have an older software release you can do something similar with a USB dongle, with the file <code>[[debugchumby]]</code> containing:<br />
<br />
#!/bin/sh<br />
chumbyflashplayer.x -i /mnt/usb/controlpanel.swf<br />
<br />
To keep the watchdog timer from restarting the Control Panel, you'll need to write a "1" to the file "/tmp/movieheartbeat" every 15 seconds:<br />
<pre><br />
_putFile = _global.ASnative(5,51); <br />
_putFile("/tmp/movieheartbeat","1");<br />
</pre><br />
<br />
=Launching sshd at startup=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
'''WARNING - doing this will reduce the level of security on your chumby, and may allow unauthorized access'''<br />
* Open up a console on the chumby<br />
* At the console, type: <code>touch /psp/start_sshd</code><br />
* Now <code>sshd</code> will be started whenever the chumby successfully connects to a network!<br />
* To stop this behavior in the future, type: <code>rm /psp/start_sshd</code><br />
<br />
If you don't want to happen all the time, you can do this instead from a USB flash drive:<br />
* On the USB flash drive, create an empty file called <code>start_sshd</code>.<br />
* Plug it into the back of your chumby and reboot!<br />
<br />
=Make your chumby click when you touch the screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''NOTE: This feature has been added to the Control Panel on the Settings->Volume screen'''<br />
<br />
You can have the chumby give you some simple audio feedback when you touch the screen<br />
* Open up a console on the chumby<br />
* Type <code>echo 1 > /proc/chumby/touchscreen/touchclick</code><br />
* To turn it off, type <code>echo 0 > /proc/chumby/touchscreen/touchclick</code><br />
<br />
=Run processes on start-up=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* The easiest and safest way to do this is to use a USB drive: create a file called <code>[[debugchumby]]</code> and put shell script commands in there. This will run on start-up.<br />
* ''userhook0'', ''userhook1'', ''userhook2'' can also be used to run custom commands on start-up<br />
** these files can be places either on USB drive (/usb/ root) or Internal Storage (/psp/rfs1/)<br />
** See: [[Chumby Rootdisk - RFS1 (analyzed)]] for exact boot script timing call points<br />
<br />
=Running something at boot without debugchumby (IronForge Chumby Classic ONLY)=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: You can really screw up the boot procedure with this trick, please only do so if you're familiar with linux and editing linux shell scripts'''''<br />
<br />
In the /etc/init.d/rcS script which is run at boot, there is a line that looks for /psp/rfs1/rcS and runs it, but then quits. The fact that it quits is the reason you can screw something up here. If you don't run the rest of the things that /etc/init.d/rcS usually does after looking for this file, you will have only completed a small portion of the chumby boot sequence.<br />
<br />
To do this trick, edit a file /psp/rfs1/rcS and paste in the contents of rcS from it's invocation of /psp/rfs1/rcS on. On a 565 Ironforge one, the first lines you need to copy is:<br />
echo "Starting udevd as daemon"<br />
/sbin/udevd --daemon<br />
Make sure this newly created file starts with a she-bang for the interpreter:<br />
!#/bin/sh<br />
Also make sure it is executable:<br />
chmod a+x /psp/rfs1/rcS<br />
Then, you can edit the rest of this file and insert your own commands.<br />
<br />
If you do manage to screw up your system with this, you can recover it by creating a debugchumby script that does:<br />
<br />
#!/bin/sh<br />
rm /psp/rfs1/rcS<br />
<br />
...and booting into "special options" mode, aka "rfs2". Booting into special options mode is done by powering down your chumby and powering it up again while pressing a finger to the touch screen. <br />
<br />
This will remove the script, which is only run when in normal mode, aka "rfs1". You should then be able to reboot into normal mode.<br />
<br />
'''''NOTE:''''' Not much trickery is needed with a Chumby One since the rootfs can be mounted read-write and edited live.<br />
<br />
=Run processes on Log In =<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
* If you want to run commands as soon as you log in, you can edit your /psp/.profile file.<br />
* You should probably first make a backup copy of the original: <code>cp /psp/.profile /psp/.profile.orig</code><br />
* Next, edit /psp/.profile using the vi editor (I believe this is the only text editor installed on the chumby): <code>vi /psp/.profile</code><br />
* Add whatever commands (try the chumby click echo command).<br />
* After rebooting, these commands should run upon logging into the console.<br />
<br />
=Mount NFS partitions=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
In order to NFS mount a remote filesystem from chumby, do the following:<br />
<pre><br />
# mount -t nfs -o nolock 192.168.1.115:/root/chumby /mnt/nfs<br />
</pre><br />
Example:<br />
<pre>mount -t nfs -o nolock 192.168.1.101:/root /mnt/nfs</pre><br />
<br />
=Screwed up your touchscreen calibration?=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
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:<br />
136,3768,3835,-3540<br />
...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.<br />
<br />
=Use wired Ethernet=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
'''''NOTE: Ethernet support is built into firmware version 1.7 and later'''''<br />
<br />
'''There are two known-to-work USB-to-Ethernet adapters, the Linksys USB200M and a Trendnet TU-ET100C. Both configurations are shown here.'''<br />
<br />
* create a '''[[debugchumby]]''' file with the following contents, depending on your USB adapter:<br />
<br />
'''Linksys USB200M''' - This has only been tested with the [http://www.amazon.com/Linksys-USB200M-EtherFast-Network-Adapter/dp/B000085ZKV Linksys USB200M] USB Ethernet adapter, though it *may* work with others. Also note that this example only describes how to connect using DHCP.<br />
<br />
<pre><br />
#!/bin/sh<br />
insmod /drivers/usbnet.ko<br />
insmod /drivers/asix.ko<br />
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0<br />
ifconfig rausb0 inet 127.0.0.1<br />
/usr/chumby/scripts/sync_time.sh<br />
</pre><br />
<br />
'''Trendnet TU-ET100C''' - The following is tested and known to work with a [http://www.amazon.com/gp/product/B0000CDZ82 Trendnet USB 1.1 10/100 USB dongle, model TU-ET100C], H/W:C3.2 for a minimal get-it-going [[debugchumby]] file. (add more options like sync_time as necessary). The Chumby's OS/Kernel already has the necessary drivers installed and enabled for this device.<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/udhcpc<br />
ifconfig rausb0 127.0.0.1<br />
</pre><br />
<br />
* copy the '''[[debugchumby]]''' script to a USB drive<br />
* insert the USB Ethernet adapter (Linksys USB200M or Trendnet ET100C) into a chumby USB port<br />
* insert the USB drive into the other chumby USB port<br />
* power on your chumby<br />
<br />
'''AirLink101 ASOHOUSB''' - The <br />
[http://www.airlink101.com/products/asohousb.php AirLink101 USB 2.0 USB dongle, model ASOHOUSB] works well with the drivers that are already installed in the Chumby's OS/Kernel. To use, follow the same set up instructions as listed above for the Trendnet usb adapter.<br />
<br />
=Use wifi protected by a capture page=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Many corporate guest wifi networks, mall hotspots, etc. have a capture page-style wifi login; the wifi is unprotected via WPA or WEP, but requires a form to be filled out (email address often), and a "I agree" or "Login" style button to be pressed to send in the form. Here's how I got one of these to work. <br />
<br />
'''Note:''' there is no one-size-fits-all solution here. Different pages have different parameters, and different wifi networks have different ESSIDs. Everything has to be customized...but you can make it work with a little effort.<br />
<br />
Prerequisites: two things. <br />
<br />
1. You need to know the ESSID (the name) of the wifi network you'll be connecting to. You can determine this with a wifi-enabled PC, or with the chumby itself.<br />
2. You need to review the HTML of the login form (probably with a laptop), and determine what to POST to it. HTML knowledge helps alot here. You'll be looking for the '''<form>''' element of the page, to determine where the form gets sent, and what fields are required. <br />
<br />
'''Note:''' Sometimes required fields are hidden, so you can't rely on just looking at the rendered page...you need to review the HTML directly. The form values get added to the curl call in the script below in the format -d "fieldname=fieldvalue"<br />
<br />
* create a '''debugchumby''' file. Here's one that worked for me, and I'll comment below<br />
<pre><br />
#!/bin/sh<br />
# bind to wifi network...replace "mysid" with the ESSID<br />
iwconfig rausb0 essid "mysid"<br />
# DHCP config; should be pretty standard<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# this outputs your IP address from the dhcp connect...you may need it (I did)<br />
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;<br />
fbwrite "$IP"<br />
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)<br />
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://<br />
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;<br />
## if you need further debugging, uncomment the next line<br />
##fbwrite "$OP"<br />
</pre><br />
* copy the '''debugchumby''' script to a USB drive<br />
* insert the USB drive into one of the chumby's USB port<br />
* power on your chumby<br />
<br />
'''Alternate Method'''<br />
*Find your Chumby's MAC address, and use your computer to spoof it (search Google for instructions for your OS) and then register. Then switch the PC back to the original MAC and your Chumby should logon successfully.<br />
*macchanger is a program to do this that exists as a package for ubuntu and other distributions<br />
<br />
=Mixing local widgets into a channel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When the chumby loads a channel from the server, it also checks for a file called '''profile.xml''' on the USB device mounted at '''/mnt/usb'''. That file should contain XML that is merged into the XML coming from the server to create the full channel. An example:<br />
<br />
<profile><br />
<widget_instances><br />
<widget_instance id="1"><br />
<name>My Widget</name><br />
<widget><br />
<name>My Widget</name><br />
<description>This is my widget</description><br />
<version>1.0</version><br />
<mode time="30" mode="timeout"/><br />
<access sendable="false" deleteable="false" access="private" virtualable="false"/><br />
<user username="myusername"/><br />
<thumbnail href="file:////mnt/usb/mythumbnail.jpg" contenttype="image/jpeg"/><br />
<movie href="file:////mnt/usb/mywidget.swf" contenttype="application/x-shockwave-flash"/><br />
</widget><br />
<access access="private"/><br />
<mode time="30" mode="timeout"/><br />
<widget_parameters><br />
<widget_parameter><br />
<name>zipcode</name><br />
<value>90210</value><br />
</widget_parameter><br />
<widget_parameter><br />
<name>phonenumber</name><br />
<value>867-5309</value><br />
</widget_parameter><br />
</widget_parameters><br />
</widget_instance><br />
</widget_instances><br />
</profile><br />
<br />
Replace the fields for '''name''', '''description''', '''thumbnail href''', and '''movie href''' as appropriate. Note that the '''href''' fields can be full URLs to external servers that have appropriate crossdomain security, and that the widgets will have the security sandbox corresponding to those sites, not '''*.chumby.com'''. You can have multiple '''widget_instance''' nodes, however, you should have different values for '''id''' for each one.<br />
<br />
=Initiating a channel change=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Between widgets, the Control Panel monitors the existence of <code>/tmp/change_profile</code> - if present, will attempt to change channels to the channel name in the file. The file is then deleted. This allows external scripts to initiate a channel change.<br />
<br />
You can also [[#Sending events to the Control Panel|send a Control Panel event]]<br />
<br />
=Using a browser to see what's on your chumby=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
The ability to capture the contents of the two frame buffers over HTTP is built into firmware versions 1.6.0 and later.<br />
<br />
This ability can be started via either the command line (ssh), or the control panel.<br />
<br />
== Starting via the command line ==<br />
<br />
/usr/chumby/scripts/fb_cgi.sh<br />
<br />
== Starting via the control panel ==<br />
<br />
# Open the Control Panel, then hit "Settings", then "Chumby Info"<br />
# press the "pi" button in the upper left<br />
# press the "FBCGI" button - this enables the CGI script to capture images<br />
<br />
== Accessing the contents of the frame buffers ==<br />
<br />
Using the IP of the chumby as shown on the "pi" or "Chumby Info" screen, type one the following URLs into a browser on the same network:<br />
<br />
For the "widget" (primary) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb0<br />
For the "Control Panel" (overlay) framebuffer:<br />
http://ip.of.this.chumby/cgi-bin/custom/fb1<br />
<br />
The chumby will respond with a JPEG image. If the chumby is playing widgets, there isn't much to seen in fb1 - it's only Really Useful if you're in the Control Panel itself.<br />
<br />
=Configure your chumby to connect wirelessly through a Macintosh laptop=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/infocast_small.jpg<br />
<br />
===MacOS X Settings===<br />
* Connect your laptop to the internet via wired Ethernet<br />
* Open '''System Preferences'''<br />
* Click '''Sharing'''<br />
* Click the '''Internet''' tab<br />
* In the '''Share your connection from:''' drop-down list, choose '''Built-in Ethernet'''<br />
* Under '''To computers using:''', choose Airport<br />
* Click '''Airport Options'''<br />
* Enter a '''Network Name''' (e.g. chumby)<br />
* Optionally enable WEP encryption by selecting the '''Enable encryption (using WEP)''' checkbox and entering a 40bit (5 char) or 128bit (13 char) WEP password.<br />
'''Note:''' If you enter a WEP password, chumby will need the HEX equivalent of the key. ( e.g. If you enter AAAAA for the password, the WEP HEX key will be 4141414141 )<br />
* Click '''Start'''<br />
<br />
===chumby settings===<br />
* Open the Control Panel<br />
* Click '''Settings'''<br />
* Click '''Network''' <br />
* Select '''create a new connection''' and click OK<br />
* Select the wireless connection that you had previously created (e.g. chumby) and click OK<br />
* If you had previously chosen to enable WEP encryption, enter your WEP key (e.g. 4141414141) and click OK, otherwise go to the next step<br />
* Select '''Manual''' and click OK<br />
* Enter '''10.0.2.10''' for the IP and click OK<br />
* Enter '''255.255.255.0''' for the netmask and click OK<br />
* Enter '''10.0.2.1''' for the network gateway and click OK<br />
* Enter '''10.0.2.1''' for the primary DNS and click OK<br />
* Enter '''10.0.2.1''' for the secondary DNS and click OK<br />
* Click OK on the Confirm settings screen<br />
<br />
=Adding a Virtual Chumby to a Facebook Profile=<br />
* Copy the embedded code for a small Virtual Chumby into your computer's clipboard.<br />
* Log into your Facebook profile and search for the application "Flash Embed." Add it to your Facebook profile.<br />
* Within the Flash Embed application, click the link "Add a new animation to your profile."<br />
* Select the option "Import a Flash 'embed' code," and paste the code from your clipboard into the box. Click the "Add Animation" button to confirm.<br />
* Change the first field labeled Title from "Imported Flash animation" to a heading of your choosing. Something that instructs the viewer to click the image is recommended. You need to do this because when anyone lands on your Facebook profile, the flash animation of your Virtual Chumby does not begin until it is clicked on.<br />
* Change the second field labeled URL from "Could not determine URL!" to <nowiki>"http://www.chumby.com/virtualchumby2.swf"</nowiki>.<br />
* Fill in the Image URL field with a reference to a picture that approximates the actual Virtual Chumby. The URL <nowiki>"http://store.chumby.com/images/products/latte_front.jpg"</nowiki> or similar is recommended.<br />
* Click the "Save Changes" button to confirm.<br />
<br />
=Adding a Virtual Chumby to an iGoogle page=<br />
Add the HTML/Javascript Google Gadget, <br />
<br />
http://www.google.com/ig/directory?hl=e … htmljs.xml <br />
<br />
to your Google page and paste in your Virtual Chumby Code; voila, Virtual Chumby a la Google!<br />
<br />
FWIW, the gadget lets you mail the gadget to contacts; you can include your configuration of the gadget, so that the recipient(s) will see the same content that you see, e.g.:<br />
<br />
http://www.google.com/ig/adde?hl=en&moduleurl=http://chw2054.googlecode.com/svn/trunk/htmljs/htmljs.xml&source=imag&up_title=Chumby&up_editMode=text <br />
<br />
Which is one of my VC's :) Note that this is not the code that you entered in the Gadget.<br />
<br />
=SSH with a password=<br />
By default, the Chumby does not require a password for SSH. The username is <code>root</code>. You can find your Chumby's IP address by pressing the top button and pressing the "Chumby Info" button. Then, from some other computer on the same network as the Chumby, do:<br />
<br />
ssh root@<ip.address.of.chumby><br />
<br />
Replace <code>&lt;ip.address.of.chumby&gt;</code> with your Chumby's IP.<br />
<br />
Instructions for '''enabling password SSH''' differ depending on your Chumby model:<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
<br />
The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:<br />
<br />
Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:<br />
mkdir /psp/etc<br />
cp -rd /etc/* /psp/etc<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use htpasswd on a system with apache-utils (or similar package):<br />
htpasswd -nm root<br />
The -n creates a new password, the -m means md5, and root is the username to put in the file. It will look like this:<br />
New password:<br />
Re-type new password:<br />
root:<HASH HERE><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. Some htpasswd versions generate the seed as $apr1$abcdefgh$, which is not acceptable in the chumby shadow file.<br />
<br />
Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Then simply mount your new writable /etc directory over the old /etc directory:<br />
mount -t loop -o bind /psp/etc /etc<br />
<br />
Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Generate an md5 hash of a password. The easiest way to do this is use htpasswd on a system with apache-utils (or similar package):<br />
htpasswd -nm root<br />
The -n creates a new password, the -m means md5, and root is the username to put in the file. It will look like this:<br />
New password:<br />
Re-type new password:<br />
root:<HASH HERE><br />
<br />
Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. Some htpasswd versions generate the seed as $apr1$abcdefgh$, which is not acceptable in the chumby shadow file. You cannot simply remove the "apr" from the hash -- you must find a version of htpasswd that generates hashes that do not start with $apr1$, or manually pick your own md5 salt in the form <code>$1$RaNdmStf$</code> and enter it into an MD5 password hasher [http://sherylcanter.com/encrypt.php like this one].<br />
<br />
SSH to your chumby and mount your root filesystem as read-write:<br />
mount -o remount,rw /<br />
<br />
Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:<br />
{| border="1"<br />
!before!!after<br />
|-<br />
|root::10933:0:99999:7:::||root:<HASH_GOES_HERE>:10933:0:99999:7:::<br />
|-<br />
|}<br />
Re-mount your root filesystem as read-only:<br />
mount -o remount,ro /<br />
<br />
That's it!<br />
<br />
Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.<br />
<br />
=Clock overlay=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The chumby supports clock overlay when in widget mode - to enable this, create a file "/psp/clockoverlay.xml", of the form:<br />
<br />
<overlay format='%A%n%H:%M:%S' x='10' y='10' width='300' height='100' textsize='32'/><br />
<br />
This puts the overlay in large font in the upper left. You can also use the following which instead will place the clock in much smaller font in the bottom right:<br />
<br />
<overlay format='%A %H:%M:%S' x='185' y='220' width='135' height='24' textsize='16'/><br />
<br />
The "format" attribute uses selectors closely matching the POSIX function [http://opengroup.org/onlinepubs/007908775/xsh/strftime.html strftime()] (the default is "%x %r"):<br />
<br />
<pre><br />
%a - short day name, ie "Mon", "Tue", etc<br />
%A - long day name, ie "Monday", Tuesday", etc<br />
%b - short month name, ie. "Jan", "Feb", etc<br />
%B - long month name, ie. "January", "February", etc<br />
%C - century, ie, "19", "20", etc<br />
%d - day of month, with leading zero fill<br />
%D - %m/%d/%y<br />
%e - day of month, with leading space fill<br />
%F - %y-%m-%d<br />
%g - full year modulo 100<br />
%G - full year<br />
%h - %b<br />
%H - 24 hours with leading zero fill<br />
%I - 12 hours with leading zero fill<br />
%j - zero-based day within year, with leading zero fill<br />
%k - 24 hours with leading space fill<br />
%l - 12 hours with leading space fill<br />
%m - numeric month, with leading zero fill<br />
%M - minutes within hour, with leading zero fill<br />
%n - insert linefeed<br />
%p - AM/PM<br />
%P - am/pm<br />
%r - %I:%M:%S %p<br />
%R - %H:%M<br />
%s - seconds from epoch<br />
%S - seconds within minute<br />
%t - insert tab<br />
%T - %H:%M:%S<br />
%u - numeric day of week (1 through 7)<br />
%w - numeric day of week (0 through 6)<br />
%x - %m/%d/%y<br />
%X - %H:%M:%S<br />
%y - year modulo 100 with leading zero fill<br />
%Y - full year<br />
%z - time zone offset in minutes<br />
%% - insert %<br />
</pre><br />
<br />
=Sending events to the Control Panel=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The Control Panel, starting from version 2.7, supports external events to perform some common useful actions. To send an event, a small fragment of XML is placed in the file "/tmp/flashplayer.event", and the Flash Player is signaled with the command "chumbyflashplayer.x -F1". Note that this particular XML parser is incomplete - you *must* use double quotes to surround the attribute values.<br />
<br />
Supported events (as at Control Panel 2.8.20):<br />
<pre><br />
<event type="WidgetPlayer" value="nextWidget" comment=""/> // switch to the next widget<br />
<event type="WidgetPlayer" value="prevWidget" comment=""/> // switch to the previous widget<br />
<event type="WidgetPlayer" value="reload" comment=""/> // reload the current channel<br />
<event type="WidgetPlayer" value="setChannel" comment="Default"/> // switch to the named channel<br />
<event type="WidgetPlayer" value="setWidget" comment="Surfline Surf Report" /> // name of widget instance, fall back to widget name, skipped if widget not present<br />
<event type="WidgetPlayer" value="shuffle" comment=""/> // shuffles the current channel<br />
<br />
<event type="UserPlayer" value="play" comment="http://path.to.stream"/> // play the URL<br />
<event type="UserPlayer" value="playLoop" comment="/path/to/file"/> // play the file 100,000 times<br />
<br />
<event type="MusicPlayer" value="stop" comment=""/> // stop the current music<br />
<event type="MusicPlayer" value="setVolume" comment="100"/> // set the system volume, 0..100, music must be playing for this to work<br />
<event type="MusicPlayer" value="setMute" comment="on"/> // // set the system mute, "on" = muted, "off" = no muted, music must be playing for this to work<br />
<event type="MusicPlayer" value="setBalance" comment="0"/> // set the system balance, -100..100, music must be playing for this to work<br />
<br />
<event type="AlarmPlayer" value="on" comment="1"/> // enable alarm by index<br />
<event type="AlarmPlayer" value="off" comment="1"/> // disable alarm by index<br />
<event type="AlarmPlayer" value="ring" comment="1"/> // ring alarm by index<br />
<event type="AlarmPlayer" value="snooze" comment=""/> // snooze the currently ringing alarm<br />
<event type="AlarmPlayer" value="stop" comment=""/> // stop the currently ringing alarm<br />
<event type="AlarmPlayer" value="reload" comment="/psp/alarms"/> // reload the alarms file (added in CP 2.8.9)<br />
<br />
<event type="NightMode" value="on" comment=""/> // enter night mode<br />
<event type="NightMode" value="off" comment=""/> // exit night mode<br />
<event type="NightMode" value="dark" comment=""/> // turn off the display (added in CP 2.8.20)<br />
<event type="NightMode" value="dim" comment=""/> // turn the display to dim (added in CP 2.8.20)<br />
<br />
<event type="ScreenManager" value="bright" comment=""/> // set screen to full brightness<br />
<event type="ScreenManager" value="dim" comment=""/> // set screen to dim<br />
<event type="ScreenManager" value="off" comment=""/> // set screen to off<br />
</pre><br />
<br />
A typical use of this mechanism is by external scripts that may want the Control Panel to do things based on some external stimulus. For instance, one could create a simple CGI for the built-in web server to control the device over the Internet.<br />
<br />
The list of the user's channels is written to the file "/tmp/channel_name" - entries in this file can be used with the WidgetPlayer.setChannel event.<br />
<br />
=Setting up an adhoc wifi network=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Copy the following code into a file called '''debugchumby''' and place it on a USB storage drive, insert it into your chumby and boot it up. Be sure to replace '''werd''' with the ssid of your AdHoc network. Note that the script will endlessly attempt to connect to the network until it succeeds.<br />
<pre><br />
#!/bin/sh<br />
<br />
ssid="werd"<br />
<br />
connect()<br />
{<br />
echo "scanning for access points"<br />
/usr/chumby/scripts/ap_scan<br />
echo "attempting to connect to $ssid"<br />
iwpriv rausb0 set NetworkType=Adhoc<br />
iwpriv rausb0 set TxRate=6<br />
iwpriv rausb0 set AdhocOfdm=2<br />
iwpriv rausb0 set AuthMode=OPEN<br />
iwpriv rausb0 set SSID="$ssid"<br />
iwpriv rausb0 set EncrypType=NONE<br />
iwpriv rausb0 set SSID="$ssid"<br />
sleep 10<br />
}<br />
<br />
connect<br />
while [ `iwconfig rausb0|grep ESSID|awk -F: '{print $2}'` != \"$ssid\" ]; do<br />
connect<br />
done<br />
<br />
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0<br />
# if you dont have a dhcp server running, comment the udhcpc line above and uncomment the following one<br />
# ifconfig rausb0 10.10.10.2<br />
<br />
</pre><br />
<br />
=Enabling and disabling the wireless connection=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
The interface network connection can be disabled and enabled via the following commands:<br />
<br />
Disable:<br />
<pre>/sbin/ifconfig rausb0 down</pre><br />
Enable:<br />
<pre>/sbin/ifconfig rausb0 up</pre><br />
<br />
Note: not sure if these physically power down the wireless card<br />
<br />
=Using Chumby with Arduino=<br />
<br />
There's a howto located at https://boconnor.is-a-geek.com/pmwiki/index.php?n=Geek.Chumby for setting up a Chumby with Arduino and using it to build a simple plant moisture sensor. There was a talk about this project given at the March 09 Dorkbot socal and a video is available at http://blog.makezine.com/archive/2009/03/creating_a_plant_sensor_system_with.html.<br />
<br />
=Changing Chumby Volume using Accelerometer=<br />
<br />
See [[VolumeChangeWithAccelerometer]]<br />
<br />
=Custom alarm ring screen=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
When an alarm rings with the dismissal screen active, the users is presented a screen with the current time, and two buttons for stopping and snoozing the alarm.<br />
<br />
Starting with Control Panel 2.8.19, Control Panel supports a "pluggable" alarm ring screen. This is, of course, done in Flash. The Control Panel is looking for the presence of and will load the file "/mnt/usb/alarmring.swf". Upon launch, the movie will have an object on its main timeline called "_chumby_alarm" which has four function properties, "snoozeAlarm()", "stopAlarm()", "stopAlarmWithMusic()", and "resetBackupAlarm()".<br />
<br />
These functions are called with no parameters. The functions stopAlarm() and snoozeAlarm() reproduce the functionality of the two standard buttons. The other two functions are not used by the current screen - stopAlarmWithMusic() is that same as stopAlarm(), except that any music used for the alarm sound (such as streaming Internet radio) is left playing, and resetBackupAlarm() will reschedule the backup alarm for the next alarm rather than the current one.<br />
<br />
In the simplest case, a movie would have two buttons, "snoozeButton" and "stopButton", and the handlers for these buttons would probably be something like:<br />
<pre><br />
this.snoozeButton.onRelease = function() {<br />
this._parent._chumby_alarm.snoozeAlarm();<br />
}<br />
<br />
this.stopButton.onRelease = function() {<br />
this._parent._chumby_alarm.stopAlarm();<br />
}<br />
</pre><br />
<br />
There is example code to crib from here: [http://files.chumby.com/widgetexamples/alarmring.fla FLA] [http://files.chumby.com/widgetexamples/alarmring.swf SWF]<br />
<br />
=Changing the order of music sources=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. The selectors are:<br />
<br />
* '''pandora''' - Pandora<br />
* '''shoutcast''' - SHOUTcast<br />
* '''mediafly''' - Mediafly Podcasts<br />
* '''iheartradio''' - iheartradio<br />
* '''nytpodcasts''' - New York Times Podcasts<br />
* '''chumbcast''' - blue octy radio<br />
* '''sleepcast''' - Sleep Sounds<br />
* '''cbspodcasts''' - CBS Podcasts<br />
* '''internode''' - Internode Radio<br />
* '''noaa''' - NOAA Radio by Wunderground<br />
* '''ipod''' - iPod<br />
* '''directurl''' - My Streams<br />
* '''fmradio''' - FM Radio<br />
* '''slimserver''' - Squeezebox Server<br />
* '''mp3files''' - My Music Files<br />
<br />
For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:<br />
<br />
directurl<br />
pandora<br />
chumbcast<br />
<br />
=Entering Night Mode Automatically=<br />
http://files.chumby.com/wikiimages/deviceimages/ironforge_small.jpg<br />
http://files.chumby.com/wikiimages/deviceimages/falconwing_small.jpg<br />
<br />
ssh root@my.chumby.ip.address<br />
<br />
Create /psp/nightmode.sh with these lines<br />
<br />
<pre>#!/bin/sh<br />
echo '<event type="NightMode" value="on" comment=""/>' > /tmp/flashplayer.event<br />
/usr/bin/chumbyflashplayer.x -F1</pre><br />
<br />
Make /psp/nightmode.sh executable with <br />
<pre>chmod 755 /psp/nightmode.sh</pre><br />
<br />
Then add this to root's crontab with 'crontab -e'<br />
<br />
<pre>0 21 * * * /psp/nightmode.sh</pre><br />
<br />
At 21:00 (9:00PM), your display should enter night mode.<br />
<br />
'''Note:''' If you are in the control panel and playing music, then triggering nightmode will not work, it will show the sleep timer screen so you can set a timer on when the music should turn off. (as if you pressed the nightmode button in the control panel)</div>Chumby//wiki.chumby.com/index.php?title=Development_toolsDevelopment tools2010-06-20T00:01:43Z<p>Chumby: /* Debugging */</p>
<hr />
<div>=Programming languages=<br />
* [[GCC Toolchain]] (3.3.2, Foo/Katamari alpha prototype chumbys)<br/><br />
* [[GNU Toolchain]] (4.3.2, Ironforge production chumbys)<br/><br />
* [[Perl]]<br/><br />
* [[python]]<br/><br />
* [[ruby]]<br/><br />
* [[java]]<br/><br />
* [[lua]]<br/><br />
* [[squeak]]<br/><br />
* [[ocaml]]<br/><br />
* [[Actionscript]]<br/><br />
<br />
<br />
<br />
=Other tools=<br />
* [http://files.chumby.com/tools/nano-ironforge.tgz nano] - unpack to USB dongle.</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-15T00:32:43Z<p>Chumby: /* Chumby devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926EJ-S 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926EJ-S 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-15T00:20:13Z<p>Chumby: /* Chumby devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 2.0 FS port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 FS ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-15T00:19:26Z<p>Chumby: /* Chumby devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 1.0 port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 HS port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-15T00:18:57Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 1.0 port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 HS ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-15T00:18:23Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 1.0 port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell [https://extranet.marvell.com/files/technologies/Marvell_PXA168_Product_Brief.pdf PXA168] ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-13T01:32:11Z<p>Chumby: /* Chumby-enabled devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 1.0 port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell PXA-168 ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
2 USB 2.0 ports<br />
<br />
Slots for CF,SD, SDHC MMC, MS, MS Pro Duo, and xD cards<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Main_PageMain Page2010-06-13T01:30:56Z<p>Chumby: /* Chumby devices */</p>
<hr />
<div><big>'''Welcome to Chumby Wiki!'''</big><br />
<br />
The contents of this wiki are licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribute-Share Alike 3.0] license.<br />
<br />
=Looking for the source code?=<br />
<br />
The chumby device firmware incorporates a substantial amount of software licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPL2)], [http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License version 2.1 (LGPL2)] and other licenses.<br />
<br />
The source code for these software packages can be found [http://files.chumby.com/source here]. This includes both third-party software and software generated by Chumby Industries.<br />
<br />
=Chumby devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Chumby Prototype<br />
| Chumby Classic<br />
| Chumby One<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/katamari.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/ironforge.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/falconwing.jpg<br />
|-<br />
| Codenames: Foo, Katamari<br />
<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
32MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
ambient light sensor<br />
<br />
1 USB 1.0 port<br />
| Codename: Ironforge<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX21 iMX21] ARM926-EJS 350MHz<br />
<br />
64MBRAM, 64MBNAND<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
2x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
variable backlight (3.8 version only)<br />
<br />
3 axis-accelerometer<br />
<br />
2 USB 2.0 ports<br />
| Codename: Falconwing<br />
Freescale [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233 iMX233] ARM926-EJS 454MHz<br />
<br />
64MBRAM, 1GB SDCARD<br />
<br />
320x240x16 TFT with touchscreen<br />
<br />
1x2W speakers, headphone jack<br />
<br />
microphone<br />
<br />
knob on rotary encoder<br />
<br />
3 axis-accelerometer<br />
<br />
1 USB 2.0 port<br />
<br />
variable backlight<br />
<br />
FM Radio, battery support<br />
|}<br />
<br />
=Chumby-enabled devices=<br />
{| class="wikitable" style="text-align:left" border="1" cellspacing="0" cellpadding="2"<br />
|- bgcolor='lightgray'<br />
| Sony dash<br />
| Best Buy Infocast<br />
|-<br />
| http://files.chumby.com/wikiimages/deviceimages/sonydash.jpg<br />
| http://files.chumby.com/wikiimages/deviceimages/infocast.jpg<br />
|-<br />
| [http://sony.com/dash More information]<br />
| Codename: Silvermoon<br />
Marvell PXA-168 ARM9 800MHz<br />
<br />
128MBRAM, 2GB SDCARD<br />
<br />
800x600x24 TFT display with touchscreen<br />
<br />
2x2W speakers, microphone<br />
|}<br />
<br />
=Other sites in the vast Chumby Network=<br />
[http://www.chumby.com Chumby web site]<br/><br />
[http://forum.chumby.com Chumby forums]<br/><br />
[http://chumby.wordpress.com/ Chumby blog]<br/><br />
<br />
=Need help?=<br />
[http://www.chumby.com/help Help]<br/><br />
[[Chumby Flash Tutorials]]<br />
<br />
=Hacking the chumby=<br />
==Fun Stuff==<br />
[[Chumby tricks]] - Easter Eggs galore! Fun tricks and tips for making your chumby do your own thing.<br/><br />
==Widgets==<br />
[[Using existing chumby widgets]]<br/><br />
[[Developing widgets for chumby]]<br/><br />
[[Example Widgets]]<br/><br />
[[Controlling BTplay]]<br/><br />
[[Translating the Control Panel]]<br/><br />
<br />
==Hardware==<br />
[[Hacking hardware for chumby]]<br/><br />
[[USB Flash Drive Compatibility]]<br/><br />
<br />
==Software==<br />
[[GNU Toolchain]]<br/><br />
[[Hacking Linux for chumby]]<br/><br />
[[Chumby Software Applications, Scripts and Tools]]<br/><br />
[[Chumby as a web server]]<br/><br />
[[Chumby as an iPod server]]<br/><br />
[[Chumby and music]]<br/><br />
<br />
==Crafting==<br />
[[Blinging for chumby]]<br/><br />
==Other development==<br />
[[Open Source Flash Development]]<br/><br />
[[Development tools]]<br/><br />
[http://code.google.com/p/chumby/ Alternative interface development for the Chumby]<br />
<br />
=Chumby User Groups=<br />
[http://groups.google.com/group/chumby-user-group http://groups.google.com/groups/img/3nb/groups_bar.gif]<br />
<br />
=The Chumbyista Community=<br />
irc: #chumby on irc.freenode.net and irc.oftc.net<br />
mailing lists?</div>Chumby//wiki.chumby.com/index.php?title=Chumby_Tricks_for_Foo/KatamariChumby Tricks for Foo/Katamari2010-06-12T22:39:14Z<p>Chumby: </p>
<hr />
<div>'''NOTE - this page is for the Foo/Katamari alpha prototypes'''<br />
<br />
http://files.chumby.com/wikiimages/deviceimages/katamari_small.jpg<br />
<br />
=Finding your Chumby=<br />
<br />
[http://www.macosxhints.com/article.php?story=20051026183044858 Browsing bonjour services from the command line]<br />
<br />
I downloaded the [http://www.tildesoft.com/Programs.html Bonjour Browser] (under OSX) and run it.<br />
<br />
[[http://testingrange.com/pix/chumby/bonjour_browser.png Screen shot of bonjour browser]] <br />
<br />
<br />
You can see the Chumby listed here in the Bonjour Browser, along with the IP Address.<br />
<br />
The IP is also available on the Chumby itself from the Control Panel on the Settings->Info screen.<br />
<br />
=Browsing=<br />
<br />
Hints: Browseatwork but no textentry unless you use the nifty little spot made for when you wanted to browse with your psp via the Wipeout hack... Or point it to a place where it has your bookmarks in html form<br />
<br />
Just my two cents.<br />
<br />
=HTTPD/Built in Web Server=<br />
<br />
The Chumby advertises itself via Bonjour, Apple's system for advertising services.<br />
<br />
You can use the Bonjour bookmark that supposedly exists in Safari, but I am unable to find that. So used the tools under Finding Your Chumby to get an IP address to use.<br />
<br />
(Bonjour bookmarks in Safari can be enabled or disabled in the Safari preferences. From the Safari menu choose Preferences. Choose Bookmarks and check the Bonjour checkboxes.)<br />
<br />
Use the IP address you got from above, for example:<br />
http://10.0.1.11<br />
<br />
There are limited options on the web server right now, but you get a pretty picture and you can see wireless stats.<br />
<br />
[[http://testingrange.com/pix/chumby/chumby_web_20060828.png Screen shot of output of Chumby's built in web server]] The web page in the chumby as of 2006-08-28<br />
<br />
<br />
=SSHD=<br />
<br />
The Chumby comes with sshd, but it is not running by default (can you imagine chumby's running all over, usually behind NAT, but sometimes exposed, with sshd enabled and a default password? It would be chaos I say as people rooted my alarm clock! Enough fear mongering!)<br />
<br />
You need to run sshd.<br />
<br />
* The USB thumbdrive should be formatted with fat, vfat, or fat32 (this is the default for any thumbdrive you purchase I believe)<br />
* Put a file on a USB thumbdrive called "debugchumby"<br />
* It must be at the root level of the file system on the USB device<br />
* It must be marked executable<br />
* If it is a script (mostly likely), it should have the typical bang header:<br />
<br />
<pre><br />
#!/bin/sh<br />
/sbin/sshd<br />
</pre><br />
<br />
* This is not a feature you can count on - it may be removed or changed at any time.<br />
<br />
* You probably want to try connecting with the root account. Use the IP address from browsing Bonjour, or just look around your IP range until you find the machine (as far as I can see, Chumbies don't advertise ssh on Bonjour/Zeroconf, even when running sshd)<br />
<br />
* from linux you can do:<br />
<pre><br />
nmap ip-address<br />
</pre><br />
*...or you can look on the Settings/Info screen in the Control Panel for the current IP of the chumby<br />
<br />
'''this has been tested and verified on a foo camp chumby '''<br />
<br />
=SSHD Easter Egg=<br />
There's also an easter-egg method to start sshd on the Foo Camp chumbies. This trick may not survive firmware updates, so don't count on it being in future versions. You must have the network configured and running properly for this to work.<br />
<br />
* Bring up the Control Panel by gently squeezing the chumby<br />
* Press the "Settings" button on the left side<br />
* Press the "Info" button in the upper left<br />
* Press the legs in the background image of the octopus in the following sequence: 1, 1, 2, 3, 5<br />
* You should get a little popup of the octopus winking at you<br />
* You can now ssh into the chumby with the IP listed on the Info screen, with the user "root". For example:<br />
# ssh 192.168.1.102 -l root<br />
<br />
Don't forget to create and add your [[Max Chumbroom]] pictures.<br />
<br />
=File Manager=<br />
<br />
You can open a File Manager on the Chumby via an Easter Egg. Your clues are: settings->info and tapping...<br />
<br />
''...Those beedy little eyes bug me...''<br />
<br />
<br />
You can browse the file system, but it doesn't appear that you can open or execute files from the file manager.<br />
<br />
But you can determine that there are no easter eggs in the web server.<br />
<br />
=Chumby via Serial=<br />
<br />
There is a serial port somewhere. Getting to it involves a special cable and 'shims' and getting voltages right-if you attach a straight serial cable you will, apparantly, blow it up.<br />
<br />
I believe you need a RS-232 to TTL voltage converter to use the serial port. Google it.<br />
<br />
There is also a USB port</div>Chumby