Bluetooth APIs in Windows/.Net? - c#

I am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are appreciated.
Thanks!

One problem with Bluetooth on the PC is that there are several BT stacks in use and you can never quite know which one is available on a given machine. The most common ones are Widcomm (now Broadcom) and Microsoft (appeared in XP, maybe one of the service packs). However, some BT hardware vendors package BlueSoleil and some use Toshiba. Most dongles will work with the MS stack so the .NET libs I've seen tend to use that.
Each of the stacks has a totally different way of doing the discovery part where you browse for nearby devices and inquire their services.
If I had to pick one approach today I'd probably do the discovery in C++ and add an interface for .NET.
The 32feet.net stuff worked pretty well when I tried it but didn't support the Widcomm stack.

There is also Peter Foot's 32feet.net
http://inthehand.com/content/32feet.aspx
I've played around with this back when it was v1.5 and it worked well.

Mike Petrichenko has a nice BT framework. It works with BlueSoleil, Widcomm, Toshiba and Microsoft.
It is now called the Wireless Communications Library and works with Bluetooth 802.11 and Infrared. Mike named the company Soft Service Company and sells non-commercial and commercial licenses with and without source code in prices ranging between $100 and $2050.

Related

VoIP/SIP Soft Phone C# WPF

I need to write VoIP/SIP Soft Phone in C# using WPF interface with Audio support only.
I need to have call transfer, call conference, and recording of conversations in mp3.
I've looked at VoIP SDK from ABTO LLC, but it is slow at application startup (30 seconds to start application, I think it's related to loading activex part of this sdk).
I've also looked at SIP.Net, but it's only for SIP and doesn't contain components for voice data transfer.
I have very limited time only 2 months from zero to fully working app.
What SDK can I use to accomplish this task?
Windows 7 must be supported.
We have done this using SipekSDK. It's written on top of famous pjSIP open source SIPClient project. It does all the operations you have mentioned in the question.
https://sites.google.com/site/sipekvoip/
What is the Sip server you are going to use ? If its not asterisk, you can have a look of microsoft's Lync here.
You can download the Lync SDK and start exploring. Not just the audio call, Microsoft Lync has features like video call, chat, presence, conference etc.... and ofcourse connectivity to landline/pstn through voip providers
Another interesting article explaining the different SDKs for unified communications can be found here
Edit: If its for Asterisk, Sipek is the only available free opensource but we had lot of problems in installing in clients system like
C folder access
Poor device
support
Port conflict- If any
other voip app like qutecom runs on
5060, then Sipek wont run as the
port is being used already.
I struggled with this exact issue and eventually came across ABTO LLC.
They have an SDK available that supports Win 7, Win XP and can be used in WPF.
We did ask them though to build a separate SDK example for us as we are using ClickOnce for our deployments and so registering external libraries is impossible, but they graciously did it and i think have integrated into their SDK, if not then ask them to give it to you.
We are using a FreeSwitch SIP Server combined with ABTO's library and it is working like a dream. We are doing VoIP, Video and Conferencing and have had no issues at all.
The application I added the VoIP functionality to is a WPF 4 app.

C# - Fingerprint Biometrics

We are wanting to add support for fingerprint authentication in a .Net 3.5 application.
We currently are only using the sdk from Griaule. But this only supports like 5 usb plug-and-play devices. We are wanting to support most readers included with laptops, tablets, etc.
Is there a universal way to support many devices? I know there is a new standard starting with Windows 7, but we want to support XP and higher.
Is there even a .Net SDK out there for UPEK or Authentec devices?
Any ideas or help would be appreciated.
I think its best if you develop for WBF, also if you want UPEK has an API called BSAPI that you can interop in C#.
There is no universal way to support all biometric devices. This a relatively new technology and all vendors are fighting for market space any one with their own API/SDK. New modalities of biometric are been developing and no have any retro compatibility with another biometric modalities. One of these is finger and palm vein. Another it is multispectral fingerprint capture that is a patented technology.
An initiative that tried to do that universal API was BioAPI, created by BioAPI Consortium. This standard becomes an ISO standard: ISO 19784-2. Therefore didn`t have participation of biggest vendors of biometric devices. And if you read the specification you will see how complicated is to use it...
Another initiative are been taken by NIST with webservices where any biometric device will have an internal webservice to supply biometric data and images and another system will be in charge of matching and decision process.
Anything different this is commercial tools like Griaule, Neurotechnology and Aware that tries to be a universal way to access biometric devices...
I am going to say there is no such SDK for universal fingerprint reading.
After a week or so of researching, it looks like the only thing with promise is Windows 7's WBF (Windows Biometric Framework).
It will be a couple of years before this is a viable option.
http://www.digitalpersona.com/
This company offers a great SDk that gives you actual fingerprint data. I'm not sure if it's for just the device they offer or if it's standard for other devices, however, there biometrics are very, very nice.
Griaule supports a great number of readers, including UPEK and Authentec readers. Their SDK is great and very simple to use. You can check here the readers they support http://www.griaulebiometrics.com/page/en-us/fingerprint_sdk/supported_readers

Microsoft Bluetooth Stack into Widcomm Bluetooth Stack?

I have the following problem:
I implemented a managed mobile application for Windows Mobile devices using the C# Bluetooth library of InTheHand.
Now I figured out that the new devices of HTC will all have the Widcomm Bluetooth stack instead of the Microsoft Bluetooth stack...
Does anybody know some working C# library for the Widcomm Bluetooth stack? And also how limited the widcomm api is, concerning e.g. being able to turn bluetooth on/off or having an Obex listener?
Thanks for any hints!
Firstly the disclaimer, I'm the maintainer of the 32feet.NET library. :-)
Version 2.4 of 32feet.NET from InTheHand includes Widcomm/Broadcom support. Have you tried that? I get the feeling you might have...
To run ObexListener firstly we'd need a way to disable Widcomm's built-in OBEX server (if that can be done I can make the changes necessary to have ObexListener run). There might be support for enabling/disabling the radio on CE/WM -- I think that API is missing on Win32 however.
The other options with ObexListener are to run it on a personal Service Class Id, as long as the client app knows that it will work. Or perhaps you could use the Widcomm API directly, which might allow you to intercept the PUT objects you need...

Snapping pictures from Windows C# Canon SDK vs PTP or MTP

I am hoping to receive some general guidance on accomplishing a seemingly simple goal. I have a DSLR camera (Canon EOS 50D) and need to write an application that will tell the camera to take a picture. I also need to transfer the picture to the computer and possibly delete it from the camera's storage. A bonus would be to get a live preview from the camera in my application. My environment will be Windows (either XP Pro or Vista Enterprise) and .Net 3.5 (C#).
I have done some research and found a couple of options. One I know will work, but limits me to using only Canon cameras in the future. I have found and downloaded an SDK from Canon that provides a lot of this functionality. I've looked over the SDK and while it's extensive and written in C it does have C# wrappers that will speed up development a bit.
Another option I've found is called Windows Portable Devices. Apparently, it is an API that will talk to devices that implement PTP and MTP standards. It is COM based and as far as I can tell it has no .Net wrappers. This is not however a show stopper. I could P/Invoke the functionality I need or write a Managed C++ DLL to use in my application to talk to the camera.
I am looking for anyone with experience with WPD to give me pointers. I've perused the documentation and seen references to transferring images and deleting images. I have not, however, seen mention of commands to take a picture, get a preview image, or say focus/auto-focus.
The WPD api provides the command WPD_COMMAND_STILL_IMAGE_CAPTURE_INITIATE
I am not sure whether your camera supports it but it should be simple enough to find out. If you can get the "wpdinfo" tool from the driver development kit and start it with your camera connected then send it a WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_COMMANDS command and see if it supports the still image capture command. IF so then you could give that a try.
The comment from TallGanglyGuy is incorrect. ptp does allow you to trigger new images and change exposure, etc. Some cameras have firmware that only exposes some of the ptp commands.
PTP supports common device controls, such as taking a picture, so that
the user could take advantage of the PC/camera combination in new and
different ways again, without requiring additional software.
quoted from http://msdn.microsoft.com/en-us/windows/hardware/gg463507.aspx#EXC
try my Eos Framework: https://github.com/esskar/Canon.Eos.Framework
IMHO it's a better alternative then the .cs file that comes with the SDK.
PTP and MTP are both protocols for transferring files from a digital still camera (DSC). The protocols provide no functionality for triggering new images, or setting exposure control. You will be stuck using the camera specific SDK. If you want multiple vendor support Nikon has an SDK that provides similar support as the Canon SDK for their cameras.
More info on PTP and MTP can be found here:
http://en.wikipedia.org/wiki/Picture_Transfer_Protocol
and
http://en.wikipedia.org/wiki/Media_Transfer_Protocol
EDIT
I forgot to mention that WIA may be interesting to you, assuming your camera's driver provides a WIA interface.
This is really generic, but it may help.
I had to write an application that used two different bar code scanners from two different vendors with different SDK's. I created an interface that defined the methods and events that I wanted to code for, and then wrote adapter classes that implemented my interface.
This worked well in my case, and switching from one to the other was pretty seamless. If you took the same approach, you wouldn't be totally dependent upon one SDK.

Bluetooth for WindowsCE 5.0 and .NET2.0 with C#

I'm looking library, to create Bluetooth connection between my device and other devices.
I want use:
.NET2.0 for Windows Mobile
WindowsCE 5.0
If you're using a particular device, most companies have a useful SDK available with Bluetooth functions/routines.
However, if you're looking for generic abilities across multiple devices you could check out 32Feet.net or OpenNetCF.
Be warned though, that if you're using CE 5.0 the bthutil.dll is not included by default anymore, so many of the functions in 32Feet.net (In the Hand) won't actually work.
Have not done much with it myself (yet), but I've read that Mobile in the Hand has nice managed libraries that included Bluetooth support.
You may need to go a bit further on what you are wanting to do exactly.
There are many different solutions based on the state of your project, are you already paired with the hand-held and the PC?
I was once able to get Windows Mobile device with .NET Compact Framework 2.0 installed to communicate with PC using 32feet.NET library. You may want to have a look.

Categories