.NET Components for Mobility

LastUsed on bluetooth device report wrong

Last post 02-10-2010 6:56 AM by superarcan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-09-2010 4:04 AM

    LastUsed on bluetooth device report wrong

     I use this code on a loop with InTheHand.Net.Personal.dll (v 2.2.0) on windows XP 32bit:

    BluetoothDeviceInfo btdev = new BluetoothDeviceInfo(btAddress);
    btdev.Refresh();
    Console.WriteLine(btdev.LastUsed.ToLocalTime().ToString());

    Console.WriteLine(btdev.LastSeen.ToLocalTime().ToString()); 

    the LastUsed always is equal with LastSeen

    but the device comunicate with computer (it is a HID device, like a keyboard, the actions can be monitored easy) and if i use a DiscoverDevices,  LastUsed is reported well.

    what to do not tu use  DiscoverDevices ?

    10x

     

  • 02-10-2010 5:54 AM In reply to

    Re: LastUsed on bluetooth device report wrong

    Those properties are read from the Microsoft Bluetooth stack in this case.  Unfortunately they're often wrong. :-(  I keep meaning to ask MSFT if they're planning to fix this anytime

    In detail, I thought that LastUsed was always wrong, always just containing the current time when the discovery operation was carried out -- even for devices not in range!  I thought LastSeen was kind of correct, containing DateTime.MinValue mostly but if the device has been used in the current boot then it did contain a correct value.  That's what it seems like on my XP box here.

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 02-10-2010 6:56 AM In reply to

    Re: LastUsed on bluetooth device report wrong

    Thank you, firs i think is my code.
Page 1 of 1 (3 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.