We want to add Bluetooth Low-Energy connectivity into a java application that executes on Windows computers. To do so, we are using JNA to interact with a dll written in MSDN C++. This dll is the one in charge of invoking the libraries, classes and methods that Microsoft Windows provides to interact with the hardware in the computer. We are developing this dll by ourselves. It’s a C++ Regular dll Dynamically linked to MFC (Microsoft Foundation Class libraries) that consumes WRT extension. We are using Visual Studio 2007 Community.
We are basically invoking the libraries Windows.Devices.Enumeration.dll and Windows.Devices.Bluetooth.dll from Windows OS.
Until now we have managed to list all BLE devices that are in range and we have gained connection with a BLE device given its Bluetooth ID. Now we are trying to implement the last part: GATT communication. However, during development we are facing problems, mainly compiler and runtime errors related mainly to our inexperience on interacting with Windows and using Visual Studio.
For instance, right now we are facing WinRT exception: “Microsoft C++ exception: Platform::InvalidCastException ^ at memory location …. No such interface supported” when calling Windows:.Devices::Bluetooth::BluetoothLEDevice::GetGattServicesAsync() .
A person with experience in this kind of development, who could help us to solve these errors and/or finish this dll implementation, would be of help for us.