Zephyr Project API 4.2.99
A Scalable Open Source RTOS
|
Data Structures | |
struct | bt_goep_transport_rfcomm_server |
GOEP Server structure GOEP v1.1. More... | |
Functions | |
int | bt_goep_transport_rfcomm_server_register (struct bt_goep_transport_rfcomm_server *server) |
Register GOEP RFCOMM server. | |
int | bt_goep_transport_rfcomm_connect (struct bt_conn *conn, struct bt_goep *goep, uint8_t channel) |
Connect GOEP transport over RFCOMM. | |
int | bt_goep_transport_rfcomm_disconnect (struct bt_goep *goep) |
Disconnect GOEP transport from RFCOMM. | |
int bt_goep_transport_rfcomm_connect | ( | struct bt_conn * | conn, |
struct bt_goep * | goep, | ||
uint8_t | channel | ||
) |
#include <include/zephyr/bluetooth/classic/goep.h>
Connect GOEP transport over RFCOMM.
Connect GOEP transport over RFCOMM, once the connection is completed, the callback bt_goep_transport_ops::connected is called. If the connection is rejected, bt_goep_transport_ops::disconnected callback is called instead. The GOEP object is passed (over an address of it) as second parameter, application should create transport dedicated GOEP object Generic Object Exchange Profile (GOEP). Then pass to this API the location (address). Before calling the API, bt_obex::client_ops and bt_goep::transport_ops should be initialized with valid address of type bt_obex_client_ops object and bt_goep_transport_ops object. The field mtu
of bt_obex::rx could be passed with valid value. Or set it to zero, the mtu will be calculated according to
CONFIG_BT_GOEP_RFCOMM_MTU
. The RFCOMM channel is passed as third parameter. It is the RFCOMM channel of RFCOMM server of peer device.
conn | Connection object. |
goep | GOEP object. |
channel | RFCOMM channel to connect to. |
int bt_goep_transport_rfcomm_disconnect | ( | struct bt_goep * | goep | ) |
#include <include/zephyr/bluetooth/classic/goep.h>
Disconnect GOEP transport from RFCOMM.
Disconnect GOEP RFCOMM transport.
goep | GOEP object. |
int bt_goep_transport_rfcomm_server_register | ( | struct bt_goep_transport_rfcomm_server * | server | ) |
#include <include/zephyr/bluetooth/classic/goep.h>
Register GOEP RFCOMM server.
Register GOEP server for a RFCOMM channel bt_rfcomm_server::channel, each new connection is authorized using the bt_goep_transport_rfcomm_server::accept callback which in case of success shall allocate the GOEP structure Generic Object Exchange Profile (GOEP) to be used by the new GOEP connection.
bt_rfcomm_server::channel may be pre-set to a given value (not recommended however). Or be left as 0, in which case the channel will be auto-allocated by RFCOMM.
server | Server structure. |