Battery drivers

Hi

Is there any sample/documentation about how to make battery drivers?

My target is to get a device (ups in this case) at the power management devices of windows like a battery. The ups has USB connection (HID Battery class most probably) where status information will be available.

I suppose it should be a ACPI driver but I couldn’t really find too much information about this … Or is there any other way to make it?

Any help/link would be appreciated.

Regards,
B.

I think it’s all documented in the WDK, and IIRC there is even a sample.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi
>
> Is there any sample/documentation about how to make battery drivers?
>
> My target is to get a device (ups in this case) at the power management devices of windows like a battery. The ups has USB connection (HID Battery class most probably) where status information will be available.
>
> I suppose it should be a ACPI driver but I couldn’t really find too much information about this … Or is there any other way to make it?
>
> Any help/link would be appreciated.
>
> Regards,
> B.
>

If your device really complies with the HID battery class, the driver is
already included in Windows.


Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> I think it’s all documented in the WDK, and IIRC there is even a
> sample.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> wrote in message news:xxxxx@ntdev…
>> Hi
>>
>> Is there any sample/documentation about how to make battery drivers?
>>
>> My target is to get a device (ups in this case) at the power management
>> devices of windows like a battery. The ups has USB connection (HID
>> Battery class most probably) where status information will be available.
>>
>> I suppose it should be a ACPI driver but I couldn’t really find too much
>> information about this … Or is there any other way to make it?
>>
>> Any help/link would be appreciated.
>>
>> Regards,
>> B.
>>
>

HidBatt.sys driver is known to be pathetic and to be unable of servicing >50% of UPSes sold in the world, which are also HID devices, but differ a bit in HW IDs and in a protocol (though also HID-based).

FSP/Ippon/Powercom UPSes all use the same protocol and all of them are not compatible with HidBadd.sys.

So people write tiny freeware user-mode applets (based on HID API) to service these UPSes, since the native software provided with the UPS is on unnecessary complexity and pollutes the computer a lot during installation of 40MB package (with Java VM and the similar things which have nothing to do with UPS).

Probably there is also a port of UNIX “nut” package to Windows.

The status of UPS support in modern (Vista+) Windows became amazingly bad. Pre-Vista, there was a user-mode UPS service, and you could use COM port (instead of USB) for UPS monitoring, with a custom DLL from UPS vendor. Worked very well.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“Jake Oshins” wrote in message news:xxxxx@ntdev…
> If your device really complies with the HID battery class, the driver is
> already included in Windows.
>
> –
> Jake Oshins
> Hyper-V I/O Architect
> Windows Kernel Group
>
> This post implies no warranties and confers no rights.
>
> --------------------------------------------------------------
>
>
> “Maxim S. Shatskih” wrote in message
> news:xxxxx@ntdev…
>> I think it’s all documented in the WDK, and IIRC there is even a
>> sample.
>>
>> –
>> Maxim S. Shatskih
>> Windows DDK MVP
>> xxxxx@storagecraft.com
>> http://www.storagecraft.com
>>
>> wrote in message news:xxxxx@ntdev…
>>> Hi
>>>
>>> Is there any sample/documentation about how to make battery drivers?
>>>
>>> My target is to get a device (ups in this case) at the power management
>>> devices of windows like a battery. The ups has USB connection (HID
>>> Battery class most probably) where status information will be available.
>>>
>>> I suppose it should be a ACPI driver but I couldn’t really find too much
>>> information about this … Or is there any other way to make it?
>>>
>>> Any help/link would be appreciated.
>>>
>>> Regards,
>>> B.
>>>
>>
>

> HidBatt.sys driver is known to be pathetic and to be unable of
servicing

>50% of UPSes sold in the world, which are also HID devices, but
differ a bit
in HW IDs and in a protocol (though also HID-based).

FSP/Ippon/Powercom UPSes all use the same protocol and all of
them
are
not compatible with HidBadd.sys.

So people write tiny freeware user-mode applets (based on HID API)
to
service these UPSes, since the native software provided with the UPS
is on
unnecessary complexity and pollutes the computer a lot during
installation of
40MB package (with Java VM and the similar things which have nothing
to do
with UPS).

At least one version of the software bundled with HP low end UPS’s
leaked handles every time it polled the UPS (eg every few seconds) if it
was connected via USB, meaning that after a week or so the system would
become unstable and crash. It’s not just the ‘freeware’ stuff that
sucks.

The thing about the UPS software is that in all but the smallest of
setups it needs to manage multiple computers all plugged into the same
UPS and coordinate load and shutdown order.

Probably there is also a port of UNIX “nut” package to Windows.

There wasn’t last time I checked, but what I do use is the windows nut
client that can manage the shutdown as directed by my Linux server which
is managing the UPS. It’s a 3rd party app (from the PoV of nut) and
isn’t that flash - last time something went wrong I had to click ‘OK’ on
about 2000 ‘ups is on battery’ / ‘ups is on line power’ prompts. It is
lightweight though.

James

>At least one version of the software bundled with HP low end UPS’s

leaked handles every time it polled the UPS (eg every few seconds)

This is an absolutely normal standard problem of software provided with hardware by hardware vendor.

Some not-so-smart marketoids in hardware companies consider that all kinds of bells and whistles in the software provided with their hardware adds value to the hardware product, which is probably what is written in their school books.

In the real world, at least if we are speaking about professional advanced users, this is nonsense. For many people (and not me only), the best kind of “software+hardware” is .SYS/.INF/.CAT package, and nothing else.

In 90% of cases, the Windows’s embedded support for some hardware class is by far better then the crappy bell-and-whistle looking toys from the hardware vendor.

I personally only use the embedded Windows drivers and support for any hardware where it is possible, and this is for years.

“Can be used with Windows without any software installed” is the value of the hardware product.

So, expecting better world from hardware vendors is naive. They cannot.

Microsoft yes - they can. But with this HitBatt.sys driver not support 50% of UPSes on the market - they also made things worse with Vista.

become unstable and crash. It’s not just the ‘freeware’ stuff that
sucks.

Stuff from the hardware vendors sucks. Freeware and open source - much better, but the best software is one embedded to Windows :slight_smile:

setups it needs to manage multiple computers all plugged into the same
UPS

Very rare. Very often there is 1 UPS per 1 computer.

Probably there is also a port of UNIX “nut” package to Windows.

Too bad.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com