8 Replies Latest reply on Aug 20, 2019 2:53 AM by AnjanaM_61

    (cyw20719/cyw20721)How to port SPP profile to watch demo?

    LeLi_3670906

      Hi Sir,

       

      We want to come true A2DP source and SPP in one demo,we notice that watch demo support A2DP source,SPP demo support spp profile,So how can we mix them together,Can you give me some suggestion?

      Meanwhile,if I want to calculate CPU occupancy rate,How can i achieve it?

      Thanks~

       

       

      Best Regards,

      Leo

        • 1. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
          AnjanaM_61

          Hi Leo,

           

          We don't have any documentation or demo for integrating the project.

          Please remove the unwanted code or services from Watch example for your specific application.

          For adding SPP prrofile, you may follow steps mentioned in Wiced academy lab manual :

          CypressAcademy_WBT101_Files/WBT101-06A-ClassicBluetooth-Basic.pdf at master · cypresssemiconductorco/CypressAcademy_WBT1…

           

          Q) I want to calculate CPU occupancy rate,How can i achieve it?

          A) Could you please clarify? You mean you want to calculate the time for executing each application or any thread?

           

          Thanks,

          Anjana

          1 of 1 people found this helpful
          • 2. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
            LeLi_3670906

            Hi Anjana,

             

            I want to add SPP profile and work in wiced hci mode,so I merged SPP in watch demo follow hci_audio_gateway demo.

            But Client Control still has no supported SPP and printed log as follow:

            hci_control_spp_rfcomm_start_server: rfcomm_create Res: 0x6  Port: 0x0000

            maxLinks:0 maxChannels:0 maxpsm:0 rfcom max links7, rfcom max ports:0

            I followed code, Res:0x6 means:If there is not enough memory to allocate a control block structure.

            Q:How can i position this question?

             

            About CPU occupancy rate which means calculate the time for executing idle threads .

             

             

            Thanks,

            Leo

            • 3. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
              AnjanaM_61

              Hi Leo,

               

              Could you please try the below:

               

              1. Set the RFCOMM configuration in wiced_bt_cfg_settings_t of config file

                /* RFCOMM Configuration */

                  {

                      7,                                                          /**< Maximum Number of simultaneous RFCOMM ports */

                      7,                                                          /**< Maximum Number of simultaneous RFCOMM connections */

                  },

               

              Set both RFCOMM ports and links . For example refer wiced_bt_cfg.c in hci_audio_gateway or spp demo examples

               

              2. You should  increase the buffer pool sizes. This is necessary because the SPP uses more memory. Specifically, the MTU is set in the config file to 515 so the large buffer pool must be at least 527 (MTU + 12).

              const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

              { /*  { buf_size, buf_count, }, */     { 64,       16,        }, /* Small Buffer Pool */    

              { 272,      8,         }, /* Medium Buffer Pool (used for HCI & RFCOMM control messages, min recommended size is 360) */    

              { 1056,     3,         }, /* Large Buffer Pool  (used for HCI ACL messages) */    

              { 1056,     2,         }, /* Extra Large Buffer Pool (used for SDP Discovery) */ };

               

              I think , this you already tried.

               

              Thanks,
              Anjana

              1 of 1 people found this helpful
              • 4. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
                LeLi_3670906

                Hi Anjana,

                 

                I have ported spp to watch demo and removed other function that did not used,but I have a question:

                Why there are still the same profiles in client control as below?

                So,I can only connect SPP through app in phone.

                 

                 

                Thanks,

                Leo

                • 5. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
                  AnjanaM_61

                  Hi Leo,

                   

                  From your description, I believe your query is : "You removed unwanted profiles functions from Watch demo, but still you can see the profiles enabled in client control, when connected the device" . Am I right?

                  If then, please try a quick test, in the wiced_bt_cfg_settings_t of wiced_app_cfg.c make the unwanted profile roles as 0 and try.

                   

                  For example if you don't want AVRC, try changing

                    . avrc_cfg =                                                                                       /* Audio/Video Remote Control configuration */

                      {

                          .roles                          = 0,                                                           /**< 1 if AVRC_CONN_ACCEPTOR is supported */

                          .max_links                      = 0,                                                           /**< Maximum simultaneous remote control links */

                      },

                   

                   

                  Thanks,
                  Anjana

                  1 of 1 people found this helpful
                  • 6. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
                    LeLi_3670906

                    Hi Anjana,

                     

                    Your understanding is right,but I tried your suggestion to change unwanted profile roles as 0 ,still can see the profiles enabled in client control.Meanwhile,SPP can not be seen in client control.

                     

                     

                    Thanks ,

                    Leo

                    • 7. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
                      LeLi_3670906

                      Hi Anjana,

                       

                      In the api hci_control_misc_handle_get_version(void),we also need to add or remove supported features as below.

                       

                      Thanks,

                      Leo

                      • 8. Re: (cyw20719/cyw20721)How to port SPP profile to watch demo?
                        AnjanaM_61

                        Hi Leo,

                         

                        Thanks for sharing the fix.

                         

                        Regards,

                        Anjana