bluetooth HID emulation

Is it possible to emulate a bluetooth HID keyboard?
I tried hidclient, but my device can’t connect to it
hidclient < computer <

The pairing seems to work using Blueman and it connects to the HID service, but it disconnects after a few seconds
I think hidclient is too old to work with Bluez 4.x.