14 Replies Latest reply on Jun 19, 2017 6:36 AM by gisi_999776

    Windows 10 Bond problem

    gisi_999776

      My BCM20737S device has now bonding problems, especially with Windows 10.

       

      First problem: After bonding the maximal number of bondable devices, the newer addresses overwrites the first address section of the NVRAM, no matter how many new host devices I try to bond. Adding a newer address should work like a circle buffer, am I right?

       

      Second problem: Some devices writes a "1" at adrType instead of "0", in this case my Windows 10 PC don't recognize the device after reset, so I must unbond and then bond the device again with my Windows 10 PC. How can I solve this problem?

        • 1. Re: Windows 10 Bond problem
          BoonT_56

          Is the below what you are looking for?

           

          //This will override BondedInfo with last index.

          //This should not be called unless debugging purpose

                  {

                      LESMPKEYS_BOND_IDX *bondedIndexBlock;

           

           

                      extern UINT8 lesmpkeys_maxBondedDevices;

           

           

                      //lesmp_logBytes("\rFind Bonded Info:", bdAddr, 6);

                      bondedIndexBlock = (LESMPKEYS_BOND_IDX*)lesmpkeys_getBondedInfoIdx();

           

           

                      if (bondedIndexBlock)

                      {

                          LESMPKEYS_BOND_IDX *curPtr = bondedIndexBlock;

           

           

                          for (i = 0;i < lesmpkeys_maxBondedDevices; i++)

                          {

                              ble_trace3("index:%d, adrType:%d, idx :%02x", i, curPtr->adrType, curPtr->idx);

                              ble_tracen(curPtr->address, 6);

           

           

                              // move to next block.

                              curPtr ++;

                          }

           

           

                          //

                          cfa_mm_Free(bondedIndexBlock);

                      }

                  }

           

           

           

          ChristopherA_76

          1 of 1 people found this helpful
          • 2. Re: Windows 10 Bond problem
            gisi_999776

            I already use this function to show the host list saved in the NVRAM, like this:

             

            index:0, adrType:0, idx :00

            b0<00>08<00>0b<00>43<00>13<00>00<00>

            index:1, adrType:0, idx :01

            e1<00>32<00>04<00>0b<00>00<00>80<00>

            index:2, adrType:1, idx :02

            ba<00>2a<00>ad<00>21<00>a7<00>e0<00>

            index:3, adrType:0, idx :03

            13<00>96<00>15<00>00<00>fa<00>cc<00>

            index:4, adrType:0, idx :04

            98<00>4e<00>0c<00>43<00>13<00>00<00>

            index:5, adrType:0, idx :05

            db<00>75<00>82<00>b6<00>22<00>22<00>

            index:6, adrType:0, idx :06

            bc<00>08<00>0b<00>43<00>13<00>00<00>

            index:7, adrType:0, idx :07

            b1<00>8a<00>2f<00>21<00>31<00>54<00>

            index:8, adrType:0, idx :08

            9d<00>50<00>06<00>43<00>13<00>00<00>

            index:9, adrType:0, idx :09

            8f<00>b7<00>13<00>43<00>13<00>00<00>

             

            But if I connect newer devices, my system stucks on index "0" and overwrites only this index. The Wiced generated routine seems to remain on index "0".

             

            Another problem is Windows 10, some devices I bonded can not connect correctly, after a reset I must unbond and bond them over and over again. Has someone noticed the same problem?

            • 3. Re: Windows 10 Bond problem
              JaeyoungY_71

              Hello gisi_999776

               

              Could you try going through this troubleshooting guide for pairing devices? Most likely you will have to download the patch for the bonding info to get stored correctly after the set max number of devices.

              Troubleshooting on BLE Pairing with Mobile Devices

               

              For the Windows 10 devices that cannot connect correctly, the bonding info was likely corrupted. Try applying the patch and allocating more memory to bonding info storage if needed.

               

              Please try this and update us know your results.

               

              Thanks,

              Jaeyoung

              1 of 1 people found this helpful
              • 4. Re: Windows 10 Bond problem
                gisi_999776

                JaeyoungY_71

                 

                Unfortunately, the new patch didn't solve the problem.

                 

                First unsolved problem:

                Host device Nr. 6 overwrites Index Nr.0 and host device Nr.7 overwrites also index Nr.0 and so on.

                 

                Second unsolved problem:

                Sometimes the data stored gets corrupted like this:

                 

                index:0, adrType:0, idx :00

                83<00>c5<00>e7<00>f3<00>eb<00>5d<00>

                index:1, adrType:0, idx :01

                f0<00>c0<00>ac<00>28<00>b0<00>4e<00>

                index:2, adrType:1, idx :02

                ba<00>2a<00>ad<00>21<00>a7<00>e0<00>

                index:3, adrType:0, idx :03

                13<00>96<00>15<00>00<00>fa<00>cc<00>

                index:4, adrType:0, idx :84

                e1<00>32<00>04<00>0b<00>00<00>80<00>

                 

                The last device stored has idx = 84 (??????), it's a Windows 10 laptop, and in this case my wiced device connect and disconnect from my Windows 10 laptop every 1 second in an endless loop.

                The only thing I can do in this case is to unbond it from my Windows 10 laptop and bond it again.

                You can imagine that this is an unaccetable thing to propose to my customers!

                 

                Please solve this Bug

                • 5. Re: Windows 10 Bond problem
                  gisi_999776

                  Thank You for the troubleshooting.

                  After increasing the nvram the problem was solved, as described in section 3b.

                  I use the nvram for custom data, and secure OTA...

                   

                  What size should have DLConfigVSLength and ConfigDSLocation to work with 10 Bond Keys?

                  Can I store more then 10 Bond Keys?

                  • 6. Re: Windows 10 Bond problem
                    JaeyoungY_71

                    Hi Gianluca,

                     

                    Thank you for updating us with your results. I'm glad to hear that increasing the nvram solved the problem for you.

                     

                    You should be able to store more than 10 bond keys given that you have enough space to store them. I've tried up to 8 devices with the following setting, but with a simple app with no custom data and no secure OTA.

                    • DLConfigVSLength to 2048
                    • ConfigDSLocation to 2432

                     

                    Will you be using more than 10 bond keys at once? May I ask what your use case is for that? You can play around with the numbers to achieve the max number of bonds you need.

                     

                    Thanks,

                    Jaeyoung

                    1 of 1 people found this helpful
                    • 7. Re: Windows 10 Bond problem
                      gisi_999776

                      Our customers usually connect our bluetooth devices only with one mobile device at once.

                      Some other customers have several mobile devices they use to connect, but also only one mobile device at once.

                       

                      I tested the firmware with this configuration:

                      • DLConfigVSLength to 2048
                      • ConfigDSLocation to 2432

                      with 20 keys, then with 15 keys, but only with 10 keys the device worked stable without data corruption or bond failure.

                       

                      Unfortunately bonding with a Windows 10 pc is still not working properly, I can reproduce the problem as following:

                      At first I bond the bluetooth device with an Android 5.1 Tablet, after that I bond the bluetooth device with a Windows 10 Laptop.

                      After that I disconnect the device, then I can not connect the bluetooth device with the Windows 10 Laptop anymore, it tries to connect and abort the connection immediately, it tries to connect again and abort it,.. endless loop

                       

                      If I bond at first the Windows 10 Laptop and after that I bond the Android 5.1 Tablet there is no problem. I have reproduced this behaviour several times. What can be the reason?

                      • 8. Re: Windows 10 Bond problem
                        gisi_999776

                        As our product is already on the market we can NOT modify the EEProm section layout and generate a new firmware, the OTA upgrade would fail !

                        So in the end, the problem is not solved, the patch alone did not make the difference, after bonding with 5 host devices the routine doesn't loop !

                        • 9. Re: Windows 10 Bond problem
                          gisi_999776

                          Can I use the NVRAM space intended for custom data (0x10 - 0x6F) in order to increase the space used for the bonding info?

                           

                          My custom data is stored at id 0x10, and 128 bytes is enough for me.

                          So I can theoretically move the VS_BLE_HOST_LIST (0x70) to 0x20 is it right ?

                          • 10. Re: Windows 10 Bond problem
                            gisi_999776

                            Should I go on with this work around, and test it ???

                             

                            It's not the best solution because after an OTA update the host list of the customer would be deleted ( is it right? ) but at list the other bugs are solved (Win 10 bond problem and host list loop problem ...)

                            • 11. Re: Windows 10 Bond problem
                              gisi_999776

                              Unfortunately did the work around not help, I will start a new thread as it seems to be a bug in the writing and reading procedures of the Wiced System ...

                              • 12. Re: Windows 10 Bond problem
                                gisi_999776

                                Edit:

                                 

                                With the actual "Windows 10 Creators Update" I don't have the pair problem anymore, so it was a Microsoft Bug...

                                 

                                The loop problem in the nvram section is still not solved, I use this workaround:

                                when I connect my device with the 5th host device, I delete the host list, so every 5 host devices a "refresh" of the nvram occurs.

                                • 13. Re: Windows 10 Bond problem
                                  JaeyoungY_71

                                  Hello Gianluca,

                                   

                                  Thanks for updating this post with your findings. It's good to hear you were able to solve the issue with installing the new version of the Windows 10 Creators Update.

                                   

                                  Regarding the loop problem, I am sorry that you are still having this issue. I understand your workaround is not an ideal situation and you would want to keep the bondings as long as possible opposed to having to erase them. All internal testing and customer reports show that the issue was solved with the new patch file so I think it may be a code size issue. Have you played around with the bonding table size (max number of devices)? Perhaps lowering it to 3 or 4 devices might solve the issue if it is running out of space. You can use the following API for changing this.

                                   

                                  // To setup the max number of bonded devices .

                                  void lesmpkeys_set_maxNumOfBondedDevice(UINT8 num);

                                   

                                  Give it a try and let us know!

                                   

                                  Thanks,

                                  Jaeyoung

                                  1 of 1 people found this helpful
                                  • 14. Re: Windows 10 Bond problem
                                    gisi_999776

                                    Yes JaeyoungY_71, I already tried this API without success.