I want to get the MTU value of SPP using CYW20719B2

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

cross mob
MaKo_4657646
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

In SPP, if the MTU of the connection destination is small, that value will be used.
Therefore, it seems that the length sent by wiced_bt_spp_send_session_data cannot exceed the negotiated MTU value.
If the MTU value is exceeded, no transmission will be performed.

wiced_bt_spp_rfcomm_get_peer_mtu will result in a link error.
How do I get the MTU value used when connecting?

 

0 Likes
1 Solution

Unfortunately I dont think there is any other API to perform this operation.

View solution in original post

0 Likes
3 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi @MaKo_4657646 ,

Ideally this API is the way to get peer MTU when using SPP. Check if you have header file added in your code. Can you share the screenshot of the error you are getting? 

0 Likes

The following error is output when linking.

c:/users/i012890/modustoolbox/tools_2.2/gcc/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TOOL/ModusToolbox/MTW/spp/build/CYBT-483056-EVAL/Debug/spp.o: in function `spp_connection_up_callback':
C:\TOOL\ModusToolbox\MTW\spp/spp.c:418: undefined reference to `wiced_bt_spp_rfcomm_get_peer_mtu'

Only CYW20819A1 and CYW20820A1 are valid in spp_lib.c. So I don't think wiced_bt_spp_rfcomm_get_peer_mtu can be used with CYW20719B2.

#if defined(CYW20819A1) || defined (CYW20820A1)
/*
* get the rfcomm peer_mtu
*/
uint16_t wiced_bt_spp_rfcomm_get_peer_mtu(uint16_t handle)
{


Is there an API that can be used instead?

0 Likes

Unfortunately I dont think there is any other API to perform this operation.

0 Likes