T’other day I bought one of these (it fits my gadget needs by having blinking lights AND being USB enabled) I-buddy msn notifier. It arrived yesterday and in fine Tom-Style I binned the instructions and plugged it in.
 After the usual cocking about with XP it started working, all emoticons in my msn chats were triggering it (annoyingly even the ones in peoples names :/ ). Half hour later I was bored with it.
 ”hmm, wonder if i can get this working in my NSLU2..” he thinks.
So I fired up the ole’ XP virtual machine that I use for this sort of thing and installed usbsnoop. 10 minutes of msn conversations seemed to generate enough usb packet data to do the trick
 The protocol is stupidly simple, its using the USB HID stuff but seems to respond to data packets without having all the HID stuff set up.
Heres how it works:
- Scan the usb busses for something with vendorid=0×1130 and prodid=0×0002 – thats the ibuddy
- The first thing to send to it is the setup packet -
- (0×22, 0×09, 0×00, 0×02, 0×01, 0×00, 0×00, 0×00)
- the header for the data packet is
- (0×55, 0×53, 0×42, 0×43, 0×00, 0×40, 0×02)
- onto the header append another byte of the following format XBGRUDLRÂ where:
- XÂ = heart LED (1 = on, 0 = off)
- B G R are the bits for the 3 leds in the head but inverted, i.e. 0 = on, 1 = off
- U D are the wing positions, toggle between them to flap
- L R are used to twitch it left and right, only enable 1 at a time
- Thats it! Things toggled on stay on until turned off. To clear it all send 0xff
This works wonderfully with libusb and python, thanks to Scott Weston for publishing the USB rocket launcher python scripts, from which I borrows the USBDevice classes and bastardized for my own use.
Example script is here, currently it flashes the head blue. Note it requires Python, pyusb and libusb to be installed first.
 I’m planning on using this to alert me when torrents are complete, email notifications etc.
Do with it what you will

December 19th, 2007 - 3:24 am
[...] now installed in a wrist warmer, as some kind of interactive jewlery thing, I’ve posted it all on instructables of course Filed under: craft, hacks [...]
December 19th, 2007 - 10:44 am
[...] Tom hacked the USB I-buddy to work on linux with libusb and python, details and more here – Link. [...]
December 19th, 2007 - 11:52 am
[...] Tom hacked the USB I-buddy to work on linux with libusb and python, details and more here – Link. [...]
June 19th, 2008 - 7:13 pm
The script is 404 — would you mind reposting it?
June 21st, 2008 - 6:42 am
Certainly, the link is now fixed
June 26th, 2008 - 4:14 am
Thanks for your efforts!
I got this gadget for free and I think it’s cute
so I like to get it work
but it seems your script cannot find my ibuddy, it’s output is just “Starting search…” and some dots on new lines. Do you know how to solve that?
thanks!
June 26th, 2008 - 4:21 am
yup i think i know what that is, when you connect the iBuddy the usbhid driver claims it. To prevent that you need to unload the usbhid driver, start the script, then reload the usbhid driver
Bear in mind that the usbhid driver controls keyboards and mice, unloading it will kill them! You need to write a short script to do this. Something like
#!/bin/sh
rmmod usbhid
./ibuddy.py
insmod usbhid
Save that to a .sh file, chmod it to allow execution and run. Cant guarantee it will work though
September 7th, 2008 - 1:43 pm
Hi!
You’ll be happy (or indifferent) to know that I used the information you posted here to hack a Java library, available here:
http://www.jraf.org/static/maven/sites/jlibibuddy/
So I just wanted to thank you very much cause I couldn’t have done it without your work finding the USB protocol! And now I’m having fun playing with the i-Buddy, making it blink, nudge and flap its wings in all sorts of ways;) So thank you!
September 9th, 2008 - 2:29 pm
So I’ve tried and tried and tried a bajillion things (including different distros [FC4 and then Ubuntu 8.04]) and the best I can get is:
“usb.USBError: error sending control message: Broken pipe”
Anyone have any ideas on this?
I also decided I might try to sniff it in “normal” operations on Windows using SnoopyPro and MSN Chat, but SnoopyPro refused to log anything beyond the initial bus scan. Any ideas anyone?
September 11th, 2008 - 10:49 am
OK, so I’ve gotten it working. There were some pretty big differences with my i-Buddy:
1) After getting a USB sniffer working, I found out that the “value” in the control message for mine needed to be set to 200. Additionally, I found that the “setup” control message is unnecessary for mine. You can just send the data messages directly.
2) What’s really strange is that the order and “polarity” of the bits for the data byte are totally different.
Mine is XGBRDURL. For all the LEDs (including the heart) on = 0 and off = 1. But, for the movements, on = 1 and off = 0
I’ve also managed to get a basic Perl version working, but it has some minor issues still. If I get around to fixing it, perhaps I’ll post it here.
October 29th, 2008 - 1:43 pm
Thank you for all the work done!
It was really easy to set up my own version of the software with your example and all information given. To Tom and slikkie: In the given example there is already a way to detach the HID controller, it’s in the commented lines (detachKernelDriver).
November 14th, 2008 - 9:13 am
Chouette !
Merci pour les informations, je cherche le code en C.
Merci
Cool!
Thank you for the information, I seek the code in C.
Thank you
November 14th, 2008 - 10:22 am
./ibuddy.py: 1: import: not found
./ibuddy.py: 2: import: not found
./ibuddy.py: 5: class: not found
./ibuddy.py: 6: Syntax error: “(” unexpected
Pyhton Ok, Libusb Ok et Pyusb Ok !!
November 21st, 2008 - 4:22 am
[...] algo, si alguien no lo ha hecho ya. Una semana más tarde, tenÃamos un juguete nuevo cada uno y un código del que partir. El fruto del cacharreo se llama pybuddy: un demonio escrito en python que atiende a comandos [...]
November 23rd, 2008 - 4:23 am
Gracias.
Encontré este sitio http://code.google.com/p/pybuddy/ , pero no descargar fuentes!
November 23rd, 2008 - 4:25 am
oups, j’avais pas vu le lien dans le titre. merci http://2e5e.wordpress.com/2008/11/21/pybuddy-hacking-ambient-devices/
Vaya, yo no habÃa visto vÃnculo en el tÃtulo
June 18th, 2009 - 5:53 am
Yuhuu. This is great tool to do some status meter with simple python scripts, thanks for that…
Some points:
I noticed that my buddy had a product id 0001 not 0002.
To run with normal user I had to make udev rule:
SYSFS{idProduct}==”0001″, SYSFS{idVendor}==”1130″, MODE=”666″, OWNER=”root”, GROUP=”root”
January 10th, 2010 - 5:08 pm
I recently got a cheap imitation of this from DX (called e-buddy), and started working on this. I have hit a brick wall now as self.dev.handle.controlMsg(0×21, 0×09, self.SETUP, 0×200, 0×01) seems to generate an exception although the device is found fine and enumerates as it should. They also use the control interface (checked with sniffer) but I don’t manage to write to it.
Would appreciate it if you’d get in touch with me
January 18th, 2010 - 6:12 am
Nevermind, got it working.
For people with an ebuddy (DX copy), see http://code.google.com/p/pybuddy-dx/
January 21st, 2010 - 12:18 pm
Hi Petur, Sorry I didnt get back to you, i’ve been recovering from a broken arm and its been a right pain to type things! Glad you got it working though
I fixed the problem with detaching the iBuddy from the kernel driver, use the quirks parameter when loading the usbhid module to blacklist the device. Works a treat!