Increase SPP throughput

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
wenchilo
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

Hi cypress team,

I am working on CYBT-343026 with SPP sample code. we'd like to improve SPP throughput, how can we tune the parameters within wiced_bt_l2cap_cfg_information_t based on SPP example code

Thanks

0 Likes
1 Solution

You can try to use the following to configure the parameters.

/**
*
* Function wiced_bt_l2cap_register
*
* Other layers call this function to register for L2CAP
* services.
*
* @param[in] psm: PSM value
* @param[in] p_cb_info: L2CAP cb info
* @param[in] context: Caller context to return in callbacks
*
* @return PSM to use or zero if error. Typically, the PSM returned
* is the same as was passed in, but for an outgoing-only
* connection to a dynamic PSM, a "virtual" PSM is returned
* and should be used in the calls to wiced_bt_l2cap_connect_req()
* and BTM_SetSecurityLevel().
*
*/
uint16_t wiced_bt_l2cap_register (uint16_t psm, wiced_bt_l2cap_appl_information_t *p_cb_information, void *context);

View solution in original post

0 Likes
8 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

What's the through put speed you expect?

0 Likes
wenchilo
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

Our packet is not so large but it comes very fast. So we don't need large MTU but the minimum latency. 

0 Likes
wenchilo
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

Maybe 50-150byte per packet

0 Likes

Did you test it with the default parameter? Per my experience, the default parameter should satisfy your application. 

0 Likes
wenchilo
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

Could you tell me what's the default value of wiced_bt_l2cap_cfg_information_t and how can we modify it?

0 Likes

The parameters are configured in different places. It is configured by the upper layer. For example, if you are using the RFCOMM, the FCS should be enabled by default which is defined in the profile.

If you want to change the flush timeout, you can use the API wiced_bt_l2cap_set_flush_timeout().

0 Likes
wenchilo
Level 4
Level 4
First like received 25 replies posted 25 sign-ins

We have already tried wiced_bt_l2cap_set_flush_timeout(), but we want to configure this structure : 

typedef struct {
    uint8_t         qos_flags;              /**< TBD */
    uint8_t         service_type;           /**< service type (NO_TRAFFIC, BEST_EFFORT, or GUARANTEED) */
    uint32_t        token_rate;             /**< token rate (bytes/second) */
    uint32_t        token_bucket_size;      /**< token bucket size (bytes) */
    uint32_t        peak_bandwidth;         /**< peak bandwidth (bytes/second) */
    uint32_t        latency;                /**< latency (microseconds) */
    uint32_t        delay_variation;        /**< delay variation (microseconds) */
} wiced_bt_flow_spec_t;
 
Is it possible?
0 Likes

You can try to use the following to configure the parameters.

/**
*
* Function wiced_bt_l2cap_register
*
* Other layers call this function to register for L2CAP
* services.
*
* @param[in] psm: PSM value
* @param[in] p_cb_info: L2CAP cb info
* @param[in] context: Caller context to return in callbacks
*
* @return PSM to use or zero if error. Typically, the PSM returned
* is the same as was passed in, but for an outgoing-only
* connection to a dynamic PSM, a "virtual" PSM is returned
* and should be used in the calls to wiced_bt_l2cap_connect_req()
* and BTM_SetSecurityLevel().
*
*/
uint16_t wiced_bt_l2cap_register (uint16_t psm, wiced_bt_l2cap_appl_information_t *p_cb_information, void *context);

0 Likes