Difference between revisions of "Chumby device settings information on /proc"
(→/proc/sys/sense1/hpin) |
(→/proc/sys/sense1/dimlevel) |
||
Line 42: | Line 42: | ||
''This worked for me once, then it stopped. Don't know why. dimlevel does reflect the current dimlevel if I change it manually via the ControlPanel, however.'' | ''This worked for me once, then it stopped. Don't know why. dimlevel does reflect the current dimlevel if I change it manually via the ControlPanel, however.'' | ||
+ | |||
+ | ''Update: It works for me again. Did I do something wrong before?'' | ||
====/proc/sys/sense1/spkmute==== | ====/proc/sys/sense1/spkmute==== |
Revision as of 08:38, 26 November 2007
Contents
- 1 Device access
- 1.1 /proc/sys
- 1.1.1 /proc/sys/accel
- 1.1.2 /proc/sys/timerx
- 1.1.3 /proc/sys/sense1
- 1.1.3.1 /proc/sys/sense1/resetSerial
- 1.1.3.2 /proc/sys/sense1/debounce
- 1.1.3.3 /proc/sys/sense1/hpin
- 1.1.3.4 /proc/sys/sense1/BTvolts
- 1.1.3.5 /proc/sys/sense1/DCvolts
- 1.1.3.6 /proc/sys/sense1/dimlevel
- 1.1.3.7 /proc/sys/sense1/spkmute
- 1.1.3.8 /proc/sys/sense1/dbg-error
- 1.1.3.9 /proc/sys/sense1/dbg-ioctl
- 1.1.3.10 /proc/sys/sense1/dbg-trace
- 1.2 /proc/chumby
- 1.2.1 /proc/chumby/temperature
- 1.2.2 /proc/chumby/battery-voltage
- 1.2.3 /proc/chumby/tsc2100
- 1.2.4 /proc/chumby/tsc2100/control5-page2
- 1.2.5 /proc/chumby/tsc2100/control4-page2
- 1.2.6 /proc/chumby/tsc2100/pll2-page2
- 1.2.7 /proc/chumby/tsc2100/pll1-page2
- 1.2.8 /proc/chumby/tsc2100/control3-page2
- 1.2.9 /proc/chumby/tsc2100/powercon-page2
- 1.2.10 /proc/chumby/tsc2100/control2-page2
- 1.2.11 /proc/chumby/tsc2100/sidetone-page2
- 1.2.12 /proc/chumby/tsc2100/audiodac-page2
- 1.2.13 /proc/chumby/tsc2100/audioadc-page2
- 1.2.14 /proc/chumby/tsc2100/control1-page2
- 1.2.15 /proc/chumby/tsc2100/refctl-page1
- 1.2.16 /proc/chumby/tsc2100/adc-page1
- 1.2.17 /proc/chumby/tsc2100/registers
- 1.2.18 /proc/chumby/audio
- 1.2.19 /proc/chumby/audio/side-tone
- 1.2.20 /proc/chumby/audio/side-tone/digital-gain
- 1.2.21 /proc/chumby/audio/side-tone/digital-mute
- 1.2.22 /proc/chumby/audio/side-tone/analog-gain
- 1.2.23 /proc/chumby/audio/side-tone/analog-mute
- 1.2.24 /proc/chumby/audio/mixer
- 1.2.25 /proc/chumby/audio/mixer/both-speakers
- 1.2.26 /proc/chumby/audio/mixer/both-speakers/volume
- 1.2.27 /proc/chumby/audio/mixer/both-speakers/mute
- 1.2.28 /proc/chumby/audio/mixer/right-speaker
- 1.2.29 /proc/chumby/audio/mixer/right-speaker/volume
- 1.2.30 /proc/chumby/audio/mixer/right-speaker/mute
- 1.2.31 /proc/chumby/audio/mixer/left-speaker
- 1.2.32 /proc/chumby/audio/mixer/left-speaker/volume
- 1.2.33 /proc/chumby/audio/mixer/left-speaker/mute
- 1.2.34 /proc/chumby/touchscreen
- 1.2.35 /proc/chumby/touchscreen/touchclick
- 1.2.36 /proc/chumby/touchscreen/poll-interval
- 1.2.37 /proc/chumby/touchscreen/coordinates
- 1.2.38 /proc/chumby/touchscreen/enable
- 1.3 /proc/chumby-wifi
- 1.3.1 /proc/chumby-wifi/network-status
- 1.3.2 /proc/chumby-wifi/link-status
- 1.3.3 /proc/chumby-wifi/regs
- 1.3.4 /proc/chumby-wifi/bss-scantab
- 1.3.5 /proc/chumby-wifi/mlme-aux
- 1.3.6 /proc/chumby-wifi/mlme-struct
- 1.3.7 /proc/chumby-wifi/dev-stats
- 1.3.8 /proc/chumby-wifi/counters
- 1.3.9 /proc/chumby-wifi/active-config
- 1.3.10 /proc/chumby-wifi/port-config
- 1.3.11 /proc/chumby-wifi/rtmp-adapter
- 1.3.12 /proc/chumby-wifi/trace-buffer
- 1.3.13 /proc/chumby-wifi/dbug-pages
- 1.3.14 /proc/chumby-wifi/dbug-level
- 1.3.15 /proc/chumby-wifi/RTDebugLevel
- 1.1 /proc/sys
Device access
On Linux you can communicate with "device drivers" through the "/proc" filesystem. For example,
chumby:~# cat /proc/cpuinfo Processor : ARM926EJ-Sid(wb) rev 4 (v5l) BogoMIPS : 174.89 Features : swp half thumb fastmult edsp java CPU implementer : 0x41 CPU architecture: 5TEJ etc.
Note, most of these files will be migrating out of /proc in the future to /sys, so do not write code that expects these files to be present all the time.
/proc/sys
Here are some chumby-specific system driver files
/proc/sys/accel
/proc/sys/accel/romBusy
/proc/sys/accel/painThresh
/proc/sys/accel/touchThresh
/proc/sys/accel/dbg-error
/proc/sys/accel/dbg-ioctl
/proc/sys/accel/dbg-trace
/proc/sys/timerx
/proc/sys/timerx/dbg-error
/proc/sys/timerx/dbg-ioctl
/proc/sys/timerx/dbg-trace
/proc/sys/sense1
/proc/sys/sense1/resetSerial
/proc/sys/sense1/debounce
/proc/sys/sense1/hpin
Contains 1 if something is plugged into the audio-out (headphone) jack.
/proc/sys/sense1/BTvolts
/proc/sys/sense1/DCvolts
/proc/sys/sense1/dimlevel
- Full brightness (normal mode) with echo 0 > /proc/sys/sense1/dimlevel
- Dim the screen (night mode) with echo 1 > /proc/sys/sense1/dimlevel
- Screen off with echo 2 > /proc/sys/sense1/dimlevel
This worked for me once, then it stopped. Don't know why. dimlevel does reflect the current dimlevel if I change it manually via the ControlPanel, however.
Update: It works for me again. Did I do something wrong before?
/proc/sys/sense1/spkmute
Speaker mute (master?)
/proc/sys/sense1/dbg-error
/proc/sys/sense1/dbg-ioctl
/proc/sys/sense1/dbg-trace
/proc/chumby
Chumby has a special section just for Chumby-specific drivers. It's in /proc/chumby*
/proc/chumby/temperature
Appears to contain the most recent polled temperature values in raw format.
Most recent values are at the head of the file.
TODO: How to convert this to human readable values?
/proc/chumby/battery-voltage
Appears to contain the most recent polled battery voltage values in raw format.
Most recent values are at the head of the file.
TODO: How to convert this to human readable values?
/proc/chumby/tsc2100
/proc/chumby/tsc2100/control5-page2
/proc/chumby/tsc2100/control4-page2
/proc/chumby/tsc2100/pll2-page2
/proc/chumby/tsc2100/pll1-page2
/proc/chumby/tsc2100/control3-page2
/proc/chumby/tsc2100/powercon-page2
/proc/chumby/tsc2100/control2-page2
/proc/chumby/tsc2100/sidetone-page2
/proc/chumby/tsc2100/audiodac-page2
/proc/chumby/tsc2100/audioadc-page2
/proc/chumby/tsc2100/control1-page2
/proc/chumby/tsc2100/refctl-page1
/proc/chumby/tsc2100/adc-page1
/proc/chumby/tsc2100/registers
/proc/chumby/audio
/proc/chumby/audio/side-tone
/proc/chumby/audio/side-tone/digital-gain
/proc/chumby/audio/side-tone/digital-mute
/proc/chumby/audio/side-tone/analog-gain
/proc/chumby/audio/side-tone/analog-mute
/proc/chumby/audio/mixer
/proc/chumby/audio/mixer/both-speakers
/proc/chumby/audio/mixer/both-speakers/volume
/proc/chumby/audio/mixer/both-speakers/mute
/proc/chumby/audio/mixer/right-speaker
/proc/chumby/audio/mixer/right-speaker/volume
/proc/chumby/audio/mixer/right-speaker/mute
/proc/chumby/audio/mixer/left-speaker
/proc/chumby/audio/mixer/left-speaker/volume
/proc/chumby/audio/mixer/left-speaker/mute
/proc/chumby/touchscreen
/proc/chumby/touchscreen/touchclick
Contains 1 if touchscreen click is enabled.
Contains 0 if touchscreen click is disabled.
You can enable the touchscreen click by putting a 1 in this file:
echo 1 > /proc/chumby/touchscreen/touchclick
/proc/chumby/touchscreen/poll-interval
/proc/chumby/touchscreen/coordinates
Shows the most recent 29(?) touchscreen events.
Most recent values are at the head of the file.
This example shows the last two events once per second. Run this and then touch the screen to see it update.
chumby:~# while [ 1 ] ; do head -2 /proc/chumby/touchscreen/coordinates ; sleep 1 ; done
There appear to be two events logged in the coordinates file, pen-up and pen-down.
- pen-up is logged when you stop touching the screen. Its coordinates are always 0.
- pen-down is continuously logged when you are touching the screen. Its coordinates reflect the location you are touching on the screen (x,y) and the pressure applied (p).
- P is LARGER for lighter touches. It seems to range from 0 - 10000 most of the time, but I have seen some values over 19,000.
- Y coordinates range from about 167 to 3920 on my screen, left to right.
- X coordinates range from about 220 to 3860 on my screen, bottom to top.
chumby:~# head /proc/chumby/touchscreen/coordinates 256: x=0 y=0 p=0 pen-up 255: x=564 y=3763 p=6698 pen-down 254: x=561 y=3768 p=6052 pen-down 253: x=561 y=3757 p=5798 pen-down 252: x=566 y=3760 p=5677 pen-down 251: x=573 y=3761 p=5767 pen-down 250: x=579 y=3757 p=5873 pen-down 249: x=583 y=3762 p=6122 pen-down 248: x=590 y=3761 p=6426 pen-down 247: x=590 y=3752 p=6633 pen-down
/proc/chumby/touchscreen/enable
Contains 1 if touchscreen is enabled.
Contains 0 if touchscreen is disabled.
You can disable the touchscreen by putting a 0 in this file:
echo 0 > /proc/chumby/touchscreen/enable