beautypg.com

Rfreceivedata – Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual

Page 247

background image

229

CATC BTT

RAINER

2.11

C

HAPTER

User’s Manual

Return value

“Success”

“Timed out”

“Not supported” (invalid data type)

“Not connected”

“Pipe not found”

“Internal Error”

Comments

An RFCOMM connection must already be established with the device. The
pipe specified must already be set up in the Data Transfer Manager. The
pipe should not be open when RFSendDataFromPipe is called.

Example

RFSendDataFromPipe(Devices[0], dlci, "MyPipe");

RFSendDataFromPipe("CONNECTED_DEVICE", dlci, "Pipe2");

RFReceiveData

RFReceiveData(Address, DLCI, Timeout)

Return value

Returns a list with three values: status, number of bytes, and data array.

Status (element 0) is one of the following:

“Success”

“Not connected”

“Timed out”

Number of bytes (element 1) is the number of bytes received.

Data array (element 2) is the sequence of data bytes received.

Parameter

Meaning

Default Value

Comments

Address

Bluetooth

address of

device

Can use "CONNECTED_DEVICE" to receive
data from a master RFCOMM connection

DLCI

Data link con-

nection identi-

fier

The DLCI is returned by RFOpenClientChan-
nel()

Timeout

Time in ms to

wait for an
RFCOMM
connection

0 (Infinite

wait)

Use 0 as the timeout value to wait infinitely