Question

I have a bluetooth server running on my Ubuntu desktop written using PyBlueZ. That server is advertising a certain service via UUID. I have tested this server thoroughly using a client I also wrote with PyBlueZ.

Now I am attempting to implement a Java client using BlueCove. My BlueCove client can successfully locate my desktop (I checked by printing out the "user friendly name"). However, when I do a service search on my desktop for the advertised UUID, no services are found. I do not get an error or anything, I simply do not get any callbacks for services discovered.

Is there anything unusual that might be going on when connecting these two systems? The UUIDs are identical, although I have noticed that the PyBlueZ format asks for dashes "-" in the UUID, whereas BlueCove expects one continuous string of hex digits. I assume this is a purely presentational issue.

Finally, in an unrelated matter, are there any BlueCove communities out there? I have been coming up with an extreme shortage of resources to find answers to my BlueCove questions...

Was it helpful?

Solution

The mistake I made was that I did not realize searchServices() was an asynchronous method which required as much time as device discovery to execute. I was not sleep()'ing to give it a chance to find services.

Now that I'm giving searchServices() time to complete, it is at least invoking the serviceDiscovered callback.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top