.NET Components for Mobility

Device name request

Last post 05-20-2007 10:14 PM by alanjmcf. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-19-2007 4:23 PM

    Device name request

    Hi, i have created a multithreaded program using InTheHand lib for receiving files from mobile phones.

    All works fine, but i cant figure out how to get a device name, right after the file transfer or during it. The problem is, that most of those

    mobs turn BT radio on when sending file. For me, they appear to be out of range when the file is transfered.

    For file transfer i am using OBEX

    ObexListenerContext olc = ol.GetContext();
    ObexListenerRequest olr = olc.Request;    .......and so on

     

    and this...

    string name = bc.GetRemoteMachineName(BluetoothAddress.Parse(olc.Request.UserHostAddress));

    gives me just the MAC address 

     

    Any ideas?

     Thanks!
     

  • 05-20-2007 10:14 PM In reply to

    Re: Device name request

    Yup, sounds likely that the device will be 'out of range' after the transfer is complete.  Looking at the sources, getting the device's name currently isn't supported.

    You could add that feature if you want.  Get the sources from http://www.codeplex.com/32feet, and make changes like: to ObexListenerContext..ctor(Socket) fetch the device name just after it fetches the endpoint values, then add a new parameter to ObexListenerRequest..ctor and a matching public property RemoteDeviceName.  We could even include any such changes you make if you find it works well...

    Otherwise see Andy's ObexServer source code (downloads here) which use his Brecham.Obex library.  Although it appears not to get the device name currently one can see where one could (it currently prints out the RemoteEndPoint).

    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.
Page 1 of 1 (2 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.