[ug-bosug] USB - Bluetooth dongle - libusb
Anand Bheemarajaiah
anand_bheemaraju at yahoo.com
Wed Feb 6 07:31:35 PST 2008
Hello all,
I am trying to build the bluetooth stack in userspace for usb bluetooth dongle. As per other's suggestions i am trying to read and write to the usb device using the libusb library.
Now let me tell you the problem I am facing. I went through the bluez (linux bluetooth stack) source code and in that he is writing ( the hci bluetooth commands ) to the device through the control pipe and reading (the hci bluetooth events ) from the interrupt pipe.
Using libusb i can write to device using the usb_control_msg method and it returns success too. But when i try reading from the interrupt pipe (by the way there is only one input interrupt endpoint in the usb bluetooth dongle which i bought ) it just blocks the program and keeps waiting forever for data from device which doesn't arrive.
As far as i can think either of these could have happened,
1) Data was sent and parsed by the device and event generated but couldn't be read or
2) Data was sent but could not be parsed by the device so it didn't send back the event packets.
Lastly, in the bluez code he is registering a callback method which gets called automatically when the data arrives through the interrupt pipe. I did some googling and found that usb device driver in solaris does provide support for callback method registering for the interrupt pipe. But i have no idea of building device drivers.
What do you think the error could be ?
What course should i take next ? should i start on the usb device driver or is there a way to make this work using libusb ?
Any help would be great. I can provide you with more data if you need. Thanks in advance.
regards,
Anand B
This message posted from opensolaris.org
More information about the ug-bosug
mailing list