Hmmmm....this is a tricky one.
One other idea to try (attached). Make sure you have no other bluetooth
devices around.
I've posted the question to the BlueZ-devel mailing list, hopefully someone
has come across something similar.
Donnie
Index: libcwiid/bluetooth.c
===================================================================
--- libcwiid/bluetooth.c (revision 83)
+++ libcwiid/bluetooth.c (working copy)
@@ -91,11 +91,12 @@
}
/* Open connection to Bluetooth Interface */
+ /*
if ((sock = hci_open_dev(dev_id)) == -1) {
cwiid_err(NULL, "Error opening Bluetooth interface");
err = 1;
goto CODA;
- }
+ } */
/* Allocate info list */
if (max_bdinfo == -1) {
@@ -111,19 +112,21 @@
for (bdinfo_count=i=0; (i < dev_count) && (bdinfo_count < max_bdinfo);
i++) {
/* timeout (5000) in milliseconds */
+ /*
if (hci_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN,
(*bdinfo)[bdinfo_count].name, 5000)) {
cwiid_err(NULL, "Error reading Bluetooth device name");
err = 1;
goto CODA;
}
+ */
/* Filter? */
if (!(flags & BT_NO_WIIMOTE_FILTER) &&
((dev_list[i].dev_class[0] != WIIMOTE_CLASS_0) ||
(dev_list[i].dev_class[1] != WIIMOTE_CLASS_1) ||
- (dev_list[i].dev_class[2] != WIIMOTE_CLASS_2) ||
+ (dev_list[i].dev_class[2] != WIIMOTE_CLASS_2))) { /*||
(strncmp((*bdinfo)[bdinfo_count].name, WIIMOTE_NAME,
- BT_NAME_LEN)))) {
+ BT_NAME_LEN)))) { */
continue;
}
bacpy(&(*bdinfo)[bdinfo_count].bdaddr, &dev_list[i].bdaddr);