.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH OM "1" "October 2011" "om version 0.16" "User Commands" .SH NAME om \- control OpenMoko phone hardware .SH SYNOPSIS .B om \fI\,help\/\fR .br .B om \fI\,--help\/\fR .br .B om \fI\,--version\/\fR .br .B om \fI\,sysfs name \/\fR[\fI\,name\/\fR...] .br .B om \fI\,backlight brightness \/\fR[\fI\,0-100\/\fR] .br .B om \fI\,backlight\/\fR .br .B om \fI\,backlight get-max\/\fR .br .B om \fI\,backlight \/\fR .br .B om \fI\,touchscreen lock\/\fR .br .B om \fI\,screen power \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,screen resolution \/\fR[\fI\,normal|qvga-normal\/\fR] .br .B om \fI\,screen glamo-bus-timings \/\fR[\fI\,4-4-4|2-4-2\/\fR] .br .B om \fI\,bt \/\fR[\fI\,--swap\/\fR] \fI\,power \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,gsm \/\fR[\fI\,--swap\/\fR] \fI\,power \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,gsm flowcontrol \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,gps \/\fR[\fI\,--swap\/\fR] \fI\,power \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,gps \/\fR[\fI\,--swap\/\fR] \fI\,keep-on-in-suspend \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,gps send-ubx \/\fR[\fI\,payload_byte0\/\fR] [\fI\,payload_byte1\/\fR] ... .br .B om \fI\,wifi \/\fR[\fI\,--swap\/\fR] \fI\,power \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,wifi maxperf \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,wifi keep-bus-on-in-suspend \/\fR[\fI\,1/0\/\fR] .br .B om \fI\,battery temperature\/\fR .br .B om \fI\,battery energy\/\fR .br .B om \fI\,battery consumption\/\fR .br .B om \fI\,battery charger-limit \/\fR[\fI\,0-500\/\fR] .br .B om \fI\,power\/\fR .br .B om \fI\,power all-off\/\fR .br .B om \fI\,resume-reason\/\fR .br .B om \fI\,resume-reason contains \/\fR .br .B om \fI\,led \/\fR .br .B om \fI\,led \/\fR .br .B om \fI\,led timer \/\fR .br .B om \fI\,uevent dump\/\fR .br .B om \fI\,usb mode \/\fR[\fI\,device|host\/\fR] .br .B om \fI\,usb charger-mode \/\fR[\fI\,charge-battery|power-usb\/\fR] .br .B om \fI\,usb charger-limit \/\fR[\fI\,0|100|500\/\fR] .SH DESCRIPTION om provides a command line interface to various OpenMoko specific pieces of hardware. Note that om talks directly to the kernel and might not properly co\-exist with fso\-frameworkd that also wants to control the same pieces of hardware. However, using om to read the state of the hardware should be safe even when using fso\-frameworkd. .SH OPTIONS .TP \fBom backlight brightness [0-100]\fR Reads or sets backlight brightness. Units are percentage of maximum brightness. Reports true brightness only if the screen has not been blanked with \fBom screen power 0\fR. .TP \fBom backlight \fR Set backlight brightness. Units are driver specific, maximum value can be queried with \fBom backlight get\-max\fR. This interface is not recommended but is kept for compatibility reasons. .TP \fBom backlight get\-max\fR Get maximum value of brightness. Typically the maximum value is 255 under Linux 2.6.29 and 63 under Linux 2.6.34. .TP \fBom backlight\fR Read backlight brightness. This is an integer between zero and what \fBom backlight get\-max\fR returns. Reports true brightness only if the screen has not been blanked with \fBom screen power 0\fR. This interface is not recommended but is kept for compatibility reasons. .TP \fBom touchscreen lock\fR Locks touchscreen and waits for any signal to unlock it. This is useful when you want to keep the phone running in a pocket and don't want the backlight to turn on every time you accidentally touch the screen. Locking is done in a way that does not depend on X so if X server crashes and restarts your screen will still stay locked. .TP \fBom screen power [1/0]\fR Reads or sets the power state of the screen. Note that Xorg and fso-frameworkd do not know how to read the power status of the screen (frameworkd reads it on startup only). If Xorg turns the screen and after that you turn the screen off with omhacks then touching the screen won't turn the screen on (Xorg thinks the screen is still on and does not bother to try to power it on). .TP \fBom screen resolution [normal|qvga-normal]\fR Reads or sets the screen resolution. This lowlevel interface should not be used when Xorg is running but is useful when using applications that can draw directly to the framebuffer (like mplayer -vo fbdev). The argument \fBnormal\fR means 480x640 and \fBqvga-normal\fR means 240x320. After you have changed the screen resolution you also need to change the framebuffer resolution with e.g. the fbset tool using for example the following /etc/fb.modes entries: .TS l. mode "480x640" geometry 480 640 480 1280 16 timings 40816 8 16 2 16 8 2 rgba 5/11,6/5,5/0,0/0 endmode mode "240x320" geometry 240 420 240 320 16 timings 100000 8 88 2 2 8 2 accel false endmode .TE .TP \fBom screen glamo-bus-timings [4-4-4|2-4-2]\fR Reads or sets the timings of the memory bus between the CPU and the glamo graphics chip. Numbers are SRAM interface timings of the CPU. According to http://lists.openmoko.org/pipermail/community/2010-July/062495.html using 2-4-2 is more appropriate, view that article and following discussion for more details. .TP \fBom bt [\-\-swap] power [1/0]\fR Reads or sets the power state of bluetooth. Bluetooth is connected to USB bus so it might take a while for it to appear in lsusb and be usable after power on. .TP \fBom power\fR List the power status of various devices. .TP \fBom power all-off\fR Disable power to bluetooth, GSM, GPS and WLAN. .TP \fBom gsm [\-\-swap] power [1/0]\fR Reads or sets the power state of GSM. .TP \fBom gsm flowcontrol [1/0]\fR Reads or sets the state of GSM flowcontrol. When flowcontrol is enabled GSM chip will generate an interrupt when it has data and will not try to send it over serial port until flowcontrol is disabled. Enabling flowcontrol before suspend and disabling it after resume is required to make sure no data is lost during suspend. .TP \fBom gps [\-\-swap] power [1/0]\fR Reads or sets the power state of GPS. .TP \fBom gps [\-\-swap] keep\-on\-in\-suspend [1/0]\fR Reads or sets the flag that causes GPS to stay powered on during suspend. This is useful if you want to keep GPS fix during suspend. .TP \fBom gps send\-ubx [payload_byte0] [payload_byte1] ...\fR Send arbitrary UBX protocol command to the GPS chip. Please read "ANTARIS_Protocol_Specification(GPS.G3-X-03002).chm" to understand the protocol. Here are examples of commands that are tested to work: .TS l l l l. class type payload description 06 01 f0 01 00 disable GPGLL messages 06 01 f0 02 00 disable GPGSA messages 06 01 f0 03 00 disable GPGSV messages 06 01 f0 05 00 disable GPGTG messages 06 01 f0 08 00 disable GPZDA messages 06 08 fa 00 01 00 00 00 report position 4 times/s 06 08 f4 01 01 00 00 00 report position 2 times/s .TE .TP \fBom wifi [\-\-swap] power [1/0]\fR Reads or sets the power state of WLAN. .TP \fBom wifi maxperf [1/0]\fR Reads or sets the maxperf mode of WLAN. Enabling this increases energy consumption but lowers latency. Note that root privileges are not currently required for tuning this wifi parameter so a local user can cause DoS by constantly disabling maximum performance mode. .TP \fBom wifi keep-bus-on-in-suspend [1/0]\fR Reads or sets the the flag that controls whether the MCI bus between wifi and CPU will be kept powered on during suspend. You need to keep it powered on if you want to use wake-on-wireless. .TP \fBom battery temperature\fR Reads battery temperature. Units are degrees Centigrade. .TP \fBom battery energy\fR Reads the current energy percentage of the battery. .TP \fBom battery consumption\fR Reads the current energy consumption as measure by the battery. Units are microamperes. Negative value indicates that battery is being charged. .TP \fBom battery charger\-limit [0\-500]\fR Reads or sets the upper limit for battery charger current. Units are milliamperes. Normally USB charger limit and battery charger limit have the same value. However, sometimes it is useful to charger battery very slowly or not at all and still power rest of the system from USB. This allows one for example to keep battery at its recommended storage capacity of 40% without having to physically remove the battery. Note that kernel will round the limit to nearest suitable value which is usually a few milliamperes lower than the supplied limit. Changing USB charger limit will reset also this limit to the same value so you must first set the USB charger limit and only then the battery charger limit. .TP \fBom resume\-reason\fR Read the reason for the most recent resume. If there are multiple resume reasons they are separated by newlines. Possible values include (but are not limited to) .TS l. EINT01_GSM EINT05_WLAN EINT09_PMU:button EINT09_PMU:usb_connect EINT09_PMU:usb_disconnect EINT09_PMU:rtc_alarm EINT09_PMU:low_battery .TE .TP \fBom resume\-reason contains \fR Checks if resume reasons include the given string. .TP \fBom led\fR Lists the state of all LED devices. The printed names are native kernel names and can change between kernel versions. .TP \fBom led \fR Lists the state of the given LED device. In addition to native kernel names you can also use the aliases vibrator, power_orange, power_blue and aux_red to get portability across different kernel versions. .TP \fBom led \fR Sets the brightness of the given LED device to the given brightness. Brightness is an integer from 0 to 255 but only the vibrator device really cares about the brightness value. See \fBom led\fR for a list of supported aliases. .TP \fBom led timer \fR In addition to above also makes the LED blink. Ontime and offtime are in milliseconds. See \fBom led\fR for a list of supported aliases. .TP \fBom uevent dump\fR Dump uevent events to stdout. .TP \fBom usb mode [device|host]\fR Read or set the USB mode. In device mode the phone can talk to USB hosts (PCs or phones in host mode). In host mode the phone can talk to USB devices. See also the \fBom usb charger\-mode\fR option. .TP \fBom usb charger\-mode [charge\-battery|power\-usb]\fR Reads or sets the USB charger mode. Normally you want to charge the battery in device mode and power the USB bus in host mode but it is possible to for example use an external battery power the USB bus so that the phone can be in host mode and still charge itself over USB. .TP \fBom usb charger\-limit [0|100|500]\fR Reads or sets the charger limit of USB. Units are in milliamperes and control the current that the phone will draw from the USB bus. When the phone is in device mode and some gadget driver is loaded it will negotiate the highest allowed charging current automatically. However, if you are using a dumb external USB battery it might be necessary to force larger limit than the default of 100 mA. Do not set the limit to be too large if your charger can not handle it! .TP \fBom sysfs name [name...]\fR Shows the sysfs path associated with internal \fBom\fR path. This option is only useful for debugging \fBom\fR itself. Examples of valid arguments include actual_brightness, battery, brightness, chg_curlim, max_brightness, pm-bt, pm-gps, pm-gsm, pm-wlan, resume_reason, resume_reason2, screen_resolution, usb_charger_mode, usb_mode. .TP \fB\-\-help\fR print this help message .TP \fB\-\-version\fR print version and exit .TP \fB\-\-swap\fR set new value and print old value