Setup a linux computer to act as a bluetooth keyboard/mouse [closed]

Solution 1:

As said you should to configure your laptop to implement an HID device profile.

If you are on Linux a good starting point could be libhid.

HID Device Interface (hiddev) works very well, and is actually very easy to understand. Documentation can be found, as usual, in the Kernel docs too. Also, the include file hiddev.h in /usr/include/linux was also very helpful of course.

Solution 2:

Hidclient

The hidclient program makes a Bluetooth® technology equipped computer appear as a Bluetooth® keyboard and mouse device to other machines. Input events (like keystrokes and mouse movements) of the locally attached input devices will be forwarded to another machine via the Bluetooth® link. For the counterpart (which might be a Linux PC, a Win PC, a PDA...) there is no technical difference to "real" Bluetooth® input devices.

It doesn't seem to be maintained anymore, but a somewhat updated fork is accessible at https://github.com/benizi/hidclient

Solution 3:

The closest I know that does what you want is BlueMaemo http://www.valeriovalerio.org/?page_id=174

It's for Nokia tablets, but those run Linux anyway.

It shouldn't be too hard for someone to port it for use with a laptop.

Solution 4:

This little piece of code claims to do what you want. I assume this is what Marko was referring to (another answer). I'm looking for the same kind of thing: a quick way to use a real keyboard (for mostly email) on my mobile phone, without buying another piece of hardware. From the description:

What is it?

xkbd-bthid is a Bluetooth HID Keyboard in software, meaning this is an application which emulates a Bluetooth Keyboard. I call it soft-HID.

What could you use it for?

You can turn any Linux box, PDA or tablet into Bluetooth keyboard and control your DVR, MP3 player or what ever with it.

I made a preliminary effort to compile it, but it won't work against BlueZ v4. However, the Ubuntu repositories have some packages for backwards compatibility with BlueZ 3, which gives me some hope. xkbd-bthid depends on BlueZ 2.4. I probably won't get further just now, since my bluetooth stack is currently messed up in Linux, but do post here if you manage to compile it.

Solution 5:

If you're just looking to share the keyboard and mouse you might want to consider using Synergy. It's probably a lot easier than trying to get the bluetooth setup.

From the website:

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all. Learn more about how it works.

I use it to share my desktop's mouse and keyboard with my laptop when I am using both computers.