Ezurio TDK-BTISM AT Command Set

Bluetooth Serial Module
AT Command Set
Doc No: XRBLU020-001SW-0 Issue No : 1.9 Date : 3 Feb 2003 Page 1 of 38 Author : Mahendra Tailor
Bluetooth Serial Module
AT Command Set
Prepared by :
Signature :
© 2003 COPYRIGHT TDK Systems Europe Ltd
This document is issued by TDK Systems Europe Limited (hereinafter called TDK) in confidence, and is not to be reproduced in whole or in part without the prior written permission of TDK. The information contained herein is the property of TDK and is to be used only for the purpose for which it is submitted and is not to be released in whole or in part without the prior written permission of TDK.
Mahendra Tailor
Authorised by:
Signature :
©
TDK Systems Europe Ltd
2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 2 of 38
Change History
Issue Description Author Date
1.0 First Draft M Tailor 4-Oct-2002
1.1 *) Added S registers 504,530,531 *) Added commands AT+BTR & AT+BTA *) Audio capability *) Added Chapter “Asynchronous Responses”
1.2 *) Added S Registers 533 and 534 M Tailor 31-Oct-02
1.3 *) Updated Pin Designation on 40 way connector M Tailor 1 Nov 02
1.4 *) Added S Register 535 M Tailor 12 Nov 02
1.5 *) Error in AT Command sequence in the pure cable replacement chapter corrected *) Removed paragraph regarding unilateral acceptance of incoming call – not an issue anymore *)Added the “Frequently Asked Questions” Chapter *)Added NickH’s comments
1.6 *) Updated the “pure cable replacement” chapter *) Added the AT&F* command for completely erasing the nvram
1.7 *) AT+BTI now returns ERROR 27 if S Reg 518 is set too high *) ERROR 17,18 and 19 no longer reported *) New Asynchronous response => PAIR n <bd_addr> *) Version = 0.3.6 *) S Reg 533 now takes value 0 to 2 inclusive *) Added S Reg 525
1.8 *) Added the Motherboard Chapter M Tailor 14 Jan 03
1.9 *)Corrected details for SReg 508 to 511 inclusive *)AT&F command modified *)Added Power Consumption Chapter
M Tailor 16-Oct-02
M Tailor 6 Dec 02
M Tailor 9 Dec 02
M Tailor 2 Jan 03
M Tailor 3 Feb 03
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 3 of 38
Contents
1. Introduction 5
2.
AT Command Set 6
2.1 Assumptions ....................................................................................................................................6
2.2 Commands ......................................................................................................................................6
2.2.1 AT................................................................................................................................6
2.2.2 ATZ {Hardware Reset}.........................................................................................6
2.2.3 ATEn {Enable/Disble Echoes} .............................................................................7
2.2.4 AT&Fn {Set S Reg Defaults}................................................................................7
2.2.4 AT&F* {Clear NonVolatile Storage} ....................................................................7
2.2.5 AT&W {Write S Regs to Non-Volatile Memory} ...................................................7
2.2.6 ATIn {Information} ................................................................................................8
2.2.7 ATSn=m {Set S Register} ....................................................................................9
2.2.6 Future S Registers ......................................................................................................10
2.2.8 ATSn? {Query S Register}...................................................................................11
2.2.9 ATD<bd_addr> {Make Connection}.....................................................................11
2.2.10 ATDU<bd_addr> {Make Authenticated Connection}...........................................11
2.2.11 ATDY<bd_addr> {Make Encrypted Connection}.................................................11
2.2.12 ATDUY<bd_addr> {Make Encrypted/Authenticated Connection} .......................11
2.2.13 ATDYU<bd_addr> {Make Encrypted/Authenticated Connection} .......................11
2.2.14 +++ {Enter Command Mode}................................................................................11
2.2.15 ^^^ {Enter Command Mode} .................................................................................12
2.2.16 ATA {Answer Call} ...............................................................................................12
2.2.17 ATH {Drop Connection} .......................................................................................12
2.2.18 ATO {Enter Online Mode} (letter ‘o’) ...................................................................12
2.2.19 AT+BTO<devclass> {Open and make Unit Detectable} .....................................12
2.2.20 AT+BTI<devclass> {Inquire}.................................................................................12
2.2.21 AT+BTIV<devclass> {Inquire} ..............................................................................13
2.2.22 AT+BTIN<devclass> {Inquire} ..............................................................................13
2.2.23 AT+BTX {Disable Page/Inquiry Scanning} ..........................................................13
2.2.24 AT+BTQ {Enable Inquiry Scans ONLY} ..............................................................13
2.2.25 AT+BTG {Enable Promiscuous Page Scanning ONLY}......................................13
2.2.26 AT+BTGU {Enable Promiscuous Page Scanning ONLY} ...................................13
2.2.27 AT+BTGY {Enable Promiscuous Page Scanning ONLY} ...................................14
2.2.28 AT+BTGUY {Enable Promiscuous Page Scanning ONLY}.................................14
2.2.29 AT+BTGYU {Enable Promiscuous Page Scanning ONLY}.................................14
2.2.30 AT+BTG<bd_addr> {Enable Cautious Page Scanning ONLY}...........................14
2.2.31 AT+BTP {Enable Promiscuous Page Scaning + Inquiry Scans} .........................14
2.2.32 AT+BTPU {Enable Promiscuous Page Scaning + Inquiry Scans} ......................14
2.2.33 AT+BTPY {Enable Promiscuous Page Scaning + Inquiry Scans}.......................15
2.2.34 AT+BTPUY {Enable Promiscuous Page Scaning + Inquiry Scans} .....................15
2.2.35 AT+BTPYU {Enable Promiscuous Page Scaning + Inquiry Scans} ....................15
2.2.36 AT+BTP<bd_addr> {Enable Cautious Page Scanning + Inq Scans}..................15
2.2.37 AT+BTN=<string> {Set Friendly Name in NonVol Mem}.....................................15
2.2.38 AT+BTN? {Read Friendly Name from NonVol Mem} ..........................................15
2.2.39 AT+BTF=<string> {Set Friendly Name}...............................................................15
2.2.40 AT+BTS=<string> {Set Service Name} ...............................................................16
2.2.41 AT+BTS? {Read Service Name from NonVol Mem} ...........................................16
2.2.42 AT+BTW<bd_addr> {Initiate pairing}.......................................................................16
2.2.43 AT+BTK=<string> {Set Passkey}..........................................................................16
2.2.44 AT+BTT {Add Trusted Device} ............................................................................16
2.2.45 AT+BTT? {List Trusted Devices} .........................................................................17
2.2.46 AT+BTW? {List Cached Trusted Device} ............................................................17
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 4 of 38
2.2.47 AT+BTD<bd_addr> {Remove Trusted Device} ......................................................17
2.2.48 AT+BTD* {Remove All Trusted Device} .................................................................17
2.2.50 AT+BTR<bd_addr> {Set Peer Address}.................................................................17
2.2.49 AT+BTR? {Display Peer Address}.......................................................................18
2.2.51 AT+BTAn {Control Audio Channel} .....................................................................18
Unsolicited Responses 19
3.
3.1 RING................................................................................................................................................19
3.2 PIN?.................................................................................................................................................19
3.3 AUDIO ON.......................................................................................................................................19
3.4 AUDIO OFF .....................................................................................................................................19
3.5 AUDIO FAIL.....................................................................................................................................19
3.6 ERROR 27.......................................................................................................................................19
3.7 PAIR n <bd_addr>...........................................................................................................................19
4.
Incoming Connections 20
5.
Dropping Connections 21
6.
Pairing and Trusted Devices 22
7.
Error Responses 23
8.
Pin Out 24
9.
RS232 Signal Pin Mapping 25
10.
Power Consumption and Reset 26
10.1 Reset .....................................................................................................................................26
10.2 Power Consumption..............................................................................................................26
11
Pure Cable Replacement Mode 28
11.1 Data Cable ............................................................................................................................28
11.2 Audio Cable...........................................................................................................................29
12.
Frequently Asked Questions 30
13.
Development Motherboard 32
Use Cases 35
14.
14.1 Example 1: Light Switch Controller .......................................................................................35
14.1.1 Background.................................................................................................................35
14.1.2 AT Command Sequence ............................................................................................35
14.2 Example 2: Remote Data Logger..........................................................................................36
14.2.1 Background.................................................................................................................36
14.2.2 AT Command Sequence ............................................................................................36
14.3 Example 3: Trusted Device Management.............................................................................37
14.3.1 Background.................................................................................................................37
14.3.2 Obtain a new Link Key ................................................................................................37
14.3.3 Store link key in trusted device database ...................................................................37
14.3.4 List trusted device database .......................................................................................37
14.3.5 Store link key in trusted device database (full) ...........................................................38
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 5 of 38
1. Introduction
This document describes the protocol used to control and configure TDK’s Bluetooth Serial Module. The protocol is similar to the industry standard Hayes AT protocol used in telephony modems due to the fact that both types of devices are connection oriented. Appropriate AT commands have been provided to make the module perform the two core actions of a Bluetooth device, which is make/break connections and Inquiry. Many other AT commands are also provided to perform ancillary functions, such as, pairing, trusted devices database management, S Register maintenance etc.
Just like telephony modems, the serial module powers up into an unconnected state and will only respond via the serial interface. In this state the module will not even respond to Bluetooth Inquiries. Then, just like controlling a modem, the host can issue AT commands which map to various Bluetooth activities. The command set is extensive enough to allow a host to make connections which are authenticated and/or encrypted or have neither.
The device has a serial interface which can be configuration for baudrates from 1200 up to 921600, and an RF communications end point. The latter has a concept of connected and unconnected modes and the former will have a concept of Command and Online mode. This leads to a 2x2 matrix of four states, as shown below.
RF Unconnected RF Connected Command Mode OK OK Online Mode ILLEGAL OK
One combination, ‘RF unconnected’ and ‘Online Mode’ does not make sense and will be ignored.
Navigation between these states is done using the AT commands which are described in detail in subsequent sections.
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 6 of 38
2. AT Command Set
2.1 Assumptions
The CSR (Cambridge Silicon Radio) BC2 chipset in the TDK Modules is memory resource limited therefore it is NOT proposed that there be full implementation of the AT protocol as seen in modems. The claim made for this device is that it will have a protocol similar to an AT modem. In fact, the protocol is similar enough so that existing source code written for modems, can be used with very little modification for use with this serial module.
Therefore the following assumptions are made:-
1 All commands will be terminated by the carriage return character 0x0D, which is represented by
the string <cr> in descriptions below and cannot be changed.
2 All responses from the module will have carriage return and linefeed characters prepending and
appending the response. These dual character sequences have the values 0x0D and 0x0A respectively and shall be represented by the string <cr,lf> and cannot be changed.
3 All Bluetooth addresses shall be represented by a fixed 12 digit hexadecimal string, case
insensitive.
4 All Bluetooth Device Class codes shall be represented by a fixed 6 digit hexadecimal string, case
insensitive.
5 All new Bluetooth specific commands shall be identified by the string +BTx, where x is generally a
mnemonic of the intended functionality.
2.2 Commands
This section describes all available AT commands. Many commands require mandatory parameters and some take optional parameters. These parameters are either integer values,strings,Bluetooth addresses or device classes. The following convention is used when describing the various AT commands
<bd_addr> A 12 character Bluetooth address consisting of ascii characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to ‘f’. <devclass> A 6 character Bluetooth device class consisting of ascii characters ‘0’ to ‘9’, ‘A’ to ‘F’ and ‘a’ to
‘f’.
n A positive integer value m An integer value which could be positive or negative, which can be entered as a decimal value
or in hexadecimal if preceded by the ‘$’ character. Eg the value 1234 can also be entered as $4D2
<string> A string delimited by double quotes. Eg “Hello World”. The “ character MUST be supplied as
delimiters.
2.2.1 AT
Response: <cr,lf>OK<cr,lf>
2.2.2 ATZ {Hardware Reset}
Forces the device through a hardware reset which means it will eventually come alive in the Command mode and Bluetooth Unconnected mode. This allows changes to the PS store to take effect. Allow for about 2 seconds for the device to start responding to AT commands again. The surest way of determining that the device is alive again, is to keep sending it AT<cr> until it responds with an OK response.
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 7 of 38
Response: <cr,lf>OK<cr,lf> note OK is returned before the RESET
2.2.3 ATEn {Enable/Disble Echoes}
It affects S Register 506. Set n=0 to disable echoes and n=1 to enable. All other values will generate an error.
Response: <cr,lf>OK<cr,lf>
2.2.4 AT&Fn {Set S Reg Defaults}
This command will only work when the device is in idle mode. Depending on the value of ‘n’ it installs S Reg values appropriate for various power modes, ranging from minimum power consumption to maximum. Legal values of ‘n’ are as per the following table. All other values of n will generate a syntax error response.
‘n’ Description
0 (Default) Medium power consumption, UART baudrate unchanged, Left LED off, Right Led = DCD 1 Minimum power consumption, UART baudrate set to 9600, Both LEDs off 2 Minimum power consumption, UART baudrate set to 38400, Both LEDs off 3 Minimum power consumption, UART baudrate set to 115200, Both LEDs off 4 Medium power consumption, UART baudrate set to 115200, Left LED off, Right Led = DCD 5 Maximum power consumption, UART baudrate set to 115200,
Left LED=DSR, Right Led = DCD
6 Maximum power consumption, UART baudrate set to 460800,
Left LED=DSR, Right Led = DCD
If ‘n’ is not specified then a default value of 0 is assumed where the baudrate is NOT changed.
Please refer to the “Power Consumption” chapter further on, for a more detailed discussion of power usage.
The new values are NOT updated in nvram until the AT&W command is sent to the module
Response: <cr,lf>OK<cr,lf> Or
Response: <cr,lf>ERROR nn<cr,lf>
2.2.4 AT&F* {Clear NonVolatile Storage}
This command will only work when the device is in idle mode. It installs values in S registers as per command AT&F4 and then all other user parameters in non-volatile storage is erased. This means that the trusted device database is cleared, and so are parameters related to the following commands:- AT+BTR, AT+BTN, AT+BTS.
Response: <cr,lf>OK<cr,lf> Or
Response: <cr,lf>ERROR nn<cr,lf>
2.2.5 AT&W {Write S Regs to Non-Volatile Memory}
Writes current S Register values to non-volatile memory so that they are retained over a power cycle. This command only works if not in ONLINE_COMMAND mode. This is due to the fact that writing to non-volatile storage is not allowed while a Bluetooth connection is active.
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 8 of 38
Response: <cr,lf>OK<cr,lf> Or
Response: <cr,lf>ERROR nn<cr,lf>
2.2.6 ATIn {Information}
This will return information about the module. For example, version numbers, manufacturer etc
For n=0, the response describes the product. Response: <cr,lf>TDK Serial Module<cr,lf>OK<cr,lf>
For n=1, the CSR firmware build number is returned, for example Response: <cr,lf>520<cr,lf>OK<cr,lf>
For n=2, the TDK Image number is returned, for example Response: <cr,lf>06G<cr,lf>OK<cr,lf>
A letter suffix implies an engineering build for internal use.
For n=3, the version number of the vm app is returned, for example Response: <cr,lf>1.01<cr,lf>OK<cr,lf>
For n=4, a 12 digit hex number corresponding to the Bluetooth address of the device is returned Response: <cr,lf>aabbccddee<cr,lf>OK<cr,lf>
For n=5, the Manufacturer of this device is returned Response: <cr,lf>TDK Systems Europe Ltd, UK<cr,lf>OK<cr,lf>
For n=6, the maximum size of trusted device database is returned Response: <cr,lf>4<cr,lf>OK<cr,lf>
For n=7, the manufacturer of the Bluetooth chipset is returned Response: <cr,lf>CSR<cr,lf>OK<cr,lf>
For n=8, the chipset designation is returned Response: <cr,lf>BC2-EXT<cr,lf>OK<cr,lf>
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 9 of 38
2.2.7 ATSn=m {Set S Register}
There is a concept of registers which are used to store parameters, such as escape sequence character, inquiry delay time etc, as listed in detail below.
The value part ‘m’ can be entered as decimal or hexadecimal. A hexadecimal value is specified via a ‘$’ leading character. For example $1234 is a hex number.
When S register values are changed, the changes are not stored in non-volatile storage UNTIL the AT&W command is used. Note that AT&W does not affect S registers 520 to 525, 1000 to 1010 as they are updated in non-volatile storage when the command is received.
Register ‘n’
0 1 -1..15 Number of RING indication before auto answering an inbound connection. A value of 0
2 ‘^’ 0..255 Escape sequence character. It is not ‘+’ by default as a Bluetooth serial link can be used
12 100 50..5000 Escape sequence guard time in milliseconds. 500 0 0..1 Default Authentication for outgoing connections, Set to 1 to Enable Authentication 501 0 0..1 Default Encryption for outgoing connections, Set to 1 to Enable Encryption 502 0 0..1 Default Authentication for incoming connections, Set to 1 to Enable Authentication 503 0 0..1 Default Encryption for incoming connections, Set to 1 to Enable Encryption 504 0 0..1 Set to 1 for suppression of CONNECT message to host for outbound connections 505 5 2 .. 120 Delay before abandoning connection attempt as a master. Referenced by the ATD. In
506 1 0..1 Enable/Disable echoes. The ATEn command also affects this. 507 0 0..2 When set to 0, a connection can be dropped using ^^^ escape sequence only and the
508 640 10..2550 Page Scan Interval in units millisec ( 10ms will give 11.25ms) 509 320 10..2550 Page Scan Window in units millisec ( 10ms will give 11.25ms) 510 640 10..2550 Inquiry Scan Interval in units of millisec ( 10ms will give 11.25ms) 511 320 10..2550 Inquiry Scan Window in units of millisec ( 10ms will give 11.25ms) 512 1 0..4 Specify power up state. If set to 0 then AT+BTO is required to open the device for
513 1 0..1 Pairing Authentication , 1 = Enable 514 10 1..60 Pairing Timeout in seconds 515 0x000000 0.. 0xFFFFFF Default Device Class Code to be used with AT+BTO when it is not explicitly specified.
516 0xFFFFFF 0.. 0xFFFFFF Default Device Class Code to be used with AT+BTI when it is not explicitly specified.
517 20 2 .. 61 Inquiry Length in units of seconds. This parameter is referenced by the AT+BTI command 518 8 0..255 Maximum number of responses from an inquiry request . This parameter is reference by
519 500 100.. 6000 When S507>0, and in a connection, DSR can be used to change from online to command
520 115200 300.. 921600 Change baudrate. The effect is immediate and in fact the OK will be sent at the new
© TDK Systems Europe Ltd 2003
Default Range Comment
disables autoanswer. If -1, then autoanswer on one RING and do NOT send RING/CONNECT response to the host. This emulates a serial cable replacement situation.
to connect to a mobile phone which exposes an AT command set, which will in turn use ‘+’ as default. So if both used ‘+’ there will be confusion
units of seconds
state of DSR line is ignored. When set to 1 a connection can be droped using EITHER the ^^^ escape sequence OR the DSR handshaking line. Finally when set to 2, a connection can only dropped using a deassertion of DSR. Mode 2 provides for the highest data transfer rate.
Bluetooth activity. When set to 1, it proceeds to a state as if AT+BTO was entered. When set to 2, it will scan for inquiries only, similar to issuing AT+BTQ. When set to 3, it will page for a connection but not be discoverable eg AT+BTG and finally when set to 4, it will be like AT+BTP. Note that by implication, a change to this can only be seen after a power cycle AND if AT&W is actioned prior to the power cycle.
When queried, the value is always printed as a hex number.
When queried the value is always printed as a hex number.
the AT+BTI command. If this number is set too high, then AT+BTI will return ERROR 27. For a particular firmware revision, determine the effective maximum value by trial and error. That is, set to a high value, send AT+BTI and if ERROR 27 is returned, then retry with a smaller value. This effective max value will remain unchanged for that particular firmware build.
state by deasserting the DSR line for less than the time specified in this register. This value is rounded down to the nearest 100ms
baudrate. Due to the integer arithmetic involved, the actual baudrate is different. To inspect the actual baudrate, do ATS521? ATS520? will return the baudrate to the nearest
100.
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 10 of 38
521 115200 300.. 921600 Change baudrate. The effect is immediate and in fact the OK will be sent at the new
522 1 1 1 = CTS/RTS hardware handshaking enabled 523 1 1..2 Number of StopBits 524 0 0..2 Parity. 0=None, 1=Odd, 2=Even 525 See
530 1000 100.. 15000 Reconnect delay when configured as master in pure-cable-replacement mode. This value
531 0 0..1 If Set to 1 then on connection, remain in Command Mode. 532 0 0..3 If non zero then on every connection, and SCO channel (audio) will be initiated. If value
533 1 0..2 If set to 1 then left LED follows RI state, if set to 2 then it follows the state of DSR and if 0
534 1 0..1 If set to 1 then right LED follows DCD state, otherwise GPIO4 is available as user i/o.
535 20 0..41 Link Supervision Timeout. If units go out of range, then a NO CARRIER message will be
540 0 0 48-127 Sets the MTU in L2CAP configuration negotiations. The value of 0 is a special value
1001 to 1010 610 0 0..31 Set direction of digital i/o lines 620 n/a 0..31 Read/Write to all 8 Digital lines in one atomic step. The value is returned as a 4 digit hex
621 n/a 0..1 Read/Write to GPIO1 622 n/a 0..1 Read/Write to GPIO2 623 n/a 0..1 Read/Write to GPIO3 624 n/a 0..1 Read/Write to GPIO4 625 n/a 0..1 Read/Write to GPIO5 626 n/a 0 Read/Write to GPIO6 - Not Available so 0 always returned 627 n/a 0 Read/Write to GPIO7 - Not Available so 0 always returned 628 n/a 0 Read/Write to GPIO8 - Not Available so 0 always returned
Comment
0.. 2^32 10 General Purpose 32 bit Registers for use by host. These are stored in non-volatile
0..1 Apply multiplier of 8 to baudrate internally. This is set to 0 (disabled) by default for the
If Sreg 525=1, then the max baudrate is limited to 115200
baudrate. Due to the integer arithmetic involved, the actual baudrate is different. To inspect the actual baudrate, do ATS521? If Sreg 525=1, then the max baudrate is limited to 115200
serial module, and set to 1 (enabled) by default for the pc card variant. It is required in the pc card because the UART chip on the pc card is driven by a
14.7456MHZ crystal instead of 1.8432MHz. This means that when a host asks for a baudrate, in reality it gets a baudrate which is 8 times faster.
If S Reg 520 > 115200 then this register cannot be set to 1.
is rounded down to the nearest 100ms
=1 then HV1, if =2 then HV2 and finally if =3 then HV3
then neither and GPIO5 is available as a user i/o. This register will not necessarily be effective immediately after changing the value. It must be saved to non-volatile store using AT&W and will operate as expected after an ATZ or a power cycle.
This register will not necessarily be effective immediately after changing the value. It must be saved to non-volatile store using AT&W and will operate as expected after an ATZ or a power cycle.
sent to the host after the time specified here
which is taken to mean that the current value should remain.
memory.
value wth trailing 0s.
2.2.6 Future S Registers
The following registers are planned for the future.
Register Default Range Comment
601 n/a TBD Read/Write to Analogue Line 1 602 n/a TBD Read/Write to Analogue Line 2 603 0 0..1 Set direction of Analogue Line 1 604 0 0..1 Set direction of Analogue Line 2
Response: <cr,lf>OK<cr,lf>
If the register is not recognised or the value specified is out of range then
Response: <cr,lf>ERROR nn<cr,lf>
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 11 of 38
2.2.8 ATSn? {Query S Register}
This will return the current value of register n.
For recognised values of n Response: <cr,lf>As Appropriate<cr,lf> OK<cr,lf>
For unrecognised values of n
Response: <cr,lf>ERROR nn<cr,lf>
2.2.9 ATD<bd_addr> {Make Connection}
Make a connection to device with Bluetooth addess <bd_addr>. Authentication and Encryption is as per S registers 500 and 501. The timeout is specified by S register 505
Response: <cr,lf>CONNECT 123456789012<cr,lf> Or <cr,lf>NO CARRIER<cr,lf>
2.2.10 ATDU<bd_addr> {Make Authenticated Connection}
Make an authenticated connection to device with Bluetooth addess <bd_addr>. Encryption is disabled.
Response: <cr,lf>CONNECT 123456789012 A<cr,lf> Or <cr,lf>NO CARRIER<cr,lf>
2.2.11 ATDY<bd_addr> {Make Encrypted Connection}
Make an encrypted connection to device with Bluetooth addess <bd_addr>. Authentication is disabled
Response: <cr,lf>CONNECT 123456789012 E<cr,lf> Or <cr,lf>NO CARRIER<cr,lf>
2.2.12 ATDUY<bd_addr> {Make Encrypted/Authenticated Connection}
Make an encrypted and authenticated connection to device with Bluetooth addess <bd_addr>.
Response: <cr,lf>CONNECT 123456789012 AE<cr,lf> Or <cr,lf>NO CARRIER<cr,lf>
2.2.13 ATDYU<bd_addr> {Make Encrypted/Authenticated Connection}
Make an encrypted and authenticated connection to device with Bluetooth addess <bd_addr>.
Response: <cr,lf>CONNECT 123456789012 AE<cr,lf> Or <cr,lf>NO CARRIER<cr,lf>
2.2.14 +++ {Enter Command Mode}
Usually this is the escape sequence for forcing a modem into command mode when in online state. Since this device could be used to connect to a mobile phone modem over a Bluetooth serial port profile, it could confuse matters considerably, therefore the sequence ^^^ is used as described next.
© TDK Systems Europe Ltd 2003
Bluetooth Serial Module
AT Command Set
Date : 3 Feb 03 Issue No : 1.9 Doc No : XRBLU020-001SW-0 Page 12 of 38
2.2.15 ^^^ {Enter Command Mode}
When in online and connected mode, the host can force the device into a command and connected mode so that AT Commands can be issued to the device. The character in this escape sequence is specified in the S2 register , so can be changed. In addition, the escape sequence guard time is specified by S Register 12. By default the guard time is set to 100 milliseconds. Please refer to Section 5: Dropping Connections for more related information.
Response: <lfcr>OK<cr,lf>
2.2.16 ATA {Answer Call}
Accept an incoming connection. Which is indicated by the unsolicited string <cr,lf>RING 123456789012<cr,lf> every second. Where 123456789012 is the Bluetooth address of the connecting device.
Response: <cr,lf>CONNECT 123456789012<cr,lf>
2.2.17 ATH {Drop Connection}
Drop an existing connection or reject an incoming connection indicated by unsolicited RING messages
Response: <cr,lf>OK<cr,lf>
2.2.18 ATO {Enter Online Mode} (letter ‘o’)
Return to online data mode. Assume online after OK is received. Will repond with ERROR if there is no Bluetooth connection
Response: <cr,lf>OK<cr,lf> or Response: <cr,lf>ERROR nn<cr,lf>
2.2.19 AT+BTO<devclass> {Open and make Unit Detectable}
After power up and ATZ, this command is sent so that RFCOMM is initialised and opened and the service name as specified in AT+BTN is exposed via the SDP registry.
The <devclass> value specifies a device class code mask and is a fixed length hex digit optional string. If it is not specified, then the device class code is taken from S register 515.
For this command to be effective S Register 512 must be set to 0.
2.2.20 AT+BTI<devclass> {Inquire}
This will make the device perform an inquiry for device class code cccccc for delay milliseconds and max number of unique responses, where delay is specified by S register 517 and max is specified by S register
518.
The <devclass> value specifies a device class code and is a fixed length hex digit optional string. If it is not specified, then the device class code is taken from S register 516. <DevClass> must be exactly 6 hex characters long.
Response: <cr,lf>12346789012
<cr,lf>12345678914 <cr,lf>OK<cr,lf>
© TDK Systems Europe Ltd 2003
Loading...
+ 26 hidden pages