hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

LocalName

Mon Jan 05, 2009 2:49 am

Hi

how can I find LocalName of device in runtimemode, when manager.network.name = "unknown"?

only reading registry?

would be

reg,\\HKCU\Software\Microsoft\Bleutooth\Settings\Localname


[HKEY_LOCAL_MACHINE\SOFTWARE\WIDCOMM\BTConfig\General\Localname



regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: LocalName

Mon Jan 05, 2009 9:17 am

Have you found a situation where Network.Name returns Unknown but the device actually have another name?
Especially for Widcomm, BlueTools is quering the bluetooth device name.

(Note that for Widcomm this is not the same thing as the device name. They are separate entities)

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: LocalName

Mon Jan 05, 2009 12:25 pm

some problems in this direction:-)

if I have an asynchronous callback in simple service, how can I detect the sender from stream or from result, if there are several services? I improve it by an artificial header, but shoud be possible,to find the original header information of the read.

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: LocalName

Mon Jan 05, 2009 12:42 pm

It's not possible to determine the sender this way afaik.
You have to keep track of what Stream belongs to what device yourself in your application.

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: LocalName

Mon Jan 05, 2009 2:01 pm

.. but if I write to the stream then, it exactly meets the sender. So - where is the information about that?

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: LocalName

Mon Jan 05, 2009 2:07 pm

I don't understand the question.
There is no information connecting a Stream and a remote device. It does exists deeper down of course, but at the application level you need to keep track yourself which RemoteDevice that spawned the RemoteService, that spawned the Stream.

Regards,
Jonas

hajoko
Posts: 46
Joined: Thu Dec 18, 2008 2:05 pm
Location: Germany
Contact: Website

RE: LocalName

Mon Jan 05, 2009 3:38 pm

so it's only inside the header of bt package format, and that's not open?! What a pity :-( Would be much easyer to work with that.

regards

hajoko

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: LocalName

Mon Jan 05, 2009 5:36 pm

It's not that hard to keep track which Stream belongs to which device with a simple map in your code either.

Regards,
Jonas

Return to “BlueTools”