Checkpoint Systems Inc. EVOLVES10 Manual De Usuario

Descargar
Página de 143
Chapter 10 – SocketWireless Bluetooth (MTS2BTSMI) 
Multi-Tech Systems, Inc. Universal Socket Hardware Guide for Developers (S000342D) 
131 
 
Application Notes 
Example of a Master Discovery/Connection Sequence 
From Power Up and No Connection 
1. 
Verify local device is Master in Data Mode. 
 Sent:  ATSi,7 <cr_lf>   
 
 
 
 
 Reply: 
<cr_lf>1,1,0,0<cr_lf> 
2. 
If not Master, set to Master and Data Mode. 
 Sent:  ATSW25,1,1,0,0 <cr_lf>   
 
 
 
 
 Reply: 
<cr_lf>OK<cr_lf> 
3. 
Perform an Inquiry to obtain BT_Addresses (unless it is already known). 
 Sent:  ATMC <cr_lf>   
// Places Radio in Command Mode 
 Reply: 
<cr_lf>OK<cr_lf> 
 Sent: ATUCL 
// Clears radio state 
 Reply: 
<cr_lf>OK<cr_lf> 
 Sent: ATDI,1,00000000 {Class of Device}<cr_lf>  
 
// Looks for only one Bluetooth device 
 Reply: 
<cr_lf>00A0961F2023,00000104,SOCKETWIRELESS<cr_lf>DONE<cr_lf>CONNECT <cr_lf> 
4. 
Perform a Master Connect over SPP using the BT_Address. 
Sent  : ATDM, 00A0961F2023,1101<cr_lf> 
// SPP connection   
Reply:<cr_lf>CONNECT,00A0961F008F <cr_lf> 
// Returns Slave BT address radios is in data 
mode 
5. 
Place radio into Fast Data Mode. 
Sent  :  ATMC <cr_lf>   
// Places Radio in Command Mode 
Reply: <cr_lf>OK<cr_lf> 
Sent  :
 ATMF<cr_lf> 
// Places radio in Fast Data Mode 
Reply: <cr_lf>OK<cr_lf> 
6. 
Send Data.  
Note about Sending Commands from the Slave When the Slave Connects in Fast Data Mode (ATSW25/or 
issuing ATMF) 
All valid AT commands sent through the Slave's UART will be interpreted and responded by the Master as if it 
were the local Slave radio. Basically, in this configuration from the Slave end, you can obtain status and 
configure the remote Master radio. This is a unique feature that may be useful in some applications, but it can be 
confusing if you think you are talking to the Slave.  
To Get Out of Data Mode and Check Status 
1. 
Delay at least 50 milliseconds; this could be less or more. 
2. 
Perform a Set Command Mode. 
Sent  : ATMC<cr_lf>  
Reply: <cr_lf>
OK<cr_lf> 
3. 
Delay at least 50 milliseconds. 
4. 
Check Status, perform a Disconnect … 
Sent  : AT<cr_lf> 
Reply: <cr_lf>
OK<cr_lf> 
 
Note about Being Connected in Fast Data Mode 
If connected in Fast Data Mode, it is necessary to reset the device to break the connection.