Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

.net - Bluetooth in C#, Which stack, Which SDK?

We've got an application which needs to be able to use bluetooth for the following requirements:

  1. Receive files from bluetooth devices (up to 2 devices at the same time)
  2. Display all bluetooth devices in range
  3. Send files to bluetooth devices
  4. Scan for bluetooth devices and transfer files at the same time

We're running on Windows XP.

I've done some looking around and there seems to be 3 main stacks:

BlueSoleil

On the BlueSoleil website, in their SDK section, it seems to mention only 1 connection is supported, which is obviously no good.

Windows

Only seems to support 1 bluetooth dongle, which will probably mean we can't meet all our requirements.

Widcomm

Expensive and potentially overkill? More complex API? Thoughts?

In terms of SDK for C#, was looking at Franson Bluetools, anyone used this API?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Firstly the disclaimer, I'm the maintainer of the 32feet.NET library. :-)

I've just checked, and on XP with the Microsoft stack (using one dongle) I can concurrently be receiving two OBEX PUTs and also discovering devices. That's using 32feet.NET's ObexListener class and the BluetoothClient.DiscoverDevices method. To send the OBEX PUTs one can use its ObexWebRequest class. To do multiple parallel connections with ObexListener I just had multiple threads calling its GetContext() method.

So that's maybe simpler than we thought...

I've also tested it with Andy Hume's OBEX Server using his Brecham.Obex library and the concurrent receive works fine there too. Its available from http://32feet.net/files/folders/objectexchange/entry6511.aspx.

On our Widcomm support. Hopefully it doesn't seem too "incomplete" on the client side... Inquiry (device discovery) and connections all work. The server-side still needs a little work however and there are some things the Widcomm API simply doesn't support eg. (programmatic authentication handling).

What was the issue with the samples? Compile-time or run-time? On MSFT stack or Widcomm? Follow-up at http://32feet.net/forums/37.aspx if you prefer.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...