wiced_bt_spp_send_session_data - first 2 octets of the p_data must be the handle

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

cross mob
eSteve
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

I have a query with respect to the parameters of the operation

wiced_bool_t wiced_bt_spp_send_session_data( uint16_t handle, uint8_t * p_data, uint32_t len )

within the BTSDK v3.2.

The documentation states:

'The first 2 octets of the p_data must be the handle passed to the application in the wiced_bt_spp_connection_up_callback in the big endian format.'

However I see in the RFCOMM_serial_comm example project with spp.c in the operation

void app_send_data(void)

The  data buffer passed to the wiced_bt_spp_send_session_data operation does not contain the handle.

I have a project based on the RFCOMM_serial_comm example project which does not add the handle to the first octets of the data being sent and all works well.

It seems odd that wiced_bt_spp_send_session_data has the handle as the first parameter yet the handle also needs adding to the data buffer.

I'd like an answer to:

Why does the documentation for wiced_bt_spp_send_session_data state the SPP handle should be the first two octets of the data buffer being sent, yet in the RFCOMM_Serial_comm example this is not done and the code works with out these first two octets being the SPP handle?

Thanks.

 

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The document should be updated and the handle is not needed in the p_data part.

View solution in original post

0 Likes
1 Reply
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The document should be updated and the handle is not needed in the p_data part.

0 Likes