USB and HiD programming

I have been banging my head trying to get battery status from a device. I have tried many tools in many languages. I can get the serial number, production id and vendor id and other standard information from the device, with no problems what so ever.
But the battery information is not one of them.

I have almost come to the conclusion that the driver for OSX doesn’t support getting that information. But as a last resort, I ask here. Is there anyone here that knows how to talk to such devices ? That can explain a few things to me. I am absolutely not ruling it out that this is my problem and that is I who is doing things incorrectly.

Anyone ?

This if is for mac ?

pmset -g batt

[code]ioanniss-imac:~ ioannis$ pmset -g batt
Now drawing from ‘AC Power’
ioanniss-imac:~ ioannis$

[/code]

And for ios check this
BatteryStatus

From the device, not my computer, so in code using xojo and most likely the mbs tools. But what I am after is more like pseudo code, just what the steps are of getting information from the device.

Sorry,i have give up on xojo and ios
But i am sure someone more advance can use the …UIDevice_Class
from UIKit.
Baterry status IOS

I need this to work on OSX unfortunately.

I have pretty much come to the conclusion that OSX only recognises this device as a storage device and not as a HID device, but I have no idea on how to actually test for that. If anyone can help, it is much appreciated.

My mistake…
Have you try this ?
system_profiler SPUSBDataType

USB:

    USB 2.0 Bus:

      Host Controller Driver: AppleUSBEHCIPCI
      PCI Device ID: 0x1c26 
      PCI Revision ID: 0x0005 
      PCI Vendor ID: 0x8086 

        Hub:

          Product ID: 0x2514
          Vendor ID: 0x0424  (SMSC)
          Version: 0.03
          Speed: Up to 480 Mb/sec
          Location ID: 0xfd100000 / 1
          Current Available (mA): 1000
          Current Required (mA): 2
          Extra Operating Current (mA): 0
          Built-In: Yes[/code]
For  informations i use the Ioreg..
something like this
[code]ioreg -p IOUSB -l -w 0[/code]
results
[code]+-o USB Receiver@fa120000  <class AppleUSBDevice, id 0x1000002c9, registered, matched, active, busy 0 (79 ms), retain 28>
    |     {
    |       "sessionID" = 1332002199
    |       "iManufacturer" = 1
    |       "bNumConfigurations" = 1
    |       "idProduct" = 50475
    |       "bcdDevice" = 4611
    |       "Bus Power Available" = 500
    |       "USB Address" = 4
    |       "bMaxPacketSize0" = 8
    |       "iProduct" = 2
    |       "iSerialNumber" = 0
    |       "bDeviceClass" = 0
    |       "Built-In" = No
    |       "locationID" = 18446744073610067968
    |       "bDeviceSubClass" = 0
    |       "bcdUSB" = 512
    |       "USB Product Name" = "USB Receiver"
    |       "PortNum" = 2
    |       "non-removable" = "no"
    |       "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
    |       "bDeviceProtocol" = 0
    |       "IOUserClientClass" = "IOUSBDeviceUserClientV2"
    |       "IOPowerManagement" = {"ChildrenPowerState"=4,"DevicePowerState"=0,"CurrentPowerState"=4,"CapabilityFlags"=32768,"MaxPowerState"=4,"DriverPowerState"=4}
    |       "USB Product Code Name" = "Tommy"
    |       "Device Speed" = 1
    |       "USB Vendor Name" = "Logitech"
    |       "idVendor" = 1133
    |       "IOGeneralInterest" = "IOCommand is not serializable"
    |       "IOClassNameOverride" = "IOUSBDevice"
    |     }

Here is my device, if these information tells you something. I think though as the BSD Name of the device is disk3, kind of tells me this is read in just as a storage device. But I feel like I should be able to query it anyway.
Better copy paste here, it is almost impossible to add just the text here.

Go to spotLight and write ioregistryexplorer
Open the explorer.
Up left choose IOUSB
Then check the windows for available data,informations for the usb from OSX …