Reading data from bkuetooth device presenting hidraw interface
I am developing an application in which I need to read the data from a Bluetooth hid device.
When the device connects to the computer, the operating system creates a file hidraw* in the /dev directory.
I open this file and I can the data coming in from the device.
I am facing following issues:
1. I want to support multiple devices in my application. How can I know which hidraw* file is associated with which device?
2. When the user disconnects the bluetooth device, how can I know I need to stop reading from the device?
|