.NET Components for Mobility

32feet on Widcomm stack

Last post 01-20-2010 8:52 AM by KhanZeeshan. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 03-14-2009 1:15 PM

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    32feet on Widcomm stack

     Dear Forum,I haven't been able to find any dublicate posts of this, but please excuse me if i'm wrong. 

    My group and I have a setup of a few computers, all running Windows XP SP2 or SP3, and all are using the Widcomm stack. Their purpose is to connect to bluetooth devices, who are yet to be defined more clearly. 

     After a whole lot of searching, my group found this http://32feet.codeplex.com/SourceControl/changeset/view/47974, its the source for  32feet on Widcomm. It contains some projects, and dll files.

    Here's my question. After download, what next?

    We have tried to build some of the DLL files, but are unable to use them for anything. We are right out clueless of the use of the project. It says Widcomm, so we guess it should work. But we honestly have no idea how to use it. The Readme files doesn't really give us any ideas.

    Thanks in advance :) 

  • 03-14-2009 1:24 PM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

     Just to note, we have downloaded and installed both Widcomm SDK and the 'normal' 32feet SDK.

    We have also tried to copy the pre-built DLL files into our projects, and most other locations we could think of.

    We have also tried to include some of the other projects in our solution, but then it complains over a missing DLL file, which we don't know where to put. 

  • 03-15-2009 7:05 AM In reply to

    Re: 32feet on Widcomm stack

    There's some info in the "32feet and Widcomm-Broadcom.doc" document in the "InTheHand.Net.Personal_Widcomm/Widcomm" folder.  However it may be a bit unclear there too.

    So.  The current release and the repository trunk supports only the MSFT stack for now.   The code in the InTheHand.Net.Personal_Widcomm branch adds support for Widcomm.  Because the Widcomm API is C++, we unfortunately need a native DLL to allow P/Invoke to call the API.  Thus, at runtime the managed assembly (InTheHand.Net.Personal.dll) needs to be able to load the native DLL (32feetWidcomm.dll).

    So, to use the current Widcomm support, download that branch (as you've done) and compile the managed library for your platform (project InTheHand.Net.Personal or InTheHand.Net.Personal.CF2).  Then -- for strong name reasons[1] -- compile your program against that library assembly.  At runtime your program needs to be able to load both the managed and native DLLs.  Normally by having both in the same folder as it. (myapp.exe, InTheHand.Net.Personal.dll, and 32feetWidcomm.dll)

    Finally, and this might not apply to you, if you want to also use the library on devices with the MSFT stack, from the doc: "The detection of the MSFT stack is disabled in the repository to simplify the experience of users with Widcomm devices.  To enable MSFT-stack detection see "InTheHand.Net.Bluetooth.BluetoothFactory.s_knownStacks"."

    Alan

     

    [1] The release library is strong named, but the version you will build from the repository isn't so an application compiled against the former would not load the latter.

    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.
  • 03-15-2009 7:43 AM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

     Hi Allan, Thanks for your most helpfull reply :)

     I am still experiencing some problems - it throws "PlatformNotSupportedException" in the BluetoothFactory :)

    I've copied the the '32feetWidcomm.dll' from InTheHand.Net.Personal_Widcomm/Debug folder. I believe that it is a DLL that I have compiled myself. It has been compiled with AssemblyKeyFile commented out. 

    Then I copied the 'InTheHand.Net.Personal.dll' from the Program Files/In The hand/32feet.NET 2.2/Assemblies/XP2 folder. I suspect that this might be wrong?

    I can see that I still have a lot to learn, iv'e only recently started on C#. I have little or no idea of what is actually going on.

    Can you see or tell me what is wrong? :) 

  • 03-15-2009 9:12 AM In reply to

    Re: 32feet on Widcomm stack

    I'm a bit confused, there is no BluetoothFactory class in Program Files/In The hand/32feet.NET 2.2/Assemblies/XP2/ version.  Did you really copy the library assembly from there?

     

    Anyway, can you load the 32feetWidcomm.dll file in the "Dependency Walker" tool (depends.exe) that should have been installed by VisualStudio (IIRC).  In the module tree on the left the first child should be BTWAPI.dll.  depends.exe screenshotIt is loaded, or is it black/yellow question mark?

    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.
  • 03-15-2009 9:35 AM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

    Hi Allan, Thanks for your reply :) 

    Hmm.. I must have confused the folders, i'm sorry :) But now that I have copied the right file in to the folder, it complains over a null reference. Should Istick with the new fil, or was I right before? :)

    There is a yellow questionmark on the BTWAPI.DLL in the dependency walker :) 

    I'm sorry for not knowing that much about this, its still a very new thing for me :) 

  • 03-15-2009 10:59 AM In reply to

    Re: 32feet on Widcomm stack

    The missing BTWAPI.dll suggests that the Widcomm stack is not installed, or see below...  Do you see the Widcomm control panels (icon in taskbar)?  (And not the MSFT one?)  What version of the stack do you have?  And does it appear to work otherwise?

    If so, also unzip the following file beside your application, http://www.alanjmcf.me.uk/TEMP/btwapi%20x32.ZIP (assuming you're on an x32 box).  See also http://www.alanjmcf.me.uk/TEMP/BTW%20release%20btwapi.png and maybe then you can copy it to \WINDOWS\system32

    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.
  • 03-15-2009 11:47 AM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

     Hi Allan, thanks for your reply :)

    My Bluetooth works fine, it finds the active units in the area, and is able to connect to them as well.. I'm using a HP Integrated Module with Bluetooth wireless technology 5.1.0.4800. Not sure if that is the version of the driver, or stack. 

    Under diagnosis, it says that it is produced by Broadcom Corporation, Firmware version 2.1.207.297.

     The BTWAPI.dll you sent me, is the same that is in the Widcomm folder. There is no difference in the application when copied to system32.

    However, loading 32feetWidcomm.dll file in the Dependency Walker, shows 2 questionmarks, MSVCR80.dll and  DWMAPI.dll, both under the BTWAPI.dll file.

    Searching a bit, locates the MSVCR file in over 10 different location on the system. While DWMAPI.dll is nowhere to be found.

    I'm not sure what i'm supposed to do with the BtWdSdkLib.lib file. It doesn't sound like the system needs it.. 

  • 03-15-2009 12:27 PM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

     A little update, placing the MSVCR80.dll in the same directory as the application itself, solves the first problem of missing dependency, now it seems that some other smart people have found that you do not need to worry about the DWMAPI.dll, as it is loaded later, and apparently only for Vista.

    Now i'm still stuck with the PlatformNotSupportedException, in the bluetooth factory. I'm in fact using the InTheHand.Net.Personal.dll from the 32feet-47974\InTheHand.Net.Personal_Widcomm\InTheHand.Net.Personal\obj\Release directory, marked as version 2.3.0.0. [Edit: wrong version number]

    It would seem that it can't find the Widcomm stack, as you said earlier, but I just installed the drivers of HP's support site yesterday. Can I force it to find the stack somehow? This project only needs to work on a few machines, who are all equal in setup and hardware, hardcoding is acceptible :)  

  • 03-15-2009 2:26 PM In reply to

    • j1x4r
    • Top 150 Contributor
    • Joined on 03-09-2009
    • Posts 7

    Re: 32feet on Widcomm stack

     It seems that I have solved the problem now :)

    I took the 32feetWidcom.dll from the 32feet-47974\InTheHand.Net.Personal_Widcomm\Debug folder, and copied it right into the system32 directory.. Now it works. I can even remove the MSVCR80.dll from the project directory.

     Thank you for your help, I don't think that I could have solved my problems without it :)

    I will now try to understand what is going on.. But consider this case resolved :) 

    Bye bye :) 

  • 03-15-2009 3:53 PM In reply to

    Re: 32feet on Widcomm stack

    Glad to hear you got it solved!

    I was presuming your machine would have the correct C-runtime libraries, but apparently not.  I'll add a note to the docs for others to follow, and think a diagnostic app would be useful too.  Testing if out DLL is loadable, and if the BTWAPI dll is loadable, etc etc.

    You shouldn't need to have any of our DLLs in the Windows directories.  On my testing box I have the DLLs in the same folder as the application and that works.

    Hope the rest goes easier.  All the basics are there, I've some things still to implement such as bonding and receive flow control to do still however see the doc in the repository.

    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.
  • 01-20-2010 8:52 AM In reply to

    Re: 32feet on Widcomm stack

    can anyone help me..i'm facing the same problem..i did everything suggested here & almost every thread here..but still i'm getting the same RSSI value.. "-2147483648 " ...i'm developing desktop application using C# for windows 7 using VS 2008 & 32feet..
    Regads; Zeeshan Ahmed Khan
Page 1 of 1 (12 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.