01.02.2014 Views

Bluetooth Commands - wless.ru

Bluetooth Commands - wless.ru

Bluetooth Commands - wless.ru

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4 – Examples<br />

Multi-Point Example Using MTS2BTSMI or MTS2BTA<br />

Four Master and One Slave Devices<br />

Note: Attaching the fourth master device can overload the connections and cause all connections to be<br />

terminated. Increasing the distance between <strong>Bluetooth</strong> devices will effect performance and could further limit<br />

the number of connections.<br />

Setup hardware for this example consisting of up to five MTS2BTSMI or MTS2BTA <strong>Bluetooth</strong> units connected<br />

through serial ports to workstations. One unit is configured as slave and four units are configured as masters.<br />

The slave needs to be firmware version 3.6.2.1.0.0 or newer to support multipoint connections. The masters<br />

are not firmware dependent and can be older models. All <strong>Bluetooth</strong> units are configured with baud rate of<br />

9600bps, 8 data bits, no parity, 1 stop bit and hardware flow control. Baud rate can be set up to 115.2kbps<br />

but all <strong>Bluetooth</strong> devices need to be set to same baud rate.<br />

Each workstation uses a terminal emulator like HyperTerminal or ZOC to communicate to <strong>Bluetooth</strong> device<br />

using AT commands.<br />

Configure the slave <strong>Bluetooth</strong> device to function as slave in data mode.<br />

- Verify local device is Slave in Data Mode.<br />

Sent: ATSI,7 <br />

Reply: OK<br />

Reply: 0,1,0,0 <br />

- If not Slave, set to Slave in Data Mode and reset unit.<br />

Sent: ATSW25,0,1,0,0 <br />

Reply: OK<br />

- Enable multipoint mode and set number of connections to four. Then reset unit.<br />

Sent: ATSSW,3,4 <br />

Reply: OK<br />

Sent: ATURST <br />

Reply: OK<br />

- Retrieve <strong>Bluetooth</strong> address from <strong>Bluetooth</strong> slave device in this test setup.<br />

Sent: ATSI,1<br />

Reply: OK<br />

Reply: 12-digit address OK<br />

Issue these AT commands at the master <strong>Bluetooth</strong> devices to generate four wireless connections between<br />

the four Masters and the slave device.<br />

- Verify local device is Master in Data Mode.<br />

Sent: ATSI,7 <br />

Reply: OK<br />

Reply: 1,1,0,0 <br />

- If not Master, set to Master in Data Mode and reset unit.<br />

Sent: ATSW25,1,1,0,0 <br />

Reply: OK<br />

Sent: ATURST <br />

Reply: OK<br />

- Perform an Inquiry to detect BT_Address of slave (unless it is already known).<br />

Sent: ATDI,1,00000000 {Class of Device} // Looks for one <strong>Bluetooth</strong> device<br />

Reply: OK // Search completed when DONE appears<br />

Reply: BT_Slave1_Address,00000000,SOCKETWIRELESS<br />

Reply: DONE<br />

- Perform a Master Connection over SPP to the <strong>Bluetooth</strong> slave device.<br />

Sent: ATDM, BT_Slave1_Address,1101 // SPP connection<br />

Reply: OK<br />

Reply: CONNECT,BT_Slave1_Address // Returns Slave BT address radio is in<br />

data mode<br />

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

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

Saved successfully!

Ooh no, something went wrong!