beautypg.com

Rfsendatcommand – Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual

Page 249

background image

231

CATC BTT

RAINER

2.11

C

HAPTER

User’s Manual

RFCOMM connection is already present when this function is called, it
will immediately return “Success”.

Example

# Wait 3 seconds for RFCOMM connection

Trace("RFWaitForConnection\n");

result = RFWaitForConnection(1, 3000);

if( result[0] == "Success" )

{

Trace("Incoming RFCOMM connection DLCI: ", result[1],

"\n");

Trace("Connecting device address: ", result[2], "\n");

}

RFSendATCommand

RFSendATCommand(Address, DLCI, AT_Command)

Return value

"Success"

"Timed out"

"Not supported" (invalid data type)

"Not connected"

Comments

An RFCOMM connection must already be established with the device.

Example

Device = '010203040506 ';

result = RFSendATCommand(Device, dlci, "AT+CKPD=200");

Parameter

Meaning

Default Value

Comments

Address

Can use "CONNECTED_DEVICE" to send data
to a master RFCOMM connection. Note that
this will work only if exactly one device is
connected via RFCOMM.

DLCI

Data link
connection
identifier

The DLCI is returned by
RFOpenClientChannel()

AT_Command

AT command
to send

ATCommand can be one of the following:

"AT+CKPD=200", "RING", "OK", "ERROR",
"AT+VGM=5", "AT+VGS=5", "+VGM=5",
"+VGS=5", "CONNECT", "NO_CARRIER",
"NO_DIALTONE", "BUSY"