Rfwaitforconnection – Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual
Page 248

230
CATC BTT
RAINER
2.11
C
HAPTER
User’s Manual
Comments
Receives data from a device connected via RFCOMM. Waits Timeout mil-
liseconds (or infinitely if 0 is specified) for the device to begin sending data
to Merlin's Wand.
Example
#Get the data; stop when no data is received for 5 secs
result = RFReceiveData(Device, DLCI, 5000);
while(result[0] == "Success")
{
Trace("Number of data bytes received: ", result[1],
"\n");
result = RFReceiveData(Device, DLCI, 5000);
}
RFWaitForConnection
RFWaitForConnection(ServerID, Timeout)
Return value
Returns a list with three values: status, DLCI, and BluetoothDevice.
Status (element 0) is one of the following:
•
“Success”
•
“Timed out”
•
“Failure”
DLCI (element 1) is the data link connection identifier.
BluetoothDevice (element 2) is the address of the connecting device.
Comments
Waits Timeout milliseconds for a device to establish an RFCOMM connec-
tion with BTTrainer. This function will block the specified amount of time
(or infinitely if 0 is specified) unless a connection is established. If an
Parameter
Meaning
Default Value
Comments
ServerID
Service ID for
RFCOMM
channel
Timeout
Time in ms to
wait for an
RFCOMM
connection
0 (Infinite
wait)
Use 0 as the timeout value to wait infinitely.