[Bluez-devel] multithreaded name resolution

Matthias Becker
2007-08-24T14:06:33Z

Hi,

I tried to read the name of different devices parallel using multi
threading, but without success. If there is one bluetooth device I works
(as there is no real multi threading). If there are who devices, the
same name is reported for both devices. In another test with 6 devices
hci_read_remote_name returned something <0 so I did not get any name at
all.

hcitool scan --flush
Scanning ...
00:1A:89:6F:DE:EE Nokia 5300
00:19:63:9D:09:16 K800i

My multithreaded tool:

00:19:63:9D:09:16 K800i
00:1A:89:6F:DE:EE K800i

When I don't start multiple threads but do it single threaded everything
works fine, and my code should be absolutly threadsafe.

Is this a bug in BlueZ or was it never supposed to work parallel?

When I run hcidump -V I see that the right names are recived:
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:1A:89:6F:DE:EE name 'Nokia 5300'
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:19:63:9D:09:16 name 'K800i'

-- Matthias