Multi-Tech Systems 92U09G17825 Manuale Utente

Pagina di 174
PART 4 – Embedded Device Servers 
Chapter 12 – SocketWireless Bluetooth (MTS2BTSMI) 
Multi-Tech Systems, Inc. Universal Socket Hardware Guide for Developers (S000342L) 
170 
 
 
Disabling Flow Control Using AT Commands 
Protocol Change: 
For Bluetooth protocol V2.0, the circuit board I/O pin 7 now controls flow control.  
Previous Protocol V1.2  
New Protocol V2.0
 
ATSW22,3,x,x    
ATSW22,7,x,x
 
 
ATSW23,3,x,x
 
ATSW23,7,x,x 
 
Disabling Flow Control Using Protocol V.2.0 
Using a terminal screen with flow control enabled, issue commands to turn off flow control. 
Sent:
    ATSW22,7,1,0 <cr>   
// Set PIO7 as output and do not store in flash 
Reply:  
OK<cr_lf> 
Sent:
   ATSW23,7,1,0<cr> 
// Set PIO7 output high and do not store in flash 
Reply:  
OK<cr_lf> 
To store the setting in flash: 
Sent:
    ATSW22,7,1,1<cr>   
// Set PIO7 as output and store in flash 
Reply:  
OK<cr_lf> 
Sent:
   ATSW23,7,1,1<cr> 
// Set PIO7 output high and store in flash 
Reply:  
OK<cr_lf> 
Now you can communicate with the Bluetooth device with flow control turned off. 
 
Other Examples 
See the Bluetooth AT Commands Reference Guide for other examples: 
• 
Multipoint Example Using the SocketWireless MTS2BTSMI or the Bluetooth Adapter MT2BTA – One Slave 
and Four Master Devices. 
• 
Multipoint Example Using the SocketWireless MTS2BTSMI or the Bluetooth Adapter MT2BTA – One Master 
and Four Slave Devices. 
• 
Repeater Example Using the SocketWireless MTS2BTSMI or the Bluetooth Adapter MT2BTA. 
 
 
Changing Configuration 
Parameters, such as the Bluetooth Name, Service Name, Class of Device, and Serial Port settings can be viewed 
and configured. This can be done locally through the serial port UART or from a remote Bluetooth RF link. To 
configure the SocketWireless Bluetooth device, the device must be in command mode by issuing +++.  
You can use the developer board and the RS-232 cable to connect to a PC and pass ASCII characters through the 
terminal to the SocketWireless Bluetooth device. The communications settings should match the settings used when 
the SocketWireless Bluetooth device connects. For example, the defaults are: 
9600bps 
8 bits 
No Parity 
1 stop bit 
Hardware flow control enabled.  
Once you change these parameters, you have the option to store them permanently in the non-volatile memory. Run 
your favorite terminal emulator, HyperTerminal, or other program.  
• 
Type AT on your screen and follow it with a carriage return <cr_lf>. You should see "OK" returned to you. 
This will verify that your cable and communications settings are correct. When the SocketWireless device is 
not connected to another Bluetooth device, you can type the AT commands directly into the SocketWireless' 
UART; e.g., you do not have to type +++ to change from data mode to command mode. 
• 
Now you can enter any of the AT commands discussed in the following sections. Follow these commands by 
<cr_lf>
. Valid commands will return an "OK" or a valid response. Invalid commands will reply ERROR.  
• 
To return to data mode, type ATMD. You can now pass or receive data from a remote connected Bluetooth 
device.   
Notes:
  
• 
If you change communications parameter settings, remember to change your terminal or emulator 
communications settings to correspond to the newly created parameter settings.   
• 
AT commands will not echo back to the terminal.