7 Replies Latest reply on Mar 7, 2018 7:53 PM by user_306160653

    PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data

    user_306160653

      Using "CE215118_BLE_Multi_Master_Single_Slave01" sample, with no changes other than to list out all BLE peripherals within the vicinity of the Pioneer Kit, we are seeing that the Advertisement data does not include the full or shortened name of the device for any device we attempt to interact with. The PSOC is being used as a Central.


      For example, directly from the project, we see:

       

      ADV type: 0x0 address: fcd6bd1025c2, rssi - -43 dBm, data - 02 01 06 11 07 1b c5 d5 a5 02 00 97 b7 e6 11 fa 1c c0 75 e8 b9

       

      From any android, pc, or ios device, we see the raw data advertised back as: 02010611071BC5D5A5020097B7E611FA1CC075E8B9160958444B5F5544505F424C4500000000000000000000

       

      Here you can see 0x09 is present with the device name.

       

      The sample code is printing all the bytes in the cy_stc_ble_gapc_adv_report_param_t available in the CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT event.

       

      Is the stack purposely cutting the bytes off or is there something else that need be done in order to receive all the data being advertised by the peripheral?

       

      Thanks,

      Karl

        • 1. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
          user_306160653

          I further tried to debug this myself, but the method in question has no source attached so am unable to effectively trace what is going on. The even returning the advertisement report comes from a method internal to the cy_ble_stack_*.a libraries.

           

          Please provide guidance as to why this has been truncated in the library.

           

          Thanks,

          Karl

          • 2. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
            fwan

            Hi Karl,

            How often this case happens? How about the condition if the length of raw data is short?

            I tried on my side the raw data can be always displayed correctly by UART printing.

            • 3. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
              user_306160653

              The lack of short or long name happens on every scan from the pioneer kit.

               

              Do you mean that you're seeing Data Type 0x08 or 0x09 in the cy_stc_ble_gapc_adv_report_param_t provided during the CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT event?

               

              If so can you provide the sample project that is doing this for a generic peripheral?

               

              The peripherals I am testing with advertise the name (as mentioned above) when I use BLE tools on iOS and Android, including the cysmart app.

               

              Thanks,
              Karl

              • 4. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
                fwan

                Karl,

                The advertisement data varies along with different peripherals. I tested the project CE215118_BLE_Multi_Master_Single_Slave01 with 062 pioneer kit, as central device.

                And I compared the received advertisement data through cy_stc_ble_gapc_adv_report_param_t provided during the CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT event with the data received on CySmart (PC) side. The data are identical.

                 

                So I would like to check with you how it is going if change to another ble peripheral? The data is shortened or cut for every scan and all peripheral devices?

                • 5. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
                  user_306160653

                  The following are screenshots from a BLE scanner against one of the three devices I have been using. In each case, android and iOS BLE scanners show the correct advertisement data.

                   

                  With the PSOC 6, the data is shortened (as shown in my original post). Regardless of which peripheral I use, I experience this problem. 

                   

                  If you had seen something different in your test code, I would appreciate being able to run that here so that we are comparing apples to apples.

                   

                  2018-03-07 16.41.25.png

                   

                  2018-03-07 16.42.48.png

                  • 6. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
                    msur

                    Hello Karl,

                     

                    Do you know if the device you are scanning sends the Local name through Scan response or advertisement? As most of the iOS or Android software get both advertisement data and scan response data. Typically Scan response data is bigger in size and contain the local name of the device.

                     

                    If you want to change the project to display Scan response as well, then you will have to make sure you also display the data when the "advReport->eventType" is equal to "CY_BLE_GAPC_SCAN_RSP". Currently, the example only prints Advertisement data and not Scan response data. My guess is that the local name is received over scan response.

                     

                    Let me know if this helps.

                     

                    Regards,

                    Meenakshi Sundaram R

                    • 7. Re: PSoC 6 BLE Pioneer Kit / Issue with Peripheral Data
                      user_306160653

                      That was it. The scan response contains the name.

                       

                      Regarding what the apps are doing, I would think they are binding the two together in the output. The second screenshot was from CySmart, so that would be something you might be able to confirm?

                       

                      Thanks!

                      Karl