Windows10 uwp program custom pairing device which set pin code BLE can not communicate normally?

%3CLINGO-SUB%20id%3D%22lingo-sub-1592165%22%20slang%3D%22en-US%22%3EWindows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1592165%22%20slang%3D%22en-US%22%3E%3CP%3EI%20use%20the%20uwp%20program%20to%20connect%20and%20pair%20BLE%20(low%20power%20Bluetooth%20module)%20under%20win10%2C%20reference%20and%20test...%20%2F%20windows%20universal%20samples%20master%20%2F%20samples%20%2F%20device%20enumeration%20and%20pairing%20%2F%20CS%20%2F%20scenario%209_%20CustomPairDevice%20Bluetooth%20custom%20pairing%20routine%2C%20for%20classic%20Bluetooth%20module%20and%20BLE%20module%20which%20do%20not%20set%20pin%20code%2C%20connection%20pairing%20is%20normal%2C%20and%20can%20communicate%20normally%3B%20for%20classic%20Bluetooth%20module%20with%20pin%20code%20setted%2C%20when%20connecting%20and%20pairing%2C%20a%20dialog%20box%20will%20pop%20up%2C%20after%20inputting%20pin%20code%2C%20normal%20communication%20can%20be%20achieved%3B%20but%20for%20BLE%20module%20with%20pin%20code%20setted%2C%20when%20connecting%20and%20pairing%2C%20no%20dialog%20box%20will%20pop%20up%20and%20prompt%20that%20the%20connection%20is%20successful%2C%20but%20communication%20is%20unnormal.%20Tracking%20found%20that%20the%20parameter%20pairing%20request%20processing%20function%20pairingrequestedhandler%2C%20pairingkind%20variable%20in%20devicepairingrequested%20EventArgs%2C%20is%20always%20%22confirmonly%22%20for%20ble%20modules%2C%20and%20it%20should%20be%20%22providepin%22%20for%20ble%20modules%20with%20pin%20code%20set.%20In%20this%20way%2C%20a%20dialog%20box%20will%20pop%20up%20to%20input%20pin%20code.%20Is%20this%20due%20to%20the%20windows10%20system%20and%20bluetooth%20driver%20problem%3F%3C%2FP%3E%3CP%3EIn%20addition%2C%20I%20can%20search%20the%20ble%20module%20with%20pin%20code%20in%20the%20settings%20interface%20of%20windows%2010%2C%20Bluetooth%20and%20other%20device%20pages%2C%20select%20and%20connect%2C%20without%20prompting%20the%20dialog%20box%20of%20pin%20code%20input%2C%20directly%20prompt%20to%20connect%2C%20but%20unable%20to%20communicate%3B%20search%20and%20connect%20classic%20Bluetooth%20module%20with%20pin%20code%2C%20prompt%20to%20input%20pin%20code%20dialog%20box%2C%20after%20input%2C%20the%20connection%20is%20normal%20and%20can%20communicate%3B%3C%2FP%3E%3CP%3EIn%20addition%2C%20using%20android%20app%20to%20connect%20and%20test%20ble%20Bluetooth%20module%2C%20if%20there%20is%20no%20pin%20code%2C%20it%20will%20be%20connected%20directly%2C%20and%20there%20will%20be%20no%20communication%20problem%3B%20if%20the%20pin%20code%20is%20set%2C%20a%20prompt%20box%20will%20pop%20up%20to%20input%20the%20password%2C%20and%20the%20communication%20will%20be%20OK%20after%20connection.%20It%20shows%20that%20BLE%20module%20has%20no%20problem.%3C%2FP%3E%3CP%3EThat%20is%20to%20say%2C%20there%20is%20no%20problem%20connecting%20the%20ble%20device%20with%20pin%20code%20under%20Android%2C%20but%20there%20is%20a%20problem%20under%20Windows%2010.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1597717%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1597717%22%20slang%3D%22en-US%22%3E%3CP%3E%40all%3C%2FP%3E%3CP%3EHow%20to%20solve%20the%20communication%20problem%20between%20uwp%20program%20and%20ble%20with%20pin%20code.%3CBR%20%2F%3EBy%20the%20way%2C%20is%20this%20question%20related%20to%20my%20version%20of%20win10%3F%20Can%20you%20confirm%20it%20for%20me%20%EF%BC%9F%3CBR%20%2F%3EMine%20is%20win10%20home%20edition.%20The%20win10%20system%20that%20HP%20brought%20when%20purchasing%20notebook.%3C%2FP%3E%3CP%3EMy%20question%20is%20clearly%20described%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1597988%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1597988%22%20slang%3D%22en-US%22%3E%3CP%3E%40all%3C%2FP%3E%3CP%3ETo%20add%2C%20my%20BLE%20device%20moudle%20is%20nrf52840%20(%20It's%20SDK%20is%20nRF5_SDK_15.3.0_59ac345%20).%3C%2FP%3E%3CP%3EIt%20and%20Android%20connection%2C%20pairing%2C%20communication%20is%20no%20problem%2C%20whether%20or%20not%20set%20a%20PIN%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1598047%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1598047%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F761360%22%20target%3D%22_blank%22%3E%40dahai2018%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20sorry%2C%20but%20I%20have%20no%20expertise%20to%20give%20you%20a%20proper%20reply%20on%20this%20issue.%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%2C%20seemingly%20it's%20hardware%20related%20and%20I'd%20get%20in%20touch%20with%20HP%20on%20the%20matter.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1598071%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1598071%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F759316%22%20target%3D%22_blank%22%3E%40Spigolo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20think%20HP's%20hardware%20is%20the%20cause%20of%20the%20problem.%20I%20tested%20the%20Lenovo%20laptop%20with%20the%20same%20result.%3C%2FP%3E%3CP%3EI%20think%20it%20may%20be%20related%20to%20the%20BLE%20driver%20of%20windows%2010%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1600355%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1600355%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F759316%22%20target%3D%22_blank%22%3E%40Spigolo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20think%20of%20ways%20to%20recommend%20or%20find%20experienced%2C%20professional%20person%20to%20help%20me%3F%3C%2FP%3E%3CP%3EThis%20problem%20has%20been%20bothering%20me%20for%20months.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1600545%22%20slang%3D%22en-US%22%3ERe%3A%20Windows10%20uwp%20program%20custom%20pairing%20device%20which%20set%20pin%20code%20BLE%20can%20not%20communicate%20normally%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1600545%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F761360%22%20target%3D%22_blank%22%3E%40dahai2018%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20try%20to%20ask%20in%20the%20Developer's%20Forum%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-us%2Fhome%3Fcategory%3D%26amp%3Bforum%3D%26amp%3Bfilter%3D%26amp%3Bsort%3Drelevancedesc%26amp%3BbrandIgnore%3Dtrue%26amp%3BsearchTerm%3Dble%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMsdn%3C%2FA%3E%3C%2FP%3E%3CP%3Eor%20in%20Technet%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2FForums%2Fen-us%2Fhome%3Fcategory%3D%26amp%3Bforum%3D%26amp%3Bfilter%3D%26amp%3Bsort%3Drelevancedesc%26amp%3BbrandIgnore%3Dtrue%26amp%3BsearchTerm%3Dble%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETechnet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I use the uwp program to connect and pair BLE (low power Bluetooth module) under win10, reference and test... / windows universal samples master / samples / device enumeration and pairing / CS / scenario 9_ CustomPairDevice Bluetooth custom pairing routine, for classic Bluetooth module and BLE module which do not set pin code, connection pairing is normal, and can communicate normally; for classic Bluetooth module with pin code setted, when connecting and pairing, a dialog box will pop up, after inputting pin code, normal communication can be achieved; but for BLE module with pin code setted, when connecting and pairing, no dialog box will pop up and prompt that the connection is successful, but communication is unnormal. Tracking found that the parameter pairing request processing function pairingrequestedhandler, pairingkind variable in devicepairingrequested EventArgs, is always "confirmonly" for ble modules, and it should be "providepin" for ble modules with pin code set. In this way, a dialog box will pop up to input pin code. Is this due to the windows10 system and bluetooth driver problem?

In addition, I can search the ble module with pin code in the settings interface of windows 10, Bluetooth and other device pages, select and connect, without prompting the dialog box of pin code input, directly prompt to connect, but unable to communicate; search and connect classic Bluetooth module with pin code, prompt to input pin code dialog box, after input, the connection is normal and can communicate;

In addition, using android app to connect and test ble Bluetooth module, if there is no pin code, it will be connected directly, and there will be no communication problem; if the pin code is set, a prompt box will pop up to input the password, and the communication will be OK after connection. It shows that BLE module has no problem.

That is to say, there is no problem connecting the ble device with pin code under Android, but there is a problem under Windows 10.

6 Replies
Highlighted

@all

How to solve the communication problem between uwp program and ble with pin code.
By the way, is this question related to my version of win10? Can you confirm it for me ?
Mine is win10 home edition. The win10 system that HP brought when purchasing notebook.

My question is clearly described?

Highlighted

@all

To add, my BLE device moudle is nrf52840 ( It's SDK is nRF5_SDK_15.3.0_59ac345 ).

It and Android connection, pairing, communication is no problem, whether or not set a PIN code.

Highlighted

Hi @dahai2018  

I'm sorry, but I have no expertise to give you a proper reply on this issue. 

Anyway, seemingly it's hardware related and I'd get in touch with HP on the matter.

Highlighted

@Spigolo 

I don't think HP's hardware is the cause of the problem. I tested the Lenovo laptop with the same result.

I think it may be related to the BLE driver of windows 10

Highlighted

@Spigolo 

Can you think of ways to recommend or find experienced, professional person to help me?

This problem has been bothering me for months.

Thanks.

Highlighted

@dahai2018  

You could try to ask in the Developer's Forum:
Msdn

or in Technet:

Technet