Page 1 of 1

DeviceLost

Posted: Sat Nov 19, 2005 1:47 am
by acote
I can't seem to get DeviceLost to throw an event.

I set up the connection OK and can send data.

I added event handlers

m_network.Error +=new BlueToolsEventHandler(m_network_Error);
m_network.DeviceLost +=new BlueToolsEventHandler(m_network_DeviceLost);
but neither gets an event if I turn off the connected Bluetooth device.

What am I doing wrong?

RE: DeviceLost

Posted: Sat Nov 19, 2005 2:43 pm
by Andreas2
This event is only fired if you perform a discovery.

Code: Select all

m_network.Error +=new BlueToolsEventHandler(m_network_Error);
m_network.DeviceLost +=new BlueToolsEventHandler(m_network_DeviceLost);

m_network.DiscoverDevicesAsync();
If you want to receive this event at an arbitrary point of time in your application, you can set m_network.AutoDiscovery = true.

Regards,
Andreas Nilsson
Franson Support