Bluetooth Commands - wless.ru

Bluetooth Commands - wless.ru Bluetooth Commands - wless.ru

01.02.2014 Views

Chapter 2 – AT Commands DL Dial Last This command connects to last successful Slave Bluetooth address connection over SPP unless ATDM command was executed then the UUID from the ATDM command will be used. Format: ATDL Return Parameters: or Point-to-Point Example: TYPE: REPLY: ATDL OK CONNECT,123456789012 OR OK PAIRED,123456789012 CONNECT,123456789012 OR OK NO ANSWER OR ERROR // if security is enabled // if device not present Multi-Point Example: TYPE: ATDL REPLY: OK CONNECT,00,123456789012 OR OK PAIRED,123456789012 // if security is enabled CONNECT,123456789012 OR OK NO ANSWER // if device not present OR ERROR Notes: • To verify the stored address use the ATLAST command below. • If the remote Slave device is not present or the service is not available, NO ANSWER will reply after the master connect timeout and you will have to try again. • If security is enabled and the radio is connecting to a PC that has not yet been paired with it, the PAIRED,12345678912 message may return twice prior to the CONNECT. LAST Read Last Address Gets the last connected Bluetooth device address. Format: ATLAST Return Parameters: EXAMPLE: TYPE: ATLAST REPLY: OK 000000000000 // Nothing stored OR OK 123456789012 // Last connected BT address Multi-Tech Systems, Inc. SocketWireless Bluetooth AT Commands (S000360G) 36

Chapter 2 – AT Commands Set Master Default Bluetooth Address Commands SMA Set Master Default Address This command will set a specific Bluetooth Slave address and service profile into the Master device so on power up the Master will automatically search and connect to a unique Slave device on the highest available channel. Format: ATSMA,, Parameters: EXAMPLE: TYPE: REPLY: • BT Address: Bluetooth Address, 12 hex characters MAX • UUID: 4 digit, binary profile code (See Appendix C for more info) ATSMA,00A0961F904F,1101 OK OR ERROR Read Using: ATSI,9 Notes: • Execute ATSW25 to set the power up connect mode to auto-master before using the above command if still in slave mode. • This command is limited to only one connection. Reset module for change to take affect. MACLR Master Address Clear This command clears the stored slave address. Format: ATMACLR EXAMPLE: TYPE: ATMACLR REPLY: OK OR ERROR SSW,7 Set Auto Connect Master on Data This command connects automatically to the stored master address when data is present on the UART. The Radio will disconnect when the No Data timeout has been reached, this occurs when no data is being sent to the UART. The ATSMA command must be enabled before this will work. See the ATSW28 command to set the No Data timeout. Format: ATSSW7,1 EXAMPLE: TYPE: REPLY: ATSSW,7,1 OK OR ERROR RSW,7 Read Auto Connect Master on Data This command reads the AUTO CONNECT MASTER ON DATA enable/disable register state. Format: ATRSW,7 Return Parameters: EXAMPLE: TYPE: ATRSW,7 REPLY: OK 00 Set Using: ATSSW,7 Multi-Tech Systems, Inc. SocketWireless Bluetooth AT Commands (S000360G) 37

Chapter 2 – AT <strong>Commands</strong><br />

DL Dial Last<br />

This command connects to last successful Slave <strong>Bluetooth</strong> address connection over SPP unless ATDM<br />

command was executed then the UUID from the ATDM command will be used.<br />

Format: ATDL<br />

Return Parameters: or <br />

Point-to-Point Example:<br />

TYPE:<br />

REPLY:<br />

ATDL<br />

OK<br />

CONNECT,123456789012<br />

OR<br />

OK<br />

PAIRED,123456789012<br />

CONNECT,123456789012<br />

OR<br />

OK<br />

NO ANSWER<br />

OR<br />

ERROR<br />

// if security is enabled<br />

// if device not present<br />

Multi-Point Example:<br />

TYPE:<br />

ATDL<br />

REPLY:<br />

OK<br />

CONNECT,00,123456789012<br />

OR<br />

OK<br />

PAIRED,123456789012 // if security is enabled<br />

CONNECT,123456789012<br />

OR<br />

OK<br />

NO ANSWER // if device not present<br />

OR<br />

ERROR<br />

Notes:<br />

• To verify the stored address use the ATLAST command below.<br />

• If the remote Slave device is not present or the service is not available, NO ANSWER<br />

will reply after the master connect timeout and you will have to try again.<br />

• If security is enabled and the radio is connecting to a PC that has not yet been paired<br />

with it, the PAIRED,12345678912 message may return twice prior to the<br />

CONNECT.<br />

LAST Read Last Address<br />

Gets the last connected <strong>Bluetooth</strong> device address.<br />

Format: ATLAST<br />

Return Parameters: <br />

EXAMPLE:<br />

TYPE:<br />

ATLAST<br />

REPLY:<br />

OK<br />

000000000000 // Nothing stored<br />

OR<br />

OK<br />

123456789012<br />

// Last connected BT address<br />

Multi-Tech Systems, Inc. SocketWireless <strong>Bluetooth</strong> AT <strong>Commands</strong> (S000360G) 36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!