| 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_check_connection (UINT16 handle, BD_ADDR bd_addr, UINT16 *p_lcid) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_control (uint16_t handle, uint8_t signal) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_create_connection (uint16_t uuid, uint8_t scn, wiced_bool_t is_server, uint16_t mtu, wiced_bt_device_address_t bd_addr, uint16_t *p_handle, wiced_bt_port_mgmt_cback_t *p_mgmt_cb) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_flow_control (uint16_t handle, wiced_bool_t enable) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_remove_connection (uint16_t handle, wiced_bool_t remove_server) | 
|   | 
| wiced_bt_dev_status_t  | wiced_bt_rfcomm_set_buffer_pool (uint16_t buffer_size, uint16_t buffer_count) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_set_data_callback (uint16_t port_handle, wiced_bt_rfcomm_data_cback_t *p_cb) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_set_event_callback (uint16_t port_handle, wiced_bt_port_event_cback_t *p_port_cb) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_set_event_mask (uint16_t port_handle, wiced_bt_rfcomm_port_event_t mask) | 
|   | 
| wiced_bt_rfcomm_result_t  | wiced_bt_rfcomm_write_data (uint16_t handle, char *p_data, uint16_t max_len, uint16_t *p_len) | 
|   | 
The RFCOMM protocol provides emulation of serial ports over the L2CAP protocol. The protocol is based on the ETSI standard GSM 7.1.0. RFCOMM is a simple transport protocol, with additional provisions for emulating the nine circuits of RS-232 (ITU-T V.24) serial ports. The RFCOMM protocol supports up to 60 simultaneous connections between two Bluetooth devices. The number of connections that may be used simultaneously in a Bluetooth device is implementation-specific. 
This function checks connection referenced by handle is up and running.
- Parameters
 - 
  
  
 
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_LINE_ERR  : If connection is not up and running 
 
 
 
Send control signal to the peer device.
- Parameters
 - 
  
  
 
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
Establish serial port connection to the peer device, or allow RFCOMM to accept a connection from peer devices.
- Note
 - Server can call this function with the same scn parameter multiple times if it is ready to accept multiple simulteneous connections.
 
DLCI for the connection is (scn * 2 + 1) if client originates connection on existing none initiator multiplexer channel. Otherwise it is (scn * 2). For the server DLCI can be changed later if client will be calling it using (scn * 2 + 1) dlci.
- Parameters
 - 
  
    | [in] | uuid | : The Universal Unique Identifier (UUID) of the Class ID of the service being opened  | 
    | [in] | scn | : The Service Channel Number(SCN) as registered with the SDP (server) or obtained using SDP from the peer device (client)  | 
    | [in] | is_server | : TRUE if requesting application is a server  | 
    | [in] | mtu | : The maximum number of bytes transferred per frame If 0, a default size of L2CAP_MTU_SIZE minus 5 bytes is used  | 
    | [in] | bd_addr | : BD_ADDR of the peer (if client), NULL if server  | 
    | [in] | p_mgmt_cb | : Pointer to callback function to receive connection up/down events  | 
    | [out] | p_handle | : A pointer to the handle set by RFCOMM to be used in consecutive calls for this connection | 
  
   
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_ALREADY_OPENED  : If the client tries to establish a connection to the same BD_ADDR  WICED_BT_RFCOMM_NO_RESOURCES  : If there is not enough memory to allocate a control block structure 
 
 
 
This function directs a specified connection to pass flow control message to the peer device. Enable flag passed shows if port can accept more data.
- Parameters
 - 
  
  
 
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
Close the specified connection.
- Parameters
 - 
  
    | [in] | handle | : The connection handle returned by wiced_bt_rfcomm_create_connection .  | 
    | [in] | remove_server | : (for server only) If TRUE, then also remove server; otherwise server remains enabled after connection is closed. | 
  
   
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
Function wiced_bt_rfcomm_set_buffer_pool 
             If buffer_size > 0 and wiced_bt_rfcomm does not have a private pool yet,
             this function allocates a private buffer pool.
             If buffer_size = 0 and wiced_bt_rfcomm has a private buffer pool,
             this function deallocates the private buffer pool.
- Parameters
 - 
  
    | [in] | buffer_size | : data size for the private pool. The actual buffer size includes additional overhead.  | 
    | [in] | buffer_count | : number of buffers in this new pool. | 
  
   
- Returns
 - WICED_BT_SUCCESS if the action was carried out successfully as desired WICED_BT_NO_RESOURCES no resources. 
 
 
 
Set event data callback the specified connection.
- Parameters
 - 
  
    | [in] | port_handle | : A 16-bit unsigned integer returned by wiced_bt_rfcomm_create_connection   | 
    | [in] | p_cb | : Address of the callback function which should be called from the RFCOMM when a data packet is received | 
  
   
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
Set event callback the specified connection.
- Parameters
 - 
  
    | [in] | port_handle | : A 16-bit unsigned integer returned by wiced_bt_rfcomm_create_connection   | 
    | [in] | p_port_cb | : Address of the callback function which should be called from the RFCOMM when an event specified in the mask occurs | 
  
   
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
Set events for which to be notified
- Parameters
 - 
  
  
 
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened 
 
 
 
      
        
          | wiced_bt_rfcomm_result_t wiced_bt_rfcomm_write_data  | 
          ( | 
          uint16_t  | 
          handle,  | 
        
        
           | 
           | 
          char *  | 
          p_data,  | 
        
        
           | 
           | 
          uint16_t  | 
          max_len,  | 
        
        
           | 
           | 
          uint16_t *  | 
          p_len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
This function sends the given application data to the peer device. If wiced_bt_rfcomm_set_buffer_pool() was called to create a private buffer pool, the buffer from the private buffer pool is used to hold the data in the RFCOMM TX queue. Otherwise, RFCOMM uses the RFCOMM_DATA_POOL_ID pool to hold the data.
- Parameters
 - 
  
  
 
- Returns
 -  WICED_BT_RFCOMM_SUCCESS  : If successful  WICED_BT_RFCOMM_BAD_HANDLE  : If the handle is out of range  WICED_BT_RFCOMM_NOT_OPENED  : If the connection is not opened