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…

14 thoughts on “When you get bored…

  1. It’s good to take a break from time to time😉

    Apper is a neat piece of software, take your time and you can get back to work on it whenever you feel like it😀

  2. Take a break when you’re not having fun. I have to do that too. Sometimes the break is a few days. Other times it is a few weeks or even a few months. Trust me it is worth it. Oh and you should know that I re-installed Apper immediately after completing my Kubuntu 11.10 installation. At the moment it just works exceptionally well and is very well designed for all my app install needs. The changes you’ve made over the last several months are very much appreciated by this user.

  3. Mister Fred says:

    Hi ! It’s the first time I read your blog and I don’t know exactly the “fight” you’re talking about. What I can tell is that as an Archlinux user, I love Apper ! So thank you for your work on this project. Please be aware that many silent users appreciate your commitment to FLOSS.

    1. dantti says:

      Thanks and yes, I know lots of Arch, Fedora, openSUSE, Kubuntu users love it, though I’m still upset of developing aptcc for example and sudently from nothing instead of improving it I see the python apt backend reviving, qapt, aptDaemon trying to replace PackageKit with yet another DBus interface. Really it’s tedious to try to make your software best cause if it is not some other will do a replacement instead of improving it… I’m not against creating alternatives it’s just I’m tired to be on a land that there are too many alternatives for exactly the same cause…

  4. The Fedora KDE community is really grateful for Apper. It is the only solution which works for us, and it’s getting better and better. So, many thanks for developing Apper!

    Apper is also the only option for several small distributions. I find it sad that a certain large distribution which used to push Apper is now doing their own, distro-specific thing. But please don’t let that discourage you! PackageKit’s cross-distribution nature makes it just a lot more universal than something based directly on apt.

    1. dantti says:

      Thanks Kevin, you can be sure I won’t stop working on it, but right now I want to work on something different for a while to maybe have better ideas for Apper. I’m trying to learn QML to build a software more like iPhoto, I need to organize my photos… and doing this in QML can maybe make Apper more animated and have a nicer UI.

  5. nomeoomen says:

    Sorry to say but in openSUSE packagekit behaves like crap. And it is because zypper backend lack many features (it would be nice if someone could improve this thing) So apper experience is far from perfect

    1. dantti says:

      Yes, unfortunately zypper backend is not the most active backend in PackageKit, imo the main issue is to keep refreshing the cache after all operations which makes it very slow. If I was an openSUSE user I’d improve it but I don’t have the time for that…

  6. Apper was a dream come true for me, so was PackageKit. I have waited a long time for both to become viable and not until recently (at least for RedHat based Distros) has it. I understand things take time, I used apt-rpm for a long time and I have realized there’s not much apt has that PackageKit doesn’t or can’t easily offer. Apt covers a very small base of RPM distros because of connectiva’s (now dead) apt-rpm. I think PCLinuxOS is/was the only ‘major’ (midsized) distribution using it. So I really doubt apt is a threat when in my opinion Ubuntu distributions are becoming less viable, do to a replace and not improve mentality. So fret not the best and most well maintained projects eventually win out.

  7. Chris says:

    Hi,

    every comment is about apper, but none about the other interesting thing you were writing about: reading the battery state of the apple wireless keyboard and magic trackpad. You mention changes in the kernel module and “the last upower version”. Have you submitted your changes to be included into the mainline kernel? What do I have to do to be able to read the battery state?

    Thx!

    1. dantti says:

      Yes, it’s submitted but I don’t know when it will be available, still need to poke again some people since this patch would change some others modules too.

  8. Whoa, this is awesome, I was just wondering if my bluetooth is crapping out on me or if it’s just a case of flat batteries.

    Have your patches reached the mainline yet or do you need to compile them in manually?

    Good job!🙂

    1. dantti says:

      it’s upstream since 3.4 but it’s disabled by default you should poke your distro to enable it or recompile it. HID_BATTERY_STRENGTH must be enabled iirc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s