Acer-EC: Acer Aspire One D150 Embedded Controller

Introduction

Acer Aspire One has a built-in embedded controller. This EC provides interface to read/write 256 control registers for various devices, e.g., bluetooth, touchpad, wireless, CPU temperature, brightness level, power status, battery. By reading/writing these registers through the EC, ones can easily access or modify device status.

Thanks to http://code.google.com/p/aceracpi/wiki/EmbeddedController for introducing acer_ec.pl as a basic tool to deal with the EC. However, it does not fully compatible with Aspire One D150 (AOD150), and — personally — I hate perl :P

Anyway, acer.pl inspires me to develop Acer-EC from scratch in C, based on the DSDT (Differentiated System Description Table) decoded from my D150.

Download

Building Acer-EC

It’s GNU building system, so just

$ tar xjf acer-ec-x.y.z.tar.bz2
$ cd acer-ec-x-y-z
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

The binary acer-ec should be installed in /usr/local/bin/. It requires root privilege to access EC ports, so you may need sudo, or set SUID bit.

Features

  • Show status:
    • Bluetooth, Touchpad, Wireless,
    • Backlight (brightness) level
    • CPU temperature
    • Power status
    • Battery status, and capacity
  • Toggle bluetooth, touchpad, wireless
  • Set backlight level (0 – 9)
  • Dump registers, known fields

Screenshots

$ acer-ec
Wireless      : On
Bluetooth     : On
Touchpad      : On
Brightness    : [+++++----]
CPU temp      : 50\'C
Lid switch    : No
Power adapter : Yes
Batt. status  : Charged
Batt. capacity: 2070 mAh (100 %)
Voltage       : 12.559 V
$ acer-ec -r
Dump registers (Decimal)

   |   00   01   02   03   04   05   06   07   08   09   0a   0b   0c   0d   0e   0f
---+--------------------------------------------------------------------------------
00 |    0    0    0    0    0    0    0    0    1   97    0    0    0    0    0    0
10 |    0    0    0    0    0    0    0    0    0   85   77   48   56   65   55   49
20 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
30 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
40 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
50 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
60 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
70 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
80 |    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
90 |    0    0    0    0    0    0    0    0    0    0   17   16    0    0    0    0
a0 |    0    0    0  160  193    0    0   85   99    0    0    9   90   21    0    0
b0 |   50   54    0    0    0    0    0    0    0    5    0   31   82    0    0    0
c0 |  176  128   22    8   96    1   15   49   92   43  152    8   22    8  100   52
d0 |    0    0    0    0    0  125  134   34    0    0    8    3    0    0  224   64
e0 |    0    0  104    0    0    0    0    0    0    0    0    0    0    0    0    0
f0 |  195   16    0    0  125   57   56   49   65    1  225    0    0    0    0    0
$ acer-ec -d
BATM 01 61
BATD 55 4d 30 38 41 37 31
SMPR 00
SMST 00
SMAD 00
SMCM 00
...
BDAD 7d 39
BACV 38 31
BDFC 41 01
$ acer-ec --help
Usage: acer-ec [OPTION...] 

  -b, --blueooth             toggle bluetooth
      --blueooth={on | off}  set bluetooth on / off
  -t, --touchpad             toggle touchpad
      --touchpad={on | off}  set touchpad on / off
  -w, --wireless=on          toggle wireless
      --wireless={on | off}  set wireless on / off
  -l, --backlight n          set backlight to n (0 - 9)
  -q, --quiet                quiet mode (specify before -b, -t, -w)
  -g r                       get register value (0 - 255)
  -d, --dump                 dump known fields
  -r, --registers            dump registers
  -s, --status               show status
  -v, --version              show version
  -h, -?, --help             print this help

Report bugs to [email protected]