43 int (*
open)(
SDEV **ep,
int dev_type,
const uint8_t *info);
165int BTA_Server_New(
int oh,
int proto,
int master,
int encrypt,
int authenticate,
int authorize,
int rx_mtu,
int tx_mtu,
int tid)
166__swi_end(0x424,
BTA_Server_New, (oh, proto, master, encrypt, authenticate, authorize, rx_mtu, tx_mtu, tid));
323int
BTA_Conn_New_L2CAP(
int oh,
const uint8_t addr[6],
int sapi_type,
int psm,
int master,
int encrypt,
int authenticate,
int rx_mtu,
int tx_mtu,
int tid)
324__swi_end(0x433,
BTA_Conn_New_L2CAP, (oh, addr, sapi_type, psm, master, encrypt, authenticate, rx_mtu, tx_mtu, tid));
340int BTA_Conn_New_RFCOMM(
int oh,
const uint8_t addr[8],
int sapi_type,
int channel,
int master,
int encrypt,
int authenticate,
int tid)
773int CHConnSApp(uint32_t handler_id, uint32_t instance, uint32_t new_handler_id,
const void *connection_info)
832uint16_t CA_MR_New(
int cepid,
int msg,
const char *file,
int line)
833__swi_end(0x4CD, CA_MR_New, (cepid, msg, file, line));
840void CA_MR_Subscribe(uint16_t mr,
int code,
int class_id)
841__swi_end(0x4CE, CA_MR_Subscribe, (mr, code, class_id));
848void CA_MR_Stop(uint16_t mr)
856void CA_MR_Done(uint16_t mr,
void *object_message)
857__swi_end(0x4D0, CA_MR_Done, (mr, object_message));
905uint16_t CA_L2CAP_New(uint16_t mr,
CA_REMDEV *remdev,
int sapi,
int psm,
int master,
int encrypt,
int authenticate,
int rx_mtu,
int tx_mtu)
906__swi_end(0x4D6, CA_L2CAP_New, (mr, remdev, sapi, psm, master, encrypt, authenticate, rx_mtu, tx_mtu));
913int CA_Conn_Close(uint16_t conn, uint16_t owner)
914__swi_end(0x4D7, CA_Conn_Close, (conn, owner));
940void CA_DevList_CountReq(uint16_t list, uint16_t mr,
int type)
941__swi_end(0x4DA, CA_DevList_CountReq, (list, mr, type));
949void CA_DevList_EntryReq(uint16_t list, uint16_t mr,
int type,
int index)
950__swi_end(0x4DB, CA_DevList_EntryReq, (list, mr, type, index));
#define __swi_end(number, func, call)
#define __swi_begin(number)
int index
Endpoint callback instance.
uint8_t state
See JSApi_GetConnectionState.
uint8_t packet
0: RFCOMM stream, 1: L2CAP packets
uint8_t device_type
Type of the attached device, 0xFF = none.
uint16_t sig
Signalling instance, 0xFFFF = none.
int(* get_dev)(int index, int *inst)
SDEV * sdev
Attached serial device.
uint8_t rx_buffer[0x5C]
Receive ring buffer (the data block is allocated on registration)
int conn
Connection handle, 0 = free.
uint16_t cid
Local CID, 0x40 + entry index.
int read_pending
A read callback is pending.
void * fn[15]
Callback table.
uint16_t handle
Connection handle, 0xFFFE = free.
void(* on_connect)(int conn)
See JSApi_RegisterConHandle.
uint8_t channel
Channel number.
int settings_pending
flags, xon_char and xoff_char are to be applied
int inst
Device callback instance.
void(* reg)(SDEV *dev, const void *info)
int(* open)(SDEV **ep, int dev_type, const uint8_t *info)
uint16_t mtu
Maximum packet size.
uint8_t app
Application ID.
uint8_t type
Service type, selected by the PSM.
void Ca_SasSApp_Init(void)
Initialise the SIM Access Profile server and register it as SDev application 0x13.
void BTA_LocBtDevice_SetNameReq(int oh, const char *name, int tid)
Set the phone's Bluetooth name (asynchronous).
const uint8_t * BTA_RemBtDeviceInfo_GetAddress(int oh, const CA_REMDEV *device)
Read the Bluetooth address from a returned remote-device object.
CA_REMDEV * BTA_Conn_GetRemDevInfo(int oh, int conn)
Get the remote-device object of an open connection.
uint8_t CA_SapiConnClass(void)
Object class of SAPI connection events (opened, closed, failed, parameters).
int BTA_ServiceSearch_RetrieveServiceReq(int oh, uint32_t device, uint32_t record, void *param4, int param5, int tid)
Request an SDP service record of a remote device (asynchronous).
uint8_t CA_MR_Class(void)
Object class of the replicator's own events.
int BTA_Server_New(int oh, int proto, int master, int encrypt, int authenticate, int authorize, int rx_mtu, int tx_mtu, int tid)
Create an RFCOMM or L2CAP server under an accessor.
void BTA_ServiceSearch_StopReq(int oh, int remdev, int tid)
Cancel a running service search.
int JSApi_ReadBytes(int conn, void *buffer, uint32_t size)
Read received data of a JSApi connection.
const char * BTA_RemBtDeviceInfo_GetName(int oh, const CA_REMDEV *device)
Read the name from a returned remote-device object.
int CHConnSApp(uint32_t handler_id, uint32_t instance, uint32_t new_handler_id, const void *connection_info)
Move an open device connection from one SDev application to another.
void BTA_DeviceListView_StopList(int oh, int list)
Close a Bluetooth device-list view.
const uint8_t * BT_GetLocAddr(void)
Get the local Bluetooth address.
int JSApi_BytesAvailable(int conn)
Get the number of received bytes waiting in a JSApi connection.
CA_REMDEV * CA_RemDev_New(const uint8_t bd_addr[6])
Create a remote device object for a 6-byte BT address.
void BTLP_InitL2CAP_IO(void)
Initialise the L2CAP port devices: 9 on NSG/ELKA (SAPI 0x0D..0x15), 4 on SG/X75 (SAPI 0x08....
void BTA_Server_AcceptReq(int oh, int server, int enable, int tid)
Enable or disable incoming connections on a Bluetooth server.
void BTA_Conn_CloseReq(int oh, int conn, int tid)
Request asynchronous closure of a Bluetooth connection.
void JSApi_InitHandles(void)
Initialise the JSApi slots once and register JSApi as an SDev application.
int Serial_CanOpenSApp(uint32_t handler_id, uint32_t instance)
Check whether an SDev application would accept a connection (opens and closes it again).
void SApp_Register(int handler_id, const SDEV_APP *methods)
Register an SDev application (serial data endpoint) in the application table.
void SDev_InitEndpoint(SDEV *ep)
Initialize an SDev endpoint with the firmware default callbacks.
uint8_t * BT_GetLocalDevice(void)
Get the native local Bluetooth device object.
BTLP_CONN * RamBtlpConnections(void)
Get the BTLP (Bluetooth L2CAP port) connection table.
int BtAccessor_New(int cepid, int msg, int no_servers, int zero)
Create a Bluetooth accessor.
JSAPI_CONN * RamJSApiConnections(void)
Get the JSApi (Java Bluetooth) connection slots.
void BTA_DeviceListView_GetEntryReq(int oh, int list, int index, int tid)
Request a stored Bluetooth device entry asynchronously.
void BTA_LocBtDevice_SetDIACReq(int oh, uint32_t diac, int tid)
Set the inquiry access code (DIAC) the phone answers to (asynchronous).
void BTA_Sdp_Converter_New(int oh, void *(*alloc)(unsigned int), void(*free)(void *))
Set allocator callbacks for accessor SDP records.
void * BTA_RemBtDeviceInfo_GetDeviceClass(int oh, CA_REMDEV *device)
Get the class-of-device record of a remote-device object.
uint16_t * RamBtBufferPool(void)
Get the native Bluetooth buffer-pool status.
void BTA_LocBtDevice_SetVisibilityReq(int oh, uint32_t visibility, int tid)
Set the visibility of the phone's Bluetooth (asynchronous).
uint16_t CA_DevList(uint16_t local_dev)
Device list object of the local BT device.
const SDEV_APP ** RamSDevApps(void)
Get the SDev application callback table.
int BTA_RemBtDeviceInfo_SetName(int oh, CA_REMDEV *device, const char *name)
Set the name stored in a remote-device object.
int BTA_DeviceListView_GetList(int oh, int type)
Open a view of the stored Bluetooth device list.
void BTA_DeviceDiscovery_StartSearchReq(int oh, uint32_t service, int tid)
Start a Bluetooth device search (asynchronous).
void BTLP_vDataToAppCallback(int sapi)
Deliver received packets queued on an L2CAP port to its application until it stops taking them.
uint32_t JSApi_CurrentHandleID(int conn)
Find the JSApi (Java Bluetooth) slot of a connection handle.
void BTA_Server_Delete(int oh, int server)
Delete a stopped Bluetooth server.
void BTA_Server_StopReq(int oh, int server, int tid)
Request asynchronous stop of a Bluetooth server.
void BTLP_vFlushBuffer(int mode, int sapi)
Drop the received packets queued on an L2CAP port.
void BTA_Server_StartReq(int oh, int server, int sdp_record, int unk, int tid)
Start a Bluetooth server and publish its SDP record.
void BTA_DeviceDiscovery_StopSearchReq(int oh, int tid)
Stop a running Bluetooth device search (asynchronous).
void BTA_DeviceDiscovery_StartSearchCodReq(int oh, uint32_t cod_class, uint32_t iac, int tid)
Start a Bluetooth device search filtered by class of device (asynchronous).
uint8_t CA_DevListClass(void)
Object class of device list answers.
int JSApi_RegisterConHandle(int conn, uint32_t packet, void(*on_connect)(int conn))
Register a connection handle in a free JSApi slot.
L2CAP_CHANNEL * RamL2capChannelState(void)
Get the L2CAP channel table.
void BTA_Conn_GetL2CAPParamReq(int oh, int conn, int tid)
Request the L2CAP parameters of an open connection.
struct CA_REMDEV CA_REMDEV
Remote Bluetooth device object (CA layer), also used by the BTA_RemBtDeviceInfo_* functions.
void CA_RemDev_Free(CA_REMDEV *remdev)
Free a remote device object.
void BTA_AclDisconnectReq(int tid, const uint8_t addr[6])
Drop the ACL link to a remote device (asynchronous).
void L2CA_ReadDataReq(const void *message)
L2CAP handler of the L2CA_ReadDataReq signal.
uint32_t BTA_RemBtDeviceInfo_GetStatus(int oh, const CA_REMDEV *device, int what)
Read the link status of a remote device.
int JSApi_ClearConnectionHandle(int conn)
Free the JSApi slot of a connection handle and its receive buffer.
void CA_Release(uint16_t handle)
Release a CA object handle (replicator, connection).
void BT_SetSecurityCheck(int lo, int unk1, int unk2, int unk3)
Set the local Bluetooth connection security level.
int BTA_ServiceSearch_StartReq(int oh, const uint8_t addr[8], const void *uuids, const uint16_t *attrs, int nattrs, int tid)
Search the SDP records of a remote device (what JSR-82 searchServices uses).
unsigned BTA_SdpRec_GetChannel(const void *record, int rfcomm)
Server channel from an SDP record's ProtocolDescriptorList.
uint16_t CA_LocalRoot(void)
Root object of the local BT stack.
int BTA_Conn_New_L2CAP(int oh, const uint8_t addr[6], int sapi_type, int psm, int master, int encrypt, int authenticate, int rx_mtu, int tx_mtu, int tid)
Open an outgoing L2CAP connection.
int BTA_SdpRec_New(int oh, const uint8_t uuid[16], int proto, int channel)
Create a Bluetooth SDP service record.
void BTA_SdpRec_Delete(int oh, int record)
Delete an accessor SDP record.
int JSApi_WriteBytes(int conn, const void *data, uint32_t size)
Send data over a JSApi connection.
int BTA_DeviceListView_GetNumberOfEntries(int oh, int list)
Count entries in a Bluetooth device-list view.
int BTA_Conn_New_RFCOMM(int oh, const uint8_t addr[8], int sapi_type, int channel, int master, int encrypt, int authenticate, int tid)
Open an outgoing RFCOMM (SPP) connection to a remote device, client role.
uint8_t JSApi_GetConnectionState(int conn)
Get the state of a JSApi connection.
int BTLP_uiSendDataOverBT(const void *data, uint32_t size, int sapi)
Send data over an L2CAP port: one buffer per packet from the shared stack pool.
uint16_t CA_LocalDev(uint16_t root, int zero)
Local BT device object.
uint32_t BTA_Conn_GetSapiApp(int oh, int conn)
Get the SAPI application of an open connection.
void BtAccessor_Delete(int oh)
Delete a Bluetooth accessor after closing its connections and servers.
uint32_t BTA_ObjMsg(void *ev)
Read the Bluetooth event identifier from an accessor event object.
int ConnSDevSApp(uint32_t sdevice, uint32_t handler_id, const void *connection_info)
Connect a serial device to an SDev application.
const uint8_t * CA_LocalAddr(uint16_t local_dev)
BT address of the local device object.
BTLP connection (see RamBtlpConnections).
JSApi connection slot (see RamJSApiConnections).
L2CAP channel (see RamL2capChannelState).
SDev application callbacks.
void free(void *ptr)
Deallocate memory block.