beat.v
Posts: 1
Joined: Thu Mar 12, 2009 6:19 pm

BT workaround (wait till device is sending)

Thu Mar 12, 2009 6:26 pm

Hi there,

I use Franson Bluetools and it works great - if my sending device is already in bluetooth mode and sending.
My device sends the bt message at any time. I have no clue, when this happens.

How can I figure out, if my device is ready to send or not? - May build like a loop till I get any input from the sending device.
Or is there a workaround? Mean, can I put the bt service code in a separate class (thread) which runs all the time and gives me feedback if there is a bluetooth sending?

Thanks for help.
Beat

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

RE: BT workaround (wait till device is sending)

Thu Mar 12, 2009 7:58 pm

You need to know whether the remote device is ready to connect to?
The only way to do this is to attempt to get a Stream from the RemoteDevice.
If it works, the device is ready, if it fails it's not.

Regards,
Jonas

Return to “BlueTools”