>
> Max,
>
> I solved the problem, I got rid of the 'release key' structure and
> change vkeyb->key[0] to  0, then send that as a key release. Its
> working now.
>
> I believe I just need to handle client disconnects, and re-connects,
> and I think it will be all good.
>
> Thanks for your help.
>
> --
> Waitman Gobble
> Los Altos California USA
> 510-830-7975


Here's an updated version in case someone needs this sort of thing.
daemonized process, uses SIGHUP to disconnect clients and added
upper/lower characters and some special characters. Optionally set key
stroke delay.

https://github.com/waitman/hid_sppd

This version only allows a single client connection and single FIFO at
one time. Maybe in the future, handle multiple FIFO buffers and
clients. But at the moment I don't believe I have a need for that
functionality. I needed a way to add BT HID functionality to my
inexpensive long-range RFID reader/writer device, because apparently
people want to have RFID EPC codes auto-type (into their software
applications?).


You may specify PID File, FIFO buffer file and keystroke delay (or use
the defaults).
Keystroke delay is specified in milliseconds.

# hid_sppd -P /var/run/boo.pid -F /tmp/fifotmp -d 50


Some examples of sending characters to client:

# echo "222223333344444A" >> /tmp/fifotmp

or if you need special characters like "\n" and "\t"

# printf "22;222\t33 33\t44.444AabcdE\nEEeeeX " >> /tmp/fifotmp

(Note that if you use 'printf' then add an extra trailing space.)

so, any program should be able to write to the FIFO buffer.


To disconnect clients:

# pkill -HUP -F /var/run/boo.pid

It's possible bad things may happen if you try to send like a Gigabyte
of data to the FIFO buffer. It's a thought, but I haven't
stress-tested it like that.


I'm fairly new to Bluetooth so I don't yet fully understand how
everything works together but it seems like a good future project (and
possibly GSOC for a student) would be to implement BLE/GATT, and other
protocols in this age of 'wearable devices'?

-- 
Waitman Gobble
Los Altos California USA
510-830-7975
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "[email protected]"

Reply via email to