When you get bored…

This year has been quite tough on me, loss, software replaced, negative account..

I was quite upset with all this, not to mention the whole collaborative thing that we have in FOSS was actually letting me down as even though some do help me a bit I’d like to have more help. I was thinking on gave up on Apper and aptcc and instead just focusing on some other kind of software that I miss instead of fighting a non-ending fight, to be honest I was willing to even changing to Mac OSX that imo has a perfect mail client, perfect photo management and itunes do integrate really nice with Apple TV & friends.. At the end I brought a Magic Trackpad and won an Apple Keyboard…

Both are bluetooth devices battery operated which work very well but they didn’t report it’s batteries status… as you noted that I was upset with other stuff I decided I’d make these devices report the battery status.

Googling I found that some people had tried but didn’t managed to get this working, after talking to some of them I almost gave up as it seemed to be a hard task, talking to the guy who added the MagicTrackpad support he told me about an Apple tool to dump HCI events, so it was quite easy to know how the device reported the status. It simply asks the battery status and the device responds, and the device is even HID compliant which means that any device that follows the spec will get battery reports for free.

I always thought that coding on the kernel is hard, but once you start to understand how the device works it’s actually quite easy. Recently a guy sent a patch to add a power_supply support to the HID kernel module, but his code didn’t probe the devices so my change is now on top of his, for my Apple devices it works like a charm (using last upower version which was patched to work for devices that don’t know the energy fields).

root@acer:/sys/class/power_supply# cat hid-*/uevent
POWER_SUPPLY_NAME=hid-00:22:41:D9:18:E7-battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY=66
POWER_SUPPLY_MODEL_NAME=MacAdmin’s keyboard
POWER_SUPPLY_STATUS=Discharging

POWER_SUPPLY_NAME=hid-70:CD:60:F5:FF:3F-battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY=62
POWER_SUPPLY_MODEL_NAME=nexx’s Trackpad
POWER_SUPPLY_STATUS=Discharging

Next step is now change the KDE power module on system settings to show battery status as GNOME does: https://live.gnome.org/Design/SystemSettings/Power#Guidance

After that a patch in BlueDevil to show the battery status in each menu would be also very usefull for quickly knowing it.

At the end I think it’s needed once in a while to change the project you work on, having doing Apper for 3 years might upset, so I’m looking forward to write some new software…

But no this does not mean that I’ll gave up on Apper, actually I have a few changes in mind maybe for the end of this year, I just want to refresh my mind of this stupid fight where there are no winners.

Best.

When you get bored…