Results 1 to 14 of 14

Thread: bluetooth

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    bluetooth

    hey there. hope someone can help
    I am going to be designing a .NET app which uses bluetooth technology to send and recieve data.

    what I want to know is - on my server computer (I will be having a usb bluetooth stick connected to it).... how can I "listen" for data incoming to the bluetooth device?

    I will have another device which will send data to it but would like to know how to send/recieve data in .NET

    is it possible? how?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: bluetooth

    When I Googled this subject, all I got were hits from other forums, like this one, where someone asked pretty much the same question you have.

    I have yet to read anything on C# and bluetooth. I know BlueTooth has their own Q&A section, but you sign up for it (I think it is free, but I'm not sure.) Perhaps asking them would reveal something of interest.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    thanks very much. where is this bluetooth page?

    of course, once I find out and have developed the application, i am more than happy to write up all the information the users here at vbforums require. I just need a starting point and im all set

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: bluetooth

    Actually, you probably want to investigate two bluetooth sites:

    http://www.bluetooth.com/

    https://www.bluetooth.org/ - and off of this site, check out:

    https://www.bluetooth.org/forum/forum.php?forum_id=271

    If you do find out anything interesting, let us know.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    Thanks Hack - much appreciated this thread will be updated by myself - no doubt about it

    What I found out was that when you install the drivers for your bluetooth device on your PC - you can apperently (dont know for sure) assign it to a com port - therefore you can then implement and use the sockets framework in .NET.....

    however still trying to see how to actually create an instance to send/recieve data through that com port (if that is true)

    need to go out and buy a usb bluetooth adapter later on today....

    update:

    apperently Microsoft released in May this year some sort of bluetooth wrapper which allows the win32 api classes to be exposed in VS.NET. however the support to run this on mobile devices requires Windows Mobile v5 (doh! I have v4 (2003))

    still searching to see if there is a way of doing this using .NET framework 1.1
    Last edited by Techno; Jul 18th, 2005 at 06:59 AM.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: bluetooth

    One last thing...when I was Googling I did see (although I didn't check them out) links that alledgedly had C++ bluetooth examples. If you don't get anything useful from their Technical Q&A forum, you might want to check those out and see what degree of difficulty (or possibility) it would be to try and translate the examples into C#

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    true but i think it depends if there are classes in the framework to support whatever it is they are referring to in C++

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: bluetooth

    You can always refer to it even if it is API calls. But it will make your application non portable. But I guess your app is non portable all ready since you are relying on Windows Mobile?


    - ØØ -

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    well im going to head off to buy a USB bluetooth device - up to the range of 100m... (ladies: ) oooOOOooo....

    if you find anythin - lemme know. ill keep you updated too.

    btw - do you happen to have a smartphone? if so - maybe you can test some stuff for me too? if not - no problemo

    peace!

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: bluetooth

    After some more searching, it looks like you can do a device inquiry over sdp (Service Discovery Protocol) to find if a BlueTooth device is attached to the PC. This is an API, so I guess it is platform dependendt, but at least that way it will not be device specific too.

    - ØØ -

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: bluetooth

    Quote Originally Posted by NoteMe
    After some more searching, it looks like you can do a device inquiry over sdp (Service Discovery Protocol) to find if a BlueTooth device is attached to the PC. This is an API, so I guess it is platform dependendt, but at least that way it will not be device specific too.

    - ØØ -
    You can do this in C#?

  12. #12
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: bluetooth

    Quote Originally Posted by Hack
    You can do this in C#?

    I havn't tested. But since it is an API call, I guess you can just use DllImport to import the right dll, and then declear the SDP function(s) you need, and go from there.

    That way it will be even easier to port C++ code. But it will make the app platform dependendt (or more correct said: "only work on Win").

    XP SP1 also comes with a Bluetooth interface. But I have read a bit up on it, and it sounds like a far more diffictult path to go.


    - ØØ -

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    i'll figure it out - dnt worry. i will also ask some of my collegues as i work for a known software company... (shhh)

    just bought the USB stick bluetooth thingy.... hopefully will do something.... ill get there and then will post up the code or whatever i achieve

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: bluetooth

    well i found a great video on msdn bloggs about bluetooth and windows mobile etc... however the code was written in embedded C++ (dont really understand it much)....

    need to find out how the heck to start this in C#

    I have my bluetoooth device connected, guessing it's on COM6/COM8... its paired up with my phone... just need to access it now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width