acote
Posts: 5
Joined: Thu Nov 17, 2005 2:44 pm
Location: USA
Contact: Website

DeviceLost

Sat Nov 19, 2005 1:47 am

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?

Andreas2
Posts: 108
Joined: Sun Feb 13, 2005 3:19 pm

RE: DeviceLost

Sat Nov 19, 2005 2:43 pm

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

Return to “BlueTools”