Skip to content

Commit e3876d8

Browse files
Added base files for Zurk's Offline Firmware v21 (last version supporting the Chumby Classic)
1 parent ff39090 commit e3876d8

File tree

12,030 files changed

+1433445
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,030 files changed

+1433445
-0
lines changed

FAQ.txt

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
Are you able to apply this to the device itself rather than booting off a flash drive?
2+
3+
yes you simply need to copy the files to the built in microSD and overwrite the existing files. They take approx 300MB on the C8 and 220MB on the C1.
4+
The way you do it is :
5+
stop_control_panel
6+
sync
7+
mount -o remount,rw /
8+
cp -ir all the files keeping the directory structure intact one directory at a time (careful!).
9+
cp debugchumby to /psp/rfs1/userhook2
10+
sync
11+
mount -o remount,ro /
12+
sync
13+
14+
then reboot.
15+
16+
17+
18+
I double checked zwapi.sh by ssh'ed into the chumby8 and it contains the correct city and country code. I then waited for an hour and I can see that the temperature matches my local forecast. However, it is still displaying ZZ as the location even though I edited both the profile and the show files under www/xml. I am not sure why there are two files with identical xml info and only 5 widgets are listed even though I can see 14 widgets when the offline chumby booted up. I have also changed the weather station code in those two files but it is still showing the old weather station code that came with your zip file. It seemed there may be another profile file at work that display the 14 widgets but I cannot find it.
19+
20+
21+
no cache. the weather should automatically populate in about an hour. You can manually run the zwapi.sh file once to populate the weather initially to test. Make sure the temperature displayed in the first SkyHappennings Weather edition widget is correct and you should be good to go.
22+
Make sure you use the exact city and country code as per this website :
23+
http://m.wund.com/cgi-bin/findweather/g . ris+France
24+
(e.g. replace your city and country instead of Paris+France and make sure it comes up. If it does put it into zwapi.sh and save the file. If it does not you need to alter the city and country code so that wunderground can understand it).
25+
You do NOT need to put your zipcode or modify the SkyHappennings weather edition widget any further once you have edited zwapi.sh. The default zipcode of ZZ should be kept as is.
26+
For the wgraph widget you need to put in your closest station code not the zip code. The widgets work for all countries the same way as the forecast does. Get your station code from here :
27+
http://www.wunderground.com/weatherstat . ted+States
28+
You can select different countries as well.
29+
30+
Make sure you save the files and unmount cleanly (select remove usb disk from your windows taskbar) or the usb disk will not be saved properly. You can check it by sshing into your chumby and type cat filename to check the contents of filename. e.g. cat /mnt/usb/psp/zwapi.sh
31+
Also check to make sure networking is working on your offline chumby. The news widgets should not show blank screens. They should populate the news correctly. You need to set it up via control panel if the networking is not working obviously since the offline firmware disables all of the chumby network detection by default (to allow use in a non networked environment).
32+
33+
34+
it will show ZZ as the location regardless. no way to change that without help from the original author which is unlikely. It will however match the forecast and temp to your local area based on what you have placed in zwapi.sh.
35+
For the widgets you are probably editing the chumby one profile xml. Both the chumby1 and chumby8 firmwares are built from the same common source.
36+
37+
38+
39+
look in /mnt/usb/lighty/html/xapis/profile/, modify show and run link.sh...that will do it.
40+
look at /mnt/usb/lighty/html/xapis/profile/show with a text editor where you can see the Weather Underground RapidFire widget which is not available on chumby.com. Replace the name with your own widget, copy your widget over to the same directory where the weather underground widget is located and it should work. you need to run link.sh as noted above. You can also add another widget if you require by copying and pasting the chunk of XML which controls the weather underground widget.
41+
42+
43+
heres the semi - automated way i use for extracting URLs from profiles -
44+
cat profile_filename | grep -o 'http://[^"]*'
45+
It doesnt get everything (i.e. relative urls like /xapis/catalog/index/....) but it gets most. The others you need to get by appending http://xml.chumby.com/xapis.... to them with search and replace using nano (also available on the offline fw) or any other text editor.
46+
if you have a linux box the following is better :
47+
perl -ne 'if (/href="([^"]*)"/) { print "wget $1\n"; }' profile_filename
48+
it will get everything. you just need to modify relative urls by adding http://xml.chumby.com in front of them.
49+
50+
51+
You need to modify the battery system with a patch for working with the offline firmware on battery.
52+
ssh into the chumby in offline mode and then :
53+
mount -o remount,rw /
54+
/mnt/usb/nano/bin/nano /usr/chumby/scripts/power_state_changed.sh
55+
---edit the file as shown below putting the #'s in the correct place---
56+
#!/bin/sh
57+
58+
. /etc/profile
59+
SHOULD_TELL_FLASH=1
60+
if [ "x$1" = "x-n" ]
61+
then
62+
SHOULD_TELL_FLASH=0
63+
fi
64+
65+
AC_ONLINE=$(cat /sys/class/power_supply/ac/online)
66+
67+
echo "AC online? ${AC_ONLINE} Telling flash? ${SHOULD_TELL_FLASH}"
68+
69+
if [ ${AC_ONLINE} -eq 1 ]
70+
then
71+
for bl in $(/bin/ls --color=never /sys/class/backlight/)
72+
do
73+
# echo 100 > /sys/class/backlight/${bl}/max_brightness
74+
done
75+
# iwconfig wlan0 power off
76+
77+
# Restore power to port 1.
78+
# hub-ctrl -h 0 -P 1 -p 1
79+
80+
else
81+
MAX_BRIGHTNESS=50
82+
if [ -e /psp/max_brightness_battery ]
83+
then
84+
MAX_BRIGHTNESS=$(cat /psp/max_brightness_battery)
85+
fi
86+
87+
for bl in $(/bin/ls --color=never /sys/class/backlight/)
88+
do
89+
# echo ${MAX_BRIGHTNESS} > /sys/class/backlight/${bl}/max_brightness
90+
done
91+
92+
# iwconfig wlan0 power on
93+
94+
# If the connected device draws more than 200mA, cut it off.
95+
if [ "$(chumby_version -h | cut -d'.' -f2)" -lt "7" ]
96+
then
97+
MP=$(cat /sys/class/usb_device/usbdev1.2/device/1-1.1/bMaxPower | tr -d mA)
98+
if [ $? = 0 -a ${MP} -gt 200 ]
99+
then
100+
# Try multiple times to ensure the port is gone.
101+
# I'd really rather not do this, but if we want to turn the port off
102+
# as soon as the device is plugged in, it seems as though it will get
103+
# turned back on, especially if we're dealing with an ipod.
104+
for i in 1 2 3 4 5 6
105+
do
106+
# hub-ctrl -h 0 -P 1 -p
107+
sleep 1
108+
done
109+
fi
110+
fi
111+
fi
112+
113+
if [ ${SHOULD_TELL_FLASH} = 1 ]
114+
then
115+
# Tell flash about the change.
116+
true
117+
fi
118+
------------------
119+
cntrl X enter to save
120+
sync
121+
mount -o remount,ro /
122+

0 commit comments

Comments
 (0)