Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: BluetoothLE in Windows 10 to Microchip RN-4020 module?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 23, 2017 9:26 AM Last Post By: Remy Lebeau (Te... Threads: [ Previous | Next ]
Fergus Dixon

Posts: 16
Registered: 5/10/07
BluetoothLE in Windows 10 to Microchip RN-4020 module?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2017 8:23 PM
Hi, we are trying to implement a BLE interface from a Windows 10 laptop to a remote Micochip RN-4020 module.

We completed the proof of concept using the BLE Scanner app in FireMonkey and using a MAC Mini. The service required ended with 301 and this service allows the I/O characteristic to be written and after subscribing to be read from.

In Windows 10, the same service appears along with some other services but now data can only be written to from the Win10 side. The onCharacteristicRead callback never fires.

Any help would be much appreciated. Thanks

Edited by: Fergus Dixon on Oct 17, 2017 8:23 PM
Fergus Dixon

Posts: 16
Registered: 5/10/07
Re: BluetoothLE in Windows 10 to Microchip RN-4020 module?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 22, 2017 3:03 PM   in response to: Fergus Dixon in response to: Fergus Dixon
Here is some more info:
https://social.msdn.microsoft.com/Forums/es-ES/58da3fdb-a0e1-4161-8af3-778b6839f4e1/bluetooth-bluetoothledevicefromidasync-does-not-complete-on-10015063?forum=wdk

It appears that the coInitializeSecurity function needs to be called as below. Does anyone know how to do this. When I add coInitializeSecurity Delphi complains about an undeclared identifier.

"O:BAG:BAD:(A;;0x7;;;PS)(A;;0x3;;;SY)(A;;0x7;;;BA)(A;;0x3;;;AC)(A;;0x3;;;LS)(A;;0x3;;;NS)"

CoInitializeSecurity(
absoluteSddl, // Converted from the above string.
-1,
nullptr,
nullptr,
RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IDENTIFY,
NULL,
EOAC_NONE,
nullptr);
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: BluetoothLE in Windows 10 to Microchip RN-4020 module?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 23, 2017 9:26 AM   in response to: Fergus Dixon in response to: Fergus Dixon
Fergus Dixon wrote:

It appears that the coInitializeSecurity function needs to be called
as below. Does anyone know how to do this. When I add
coInitializeSecurity Delphi complains about an undeclared identifier.

CoInitializeSecurity() is declared in Delphi's Winapi.ActiveX unit, so
add that to your uses clause if needed.

RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IDENTIFY, and EOAC_NONE are
not declared in any Delphi RTL unit, so you will have to declare them
manually in your own code:

const
  RPC_C_AUTHN_LEVEL_DEFAULT = 0;
  RPC_C_IMP_LEVEL_IDENTIFY = 2;
  EOAC_NONE = 0;


--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02