Mer/Documentation/BME Protocol

This documentation is entirely for the purpose of implementing software gathering battery information, not alteration of battery management state.

General protocol, published , released as LGPL 2.1

  • UNIX socket connection to /tmp/.bmesrv
  • Client: send('BMentity')
  • Server: send('\n')

From then on:

typedef struct {

   uint16      type, subtype;

} BMEHeader;

types so far (NAME, (type, subtype)):

EM_BATTERY_INFO_REQ (0x06, 0x00)

typedef struct {

   BMEHeader header;
   u_int32_t flags;       Set to 0xFFFFFFFF to get all contents


struct emsg_battery_info_reply {

   uint32      a;
   uint32      flags;
   uint16      c;
   uint16      d;
   uint16      temp;   Battery temperature measured in Kelvin
   uint16      f;
   uint16      g;
   uint16      h;
   uint16      i;
   uint16      j;
   uint16      k;
   uint16      l;