none
Persisting Bluetooth pairing Windows Embedded Compact 7 (WEC7) Error decrypting key or pin... RRS feed

  • Question

  • Hello, 

    I'm getting the following debug traces when I reboot my WEC7 device having previous paired a Bluetooth device to it:

    4294807069 PID:400002 TID:34e0006 [ERR] 
    4294807070 PID:400002 TID:34e0006 [SHELL] DecryptRegistryBlob : Error decrypting key or pin...
    4294807070 PID:400002 TID:34e0006 Assert broken in d:\bt\2651\private\winceos\net\bluetooth\btd\sys\btdregstore.cpp line 142

    As you can see the assert is in private code so i'm struggling to see what's going wrong. Any help would be greatly appreciated.

    The setup i'm using is as follows:

    USB Bluetooth CSR dongle.

    I've got cloned the BTSVC (WINCE700\public\common\oak\drivers\bluetooth\SAMPLE\btsvc) driver which overrides the Pin entry UI and automatically sets the pin when a pairing request comes in. This seems to work fine, I can pair with no problems using BthSetPin.

    Once i'm paired I check the registry at HKLM/Comm/Security/Bluetooth/<MAC> and the associated Key and Pin values are present for my device. 

    Once paired I use both a serial port connection and a PAN connection, both of which work fine.

    I flush the registry and save to an external disk which is then loaded on the next boot. This is where I get the above debug trace messages. After these messages the paring has been broken and i'm forced to re-pair with my device.

    Any help with this issue will be greatly appreciated!

    Regards, 

    Dan.

    Wednesday, May 30, 2018 7:54 AM

Answers

  • Did you try setting the following registry key in the boot hive (so in between ;HIVE BOOT SECTION tags)? Make sure auto flushing your registry is enabled for every change:

    ;HIVE BOOT SECTION
    
    [HKEY_LOCAL_MACHINE\Init\BootVars] 
        "MasterKeysInRegistry"=dword:1
    
    
    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        "SpawnThread"=dword:1
        "FlushPriority256"=dword:FF
        "ActivityThreshold"=dword:1
        "FlushPeriod"=dword:EA60
    
    ;END HIVE BOOT SECTION



    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Tuesday, June 5, 2018 6:15 PM
    Moderator