Forum Discussion

dahai2018's avatar
dahai2018
Copper Contributor
Aug 17, 2020

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

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.

  • dahai2018's avatar
    dahai2018
    Copper Contributor

    @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?

    • dahai2018's avatar
      dahai2018
      Copper Contributor

      @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.

      • Spigolo's avatar
        Spigolo
        Iron Contributor

        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.

Resources