Home
Using the firmware of the AT command set
Contents
1. Doc ID 023232 Rev 2 UM1547 Contents 3 34 2 Responses cee eee 23 3 35 UpdatePageScan cra da a si la aa de GAAN 23 SOO AS A A O AN 24 3 30 2 ROSPONSOS cita a e Ad de 24 3 36 VESON sucia gen NA dates as aa a io ANAN 24 3 36 11 SYNTAX naa Kk NAT we eee na eee ANEK oe NAL LOKAL AG eRe e tai ee oes 24 3 36 2 Responses 0 cee teens 24 4 Error responses 2 iii pee ek rh eee ee oo A ane at er ee 25 4 1 EC ONGC sarita ddr 25 4 2 ErrEX Cute vacios siii da dl a dad ha hd 25 4 3 A AA 26 4 4 ErrlnvalidParam ga mama may ete a aa 26 4 5 Sa AA AP 26 4 6 ErrUnknownCmd simi 27 4 7 EtrinProgress sv KAWA er aa 27 5 Other responses a NG GE ER oe NAKA a A de a 28 5 1 Reset 33 paan rar a a da a a ed GG 28 5 2 Escape sequence iso N IA rruan nenna rre rra 28 5 3 Remote escape sequence 0c 28 Appendix A FW configuration variables lt lt oooooooommmoo 29 A 1 AL FW Version Tilos ani aati reaver one ida waa a aes HES 29 A2 AT2 FW version 1 3J 000000 31 REVISION RISTO ceca teeta tence tin oan eee een We teem aes 34 1577 Doc ID 023232 Rev 2 5 35 List of tables UM1547 List of tables Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11 6 35 Definitions and acronyms oooccccc eee 7 AT command list summary ete 9 Example commands that generate lt ErrConnect gt a 25 Example commands
2. N UM1547 YI User manual Using the firmware of the AT command set July 2012 Introduction This document is a guide to the AT command set a firmware application embedded in ST Bluetooth module series SPBT2532C2 SPBT2632C2A SPBT2632C1A and in ST evaluation tools STEVAL SPBT2ATV2 STEVAL SPBT2ATV3 STEVAL SPBT3ATV3 STEVAL SPBT4ATV3 The AT command set is a user friendly interface available in two options The AT firmware implements a basic point to point cable replacement while the AT2 firmware in addition to the cable replacement supports communication with smartphones The SPBT2532C2 AT module is equipped with the AT firmware implementing a serial cable replacement service using the Bluetooth serial port profile SPP The SPBT2532C2 AT2 SPBT2632C2A AT2 and SPBT2632C1A AT2 modules are equipped with the AT2 FW release which offers SPP and IAP iPOD accessory protocol service supporting communication with smartphones and Apple OS Bluetooth enabled devices This document provides a detailed description of each command supported by the AT FW and AT2 FW interface Appendix A contains the list of the system configuration variables of the AT command with each default value and range both for AT and AT2 FW When it is not necessary to specify the FW version ATn is used Each of the subsections in Section 3 AT command list gives the definition syntax and responses of each command Error responses are also de
3. 3 5 If the operation fails the response is AT AB BondFail BtcVersion The BtcVersion command is used to return the current ID of the Bluetooth controller chip Syntax AT AB BtcVersion Build The Build command is used to return the current build ID of the application firmware Syntax AT AB Build Responses If the operation is successful the response is AT AB ATn FW Build date where date is the date code of the application firmware Bypass The bypass command is used to return the ATn FW interface to the bypass mode if a connection is still available A possible use for this command is to change a setting after a connection has been made such as the UART baud rate If the ATn FW interface does not have a connection it will respond as if the connection is down Syntax AT AB Bypass Responses If a connection is still available the response is AT AB BypassMode f there is currently no connection the response is AT AB ConnectionDown ChangeBaud The host sends the ChangeBaud command in order to change the local UART speed to a new speed identified by the host This setting will only remain in effect during the current session until reset Doc ID 023232 Rev 2 11 35 AT command list UM1547 3 5 1 3 5 2 3 6 3 6 1 12 35 Syntax AT AB ChangeBaud rate where rate is the new baud rate 1200 2400 4800 9600 19 200 38 400 57 600 115 200 230 400 460 800 921 6
4. 17 3 18 3 19 3 20 3 21 3 22 3 10 2 Responses eee eee DisableBond AA AA AS aa KA PAGE a ede ia 3 11 2 Responses aaa DIECOVE AP AA AA 3 12 11 SYMAX a 2a nG KKK DEDE LABADA GRE ee eden NG 3 12 2 Responses a EnableBond iusirerisprdrs ces ia 3131 SYNTAX sees eee in EDU DE 3 13 2 Responses cece eee eee EraseBondTable 2 paaa ma BRA AA WK KAWA AA 3 141 Syntax overs deposed seat hes eae a ha 3 142 Responses 0 cee eee eee eee EXSM xda pees Cates dead excrete ewes 3 15 1 Syntax coco 3 15 2 Responses cee ee eee eee ee GetBDAddress 00 cee eee ee 316 1 SM ph a ARN GAGA tok aren YG 3 16 2 Responses cece eee ee eee e Hecenseecisenes SA71 SyNtaX naawa ma Gn dirae NA Kwak NG 3 17 2 Responses cee eee eee GPIDROAO corras rra 3 18 1 Syntax ci in ba shade vee se cee weed 3 18 2 Responses an GPIOWING Sissi RG ALAK NG DAGA eae Na WAN S191 Syntax e ce ora e kar PALAD 3 19 2 Responses cece eee HostEvent 0 cece eee ee 3 20 11 Syntax pak nA NAPADAAN Pa eee Ue 3 20 2 Responses ocooococcorcnn eee eee ee IAPCONNGCL sisi KAPE LAK BANA in S20 SYNTAX rr id 3 21 2 Responses eee eee IAPDISCONNGCE over ganda sean segue 3 221 Syntax enti ida ha Na aed beds Doc ID 023232 Rev 2 Contents UM1547 4 35 3 23 3 24 3 25 3 26 3 2
5. Upon reset if a dynamic configuration for a Smart Cable exists it will be activated If there is no dynamic configuration Smart Cable setup then this feature will remain deactivated Syntax AT AB DeleteSmartCable Responses If the operation is successful the response is AT AB DeleteSmartCableDone DisableBond The DisableBond command is used to deny new bonding with a device This command cannot be used while a connection is active Syntax AT AB DisableBond Responses If the operation is successful the response is AT AB BondDisabled Doc ID 023232 Rev 2 ky UM1547 AT command list 3 12 3 12 1 3 12 2 3 13 Discovery The discovery command is used to initiate a device discovery The command will return the number of responses of nearby devices and then the individual responses with BD address and name of device The number of devices returned is limited to 10 Inquiry is performed with an interval of 10 24 seconds The devices are reported in the same order as the original inquiry results Syntax AT AB Discovery Responses When the discovery command has been accepted the response is AT AB IngPending Once the initial inquiry is complete and discovery has been started the response is AT AB DiscoveryPending num where num is the number of devices found in decimal up to 10 will be reported For each name request that is successful the response uses the returned names in t
6. given in the following table Table 4 Example commands that generate ErrExecute Example Reason AT AB Sniff Execution of sniff while the device is not connected Doc ID 023232 Rev 2 25 35 Error responses UM1547 4 3 4 4 Table 6 ErrFormat The ErrFormat error response will be sent if ATn FW receives a command text terminated by a carriage return or line feed that does not match the expected format starting with AT AB Examples of commands that produce this error response are given in the following table Table 5 Example commands that generate lt ErrFormat gt Example Reason AT AB discovery A valid command name that does not start with the right prefix SPPConnect 00043e000000 A command that does not start with AT AB abcdef A command that does not start with AT AB ErrinvalidParam The ErrlnvalidParam error response will be sent if the parameters for the requested command are not correct The parameter s will be echoed back to the user starting from the parameter that was rejected Examples of commands that produce this error response are given in the following table Example commands that generate lt ErrlnvalidParam gt Example Response Reason AT AB SPPConnect 8136 AT AB ErrInvalidParam 8136 of digits BD address must always be 12 hex Numeric parameter not specified with required number characters AT AB SPPConnect 00043e008136 GOEP
7. page Responses If the connection is successful the response is AT AB ConnectionUp Remote BD Addr AT AB iAP BypassMode f the connection cannot be completed the response is AT AB iAPConnectionClosed IAPDisconnect The IAPDisconnect command is used by AT2 FW to terminate a connection with the remote Apple iOS device Syntax AT AB IAPDisconnect Responses If the connection is successful the response is AT AB iAPConnectionClosed LinkDisconnect The LinkDisconnect command is used to terminate a connection with the remote device s link handle Syntax AT AB LinkDisconnect Responses If the connection is successful the response is AT AB ConnectionDown Doc ID 023232 Rev 2 19 35 AT command list UM1547 3 24 3 24 1 3 24 2 3 25 3 25 1 3 25 2 3 26 3 26 1 3 26 2 20 35 LocalName The LocalName command is used to set the name of the device to the name that is reported during device discoveries By default the ATn FW interface uses Amped UP Changing the name using this command does not permanently change the local name Syntax AT AB LocalName name Where name is a string for the new local name up to 20 characters The space character is allowed the name is assumed to be all text up to the end of the command Responses If the operation is successful the response is AT AB LocalName0k PortDisconnect The PortDisconnect command is used to terminate
8. that generate ErrExecute a 25 Example commands that generate lt ErrFormat gt ee 26 Example commands that generate lt ErrlnvalidParaM gt oo 26 Example commands that generate zErrNumParams cee eee eee 27 Example commands that generate lt ErrlnProgress gt 0 cece eee eee 27 System configuration settings version 1 2 1 20 0 ccc teens 29 System configuration settings version 1 4 0 ccc eee eee 31 Document revision history 0 0 0 0c eet eee 34 Doc ID 023232 Rev 2 ky UM1547 Definition and acronyms 1 Definition and acronyms The following table lists the acronyms used in this document Table 1 Definitions and acronyms Term Description meaning American standard code for information interchange a standard describing encoding of Asal characters the use in this document is strictly US 7 bit BD Bluetooth device Modem signal data carrier detect indication from a modem that a connection has DCD been made through for example a dialup connection DTE Data terminal entity e g a computer Modem signal data terminal ready indication to a modem that the data terminal is DTR ready for a connection DUN Dialup networking profile GPIO General purpose input output IAP iPOD accessory protocol LAN Local area network PIN Personal identification number SPP Serial port profile UART Universa
9. 00 Responses If the change is accepted the response is AT AB Baudrate Changed The actual change will not occur until the response has been completely transmitted ChangeDefaultBaud The host sends the ChangeDefaultBaud command in order to change the default UART speed to a new speed identified by the host This command is used to override the default baud rate from the dynamic configuration script so that the device does not require reprogramming to update this setting The new baud rate is updated permanently until the device is either re programmed or another ChangeDefaultBaud command is issued The baud rate specified in the command will not take effect until the device is reset To change the baud rate of the current session use the ChangeBaud command Syntax AT AB ChangeDefaultBaud rate where rate is the new baud rate 1200 2400 4800 9 600 19 200 38 400 57 600 115 200 Doc ID 023232 Rev 2 ky UM1547 AT command list 3 6 2 3 7 3 7 1 3 8 3 8 1 3 8 2 3 9 e 230 400 e 460 800 e 921 600 Responses If the change is accepted the response is AT AB Baudrate Changed Config The Config command is used to set a configuration variable Syntax AT AB Config variable name variable value The list of configuration variables is shown in Appendix A Cptest The Cptest command allows to verify the connection of the MFI chipset Syntax at ab cptest Responses If the co
10. 5 2 3 16 3 16 1 3 16 2 3 17 3 17 1 3 17 2 3 18 3 18 1 Syntax AT AB ExitSniff BD address Where BD address is the BD address of the device to be switched to active mode Responses If the operation is successful the response is AT AB ActiveMode GetBDAddress The GetBDAddress command is used to read the local device s Bluetooth device address or MAC address Syntax AT AB GetBDAddress Responses If the operation is successful the response is AT AB BD_ADDR BD address GPIOConfig The GPIOConfig command is used to configure a GPIO pin to input or output Syntax AT AB GPIOConfig GPIO Pin Configuration where GPIO Pin is the pin number of the desired GPIO to configure The GPIO numbering depends on the specific HW used or Configuration is for input and o or O for output Responses If the operation is successful the response is AT AB GPIOConfigDone GPIORead The GPIORead command is used to read a GPIO pin A GPIO may be read while configured as either an input or output Syntax AT AB GPIORead GPIO Pin Doc ID 023232 Rev 2 17 35 AT command list UM1547 3 18 2 3 19 3 19 1 3 19 2 3 20 3 20 1 3 20 2 18 35 where GPIO Pin is the pin number of the desired GPIO to read The GPIO numbering depends on the specific HW used Responses If the operation is successful the response is AT AB GPIOReadDone result Where result is eith
11. 6 UseExtLPO False True when a 32 768 kHz low power oscillator is present and false if not present Var37 HSE_MHz 13 MHz rating of the main crystal oscillator read only F Set to true to enable the Bluetooth link Var38 EnableEncryption False encryption 30 35 Doc ID 023232 Rev 2 KY UM1547 FW configuration variables Table 9 System configuration settings version 1 2 continued AT version 1 2 system configuration settings version 1 2 Variable Name Default Description Default security mode should be 1 for no Var39 DefaultSecurity 1 security or 4 for authentication required Modes 2 and 3 are used for legacy compatibility Establishes which level of SSP authentication is Var40 DefaultAuthentication 4 enabled Possible values are 4 SSP Just works or 5 SSP pairing modes with MITM protection A 2 AT2 FW version 1 3 Table 10 System configuration settings version 1 4 AT2 version 1 4 system configuration settings version 1 4 Variable Name Default Description Var01 BuildVersion XXXXXXX IDPS Date code software was built Var03 BD_ADDR 00043e212345 Bluetooth device address read only Var04 DeviceName Amp ed Up Code used for secure connection Up to 20 characters are allowed case sensitive When true hardware RTS CTS flow control is Varo5 StreamingSerial True disabled and data not able to be transmitted 9 over the link will be discarded When false RST CTS
12. 7 3 28 3 29 3 30 3 31 3 32 3 33 3 34 3 22 2 Responses eee eee eee LinkDisconnect tx ce ci ae ee aeea S234 SYMA 2 cited a PAGE A A A Ea 3 23 2 ROSPONSOS na a NG AG LOCAINAINGS genoma PANG arrasa 3 24 1 Syta se saanak GEL A NAA ns iNED a ai ai NG 3 24 2 Responses o oocooccoccoccn nanan PonDisconmecdty sierras cr 3 25 1 SyNtaX ves nka ERA ited Vas DNA NA 3 25 2 ReSponses 000 c eee eee Reset 2h 6 esac ees era LA e458 3 26 41 SYNTAX recrear tee 3 26 2 Responses 0c eee eee eee ROIGSWIICH aa paaa vor eee eee ewtbhense 3 271 Syntax 6 knea pia pA E P A SMOWDI N repr ordre 3 28 1 Syntax ee 3 28 2 Responses ee eee eee eee SmartCableSetup lt 4 32i0cntesdsicdeneedeecbias 329 1 Syntax a 20x8 BABA bA NEA se cacy whe cede aos 3 29 2 Responses cece eee eee eee SA a wear GAT KALAYAANG 3 30 51 SMA 2 iiss Ama DANE Es 3 30 2 Responses cee eee eee eee SPPConnect os detonar ue BAS ae Ree ee oe 331 SYMA i a A haaha 3 31 2 ROSPONSOS iii chord a DAAN a SPPDisconnect 00nd ABAKA ore DAEZ 3 32 11 Syntax 227 xa seeks sadaa aa NAG KK Ama NG 3 32 2 Responses eee eee eee StreamingSerlal 2 2024 2 saveeeeaes PGKA 3 33 1 Syntax sna AREA bee ed vas ee eee 3 33 2 QUEN acs eves eee peeee ida MAE ever a NG 3 33 3 Responses eee eee eee UpdatelnquiryScan 000 eee eee 3 34 1 Syntax coco
13. AT AB ChangeBaud 1600 AT AB ErrInvalidParam 1600 Unrecognized or unsupported symbolic parameter AT AB ErrinvalidParam goep send Numeric parameter is out of range specified baud rate is not supported by command AT AB EnableBond 00043e000000 12345678901234567 AT AB ErrlnvalidParam 19345678901234567 String parameter PIN has too many characters 4 5 Note 26 35 ErrNumParam The ErrNumParam error response will be sent if there are too few parameters for the requested command A command sent with too many parameters does not generate an error instead the extra parameters are ignored Some commands will accept a variable number of parameters Examples of commands that produce this error response are given in the following table Doc ID 023232 Rev 2 ky UM1547 Error responses 4 6 4 7 Table 7 Example commands that generate lt ErrNumParam gt Example Reason AT AB Sniff The minimum number of parameters was not specified ErrUnknownCmd The ErrUnknownCmd error response will be sent if the requested command is not recognized The unrecognized command will be echoed back to the host Any parameters given will be ignored AT AB ErrUnknownCmd unrecognized command An accepted command always starts with the command identifier AT AB ErrinProgress ErrlnProgress is sent in response to the Discovery command being issued when the previous one is still i
14. H1 DM3 DH3 packets are saa Use ame PACKAS ERES allowed on a link EDR is disabled Var20 EnableAFH True Enable Disable the Adaptive Frequency Hopping mode Var21 EnablePowartoniral True Enable Disable the Bluetooth Dynamic power control feature Var22 HostFlowControl 0 Reserved for future usage Sets the AT command reply prefix All events Var23 ATReply AT AB that are displayed are prefixed by this character string case sensitive Sets the Quality of Service Latency from 3 to 20 Napag Bos Lalengy 20 slots A slot size is 625 microseconds Sets the module s CPU speed 2 4 8 12 16 Var25 CpuMHz 32 20 24 28 32 36 and 64 MHz are allowed Note CPUMHz 40 to 63 are not supported Baud rate of the HCI interface to the Bluetooth Var26 HciBaudrate 921600 controller 230 400 460 800 921 600 and 2 000 000 baud are allowed Var27 SPIEnable False Enables the SPI interface to external pins Var28 SPIMode Slave Mode of the SPI 2 Var29 l2CEnable False Enables the IC interface to external pins Note not supported Var30 COD 240404 Bluetooth Class of Device Var32 HostEvents True All host events are sent when true Var33 BondingAllowed True oe allow bonding by default when Var34 PageScan True Enables page scan when true or halts page scan when false Var35 InquiryScan True Enables inquiry scan when true or halts inquiry scan when false Var36 MPMode 0 0 point to point 1 multipoint using packet protocol 2 broadc
15. StreamingSerial Responses If the feature is successfully applied or queried the response is AT AB StreamingSerial Enabled Disabled UpdatelnquiryScan The UpdatelnquiryScan command is used to modify the Inquiry scan parameters mode duration and interval Syntax AT AB UpdateInquiryScan mode duration interval where mode is the discoverable mode e 0 non discoverable e 1 limited discoverability not supported e 2 discoverable duration is the scan length in slots 18 to 4096 The default duration is 18 slots interval is the period between scans in slots 18 to 4096 The default interval is 2048 slots Responses If the command is successful the response is AT AB InquiryScanUpdateDone UpdatePageScan The UpdatePageScan command is used to modify the Page scan parameters mode duration and interval Doc ID 023232 Rev 2 23 35 AT command list UM1547 3 35 1 3 35 2 3 36 3 36 1 3 36 2 24 35 Syntax AT AB UpdatePageScan mode duration interval where mode is the connectable mode e 0 non connectable e 1 connectable duration is the scan length in slots 18 to 4096 The default duration is 18 slots interval is the period between scans in slots 18 to 4096 The default interval is 2048 slots Responses If the command is successful the response is AT AB PageScanUpdateDone Version The version command is used to return the current version of the ATn FW inte
16. T command list summary continued Command AT FW version V1 2 AT2 FW version V1 3 Zz n PortDisconnect S Reset RoleSwitch ShowDev N N N N SmartCableSetup Sniff SPPConnect SPPDisconnect Zz m StreamingSerial UpdatelnquiryScan UpdatePageScan DAI NI DN NN DN WN MN OW ojojo D D D nN nN Ww Version The following subsections describe each of these commands in detail including a description of behavior syntax including possible parameter values and types of responses Some responses will not be immediate Where applicable these will be noted and will include an approximate delay before response For commands with optional parameters all possible forms will be listed under the syntax subsection Error responses are described in Section 4 Bond The Bond command is used to initiate bonding with a specified device A personal identification number PIN is also required with this command Syntax AT AB Bond BD Addr PIN Where BD addr is the BD Address of the remote device with which to bond and PIN is the PIN code to use up to 16 characters Responses If the request is successfully submitted the response is AT AB BondPending Remote BD Addr If the operation is successful the response is AT AB BondOk Doc ID 023232 Rev 2 ky UM1547 AT command list 3 2 3 2 1 3 3 3 3 1 3 3 2 3 4 3 4 1 3 4 2
17. a connection with the remote device port handle it is supported by AT FW Syntax AT AB PortDisconnect Responses If the operation is successful the response is AT AB ConnectionDown Reset The Reset command is used to reset the ATn FW interface This is provided in the event that a host application wants to perform a software reset for error recovery There is a response prior to reset in order to verify that the command was received by the ATn FW interface A reset requires 1 6 seconds Syntax AT AB Reset Responses If the operation is successful the response is AT AB ResetPending Doc ID 023232 Rev 2 ky UM1547 AT command list 3 27 3 27 1 3 28 3 28 1 3 28 2 3 29 3 29 1 3 29 2 RoleSwitch The RoleSwitch command is used to change a link from to a Master or Slave role Syntax atrab RoleSwitch bd address role where e bd address is the address of the remote device that will receive the role switch e role is the new role of the local device O Master 1 Slave ShowDev The ShowDev command is used to list the contents of the Bond Table Syntax AT AB ShowDev Responses This command returns the list of all the devices bonded identified by their BD Address SmartCableSetup The SmartCableSetup command is used to enable and configure a Smart Cable device A device s BD Address is specified in order to automatically establish a connection replacing the need for AT c
18. alse RST CTS flow control is enabled Var06 PIN 1934 Code used for pairing Up to 16 characters are allowed case sensitive Var07 UartBaudrate 115200 Main UART baudrate 1200 to 921 600 baud Var08 UartParity None Main UART parity Var09 UartDataBits 8 Main UART data bits per character Var10 UartStopBits 1 Main UART number of stop bits Timeout used to determine the end of a Var11 UartTimeout 44 message in units of bit times from 8 to 128 are allowed Var12 AutoSniff False This enables the sniff feature when the link is inactive automatically Var13 AutoSniffTimeout 5 The inactivity timeout in seconds used for AutoSniff above Var14 AutoSniffInterval 1000 Sniff Slot interval applied AutoSniff Var15 HostDeepSleepEnable False Enables deep sleep mode GPIO register used to prevent the module from Var16 GPIO_HostKeepAwake None entering deep sleep mode A setting of none means that this function is disabled GPIO register used to wake up the module after Var17 GPIO_HostWakeup None it enters deep sleep mode A setting of none means that this function is disabled Doc ID 023232 Rev 2 29 35 FW configuration variables UM1547 Table 9 System configuration settings version 1 2 continued AT version 1 2 system configuration settings version 1 2 Variable Name Default Description If true only DM1 DH1 DM3 DH3 packets ar
19. ast Var37 UseExtLPO False True when a 32 768 kHz low power oscillator is present and false if not present 32 35 Doc ID 023232 Rev 2 ky UM1547 FW configuration variables Table 10 System configuration settings version 1 4 continued AT2 version 1 4 system configuration settings version 1 4 Variable Name Default Description Var38 HSE_MHz 13 MHz rating of the main crystal oscillator Read only Var39 EnableEncryption True Set to true to enable the Bluetooth link encryption Default security mode should be 1 for no Var40 DefaultSecurity 4 security or 4 for authentication required Modes 2 and 3 are used for legacy compatibility Establishes which level of SSP authentication is Var41 DefaultAuthentication 5 enabled Possible values are 4 SSP Just works or 5 SSP pairing modes with MITM protection Var42 EnablelAP True Enables IAP mode to support iOS devices Var43 AllowSniff False Enables sniff mode Var44 iAPAppID A1B2C3D4E5 This variable identifies the iOS application ID Var45 APProtocolStrMain com Demo This variable defines the main connecting string for the OS application Var46 APProtocolStrAlt com Protocol This variable defines the alternative connecting Alt string for the OS application Var47 CPI2CMode 3 Apple CP chip 12C address mode 2 or 3 Var48 SPP128UUID True This variable enables the 128 bit UUID for the Android devices Var51 RmtEscapeSequence False S
20. cument supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2012 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com ky Doc ID 023232 Rev 2 35 35
21. d and configured by a BT link using a local host and Bluetooth device To enable Remote Control the configuration variable RmtEscapeSequence must be set to true The Remote escape sequence is and it must be sent by the local host in a single complete packet over the BT link with no CR or LF in the sequence When received the remote device will respond locally with AT AB RemoteMode Doc ID 023232 Rev 2 ky UM1547 FW configuration variables Appendix A FW configuration variables The system configuration settings for each firmware version are given in the tables that follow In order to set a configuration variable enter at ab config xxxx yyyy where xxxx is the variable name and yyyy is the value to set A variable name could also be specified as varzz where zz is the sequence number of the variable A 1 AT FW version 1 2 Table 9 System configuration settings version 1 2 AT version 1 2 system configuration settings version 1 2 Variable Name Default Description Var01 BuildVersion XXXXXXX Date code software was built Var03 BD_ADDR 00043e260e73 Bluetooth device address Read only Var04 DeviceNama Amp ed Up Code used for secure connection Up to 20 characters are allowed case sensitive When true hardware RTS CTS flow control is Var05 StreamingSerial True disabled and data not able to be transmitted 9 over the link will be discarded When F
22. e varig USS Smal Packers pals allowed on a link EDR is disabled Var19 EnableAFH True Enable disable the adaptive frequency hopping mode Var20 EnablePowerControl False Enable disable the bluetooth dynamic power control feature Var21 HostFlowControl 0 Reserved for future usage Sets the AT command reply prefix All events Var22 ATReply AT AB that are displayed are prefixed by this character string case sensitive Sets the quality of service latency from 3 to 20 aeS QoS_Latency 20 Slots A slot size is 625 microseconds Sets the module s CPU speed 2 4 8 12 16 Var24 CpuMHz 32 20 24 28 32 36 and 64 MHZ are allowed Note CPUMHZ 40 to 63 are not supported Baud rate of the HCI interface to the Bluetooth Var25 HciBaudrate 921600 controller 230 400 460 800 921 600 and 2 000 000 baud are allowed Var26 SPIEnable False Enables the SPI interface to external pins Var27 SPIMode Slave Mode of the SPI 2 Var28 12CEnable False Enables the I C interface to external pins Note not supported Var29 COD 000000 Bluetooth Class of Device Var30 LinkSecurity False Var31 HostEvents True All host events are sent when true Var32 BondingAllowed True oe allows bonding by default when Var33 PageScan True Enables Page scan when true or halts Page scan when false Var34 InquiryScan True Enables Inquiry scan when true or halts Inquiry scan when false 0 point to point 1 multipoint using packet Jara MEMOJ o protocol 2 broadcast Var3
23. er a 1 to indicate high or O to indicate low GPIOWrite The GPIOWrite command is used to set a GPIO pin to high or low A GPIO may only be set when configured as an output Syntax AT AB GPIOWrite GPIO Pin Setting where GPIO Pin is the pin number of the desired GPIO to read The GPIO numbering depends on the specific HW used Setting is a 1 to set a pin to high and a O to set a pin to low Responses If the operation is successful the response is AT AB GPIOWriteDone HostEvent The HostEvent command is used to enable disable the host notification strings This will override the default setting in the dynamic configuration only for the current session until reset Syntax AT AB HostEvent Enable Disable Where Enable Disable is an e or E character to enable this parameter and a d or D character to disable it Responses If the feature is successfully enabled the response is AT AB HostEvent Enabled If the feature is successfully disabled there is no response because the events have been disabled Doc ID 023232 Rev 2 ky UM1547 AT command list 3 21 3 21 1 3 21 2 3 22 3 22 1 3 22 2 3 23 3 23 1 3 23 2 IAPConnect The IAPConnect command is used by AT2 FW to initiate a connection with the specified Apple iOS device The remote BD address must be specified Syntax AT AB IAPConnect BD Addr Where BD Addr is the iOS remote device s BD Address to
24. et to true to enable Remote Control Mode 2 Doc ID 023232 Rev 2 33 35 Revision history UM1547 Revision history 34 35 Table 11 Document revision history Added Section 3 2 3 8 1 3 8 2 3 27 3 27 1 Added in Table 10 Var51 Date Revision Changes 08 Jun 2012 1 Initial release Modified Introduction Added in Table 2 cptest and role switch 23 Jul 2012 2 Added in Table 9 Var40 and 41 Doc ID 023232 Rev 2 UM1547 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intel
25. flow control is enabled Var06 PIN 1934 Code used for pairing Up to 16 characters are allowed case sensitive Var07 UartBaudrate 115200 Main UART baud rate 1200 to 921 600 baud Var08 UartParity None Main UART parity Var09 UartDataBits 8 Main UART data bits per character Var10 UartStopBits 1 Main UART number of stop bits Timeout used to determine the end of a Var11 UartTimeout 16 message in units of bit times from 8 to 128 are allowed Var12 AutoSniff False This enables the sniff feature when the link is inactive automatically Var13 AutoSniffTimeout 5 The inactivity timeout in seconds used for AutoSniff above Var14 AutoSniffInterval 1000 Sniff Slot interval applied AutoSniff Var15 naan na True Enables shallow sleep mode Var16 HostDeepSleepEnable False Enables deep sleep mode 2 Doc ID 023232 Rev 2 31 35 FW configuration variables UM1547 Table 10 System configuration settings version 1 4 continued AT2 version 1 4 system configuration settings version 1 4 Variable Name Default Description GPIO register used to prevent the module from Var17 GPIO_HostKeepAwake None entering deep sleep mode A setting of none means that this function is disabled GPIO register used to wake up the module after Var18 GPIO HostWakeup None it enters deep sleep mode A setting of none means that this function is disabled If true only DM1 D
26. he following format AT AB Device BD addr name where BD addr is in hexadecimal with the most significant byte first name is a string in double quotes For each unsuccessful name request the corresponding name is replaced by Unknown The name request may not be successful if unable to make a connection for the request AT AB Device BD addr Unknown EnableBond The EnableBond command is used to enable bonding with another device The BD Address PIN and timeout parameters are optional When no BD Address is specified requests from all BD Addresses are allowed If a BD Address is specified bonding requests from devices with BD Addresses other than the one specified will fail and the existing link key will be deleted for that device Optionally a PIN code may be entered with this command If no PIN code is specified the default PIN code will be used Also a timeout value in seconds may be entered after the PIN code Bonding will be disabled automatically after the requested timeout If no timeout is specified bonding is enabled until reset or until the DisableBond command is used If this command is issued multiple times only the last PIN and BD address are saved Also if this command is issued before the first timeout occurs the subsequent command will extend the timeout The timeout is always set to the specified time beyond the last received EnableBond Doc ID 023232 Rev 2 15 35 AT command lis
27. l asynchronous receiver transmitter 2 Doc ID 023232 Rev 2 7 35 Overview UM1547 2 2 1 8 35 Overview This chapter gives a basic overview of the AT and AT2 libraries which include a set of commands described in detail in Section 3 Appendix A describes the two sets of configuration variables relevant to AT and AT2 FW versions The AT and AT2 FW are third party IPs developed by Amp edRF Figure 1 FW developer Amp 9ed RF AT command FW interface overview The AT command FW is a cable replacement application that provides communication between Bluetooth enabled devices A serial port is used to communicate with a host device through an AT command interface as shown below Figure 2 Communication between hosts Bluetooth ATCmds device Bluetooth device AM12315v1 The AT command FW provides the following basic features e AT2 FW supports point to point and multipoint connections while AT FW supports only point to point connections e Serial port profile SPP is supported for both client and server applications e iPOD accessory protocol IAP is supported only by AT2 FW enabling communication with Apple iOS Bluetooth enabled devices Command and bypass modes it is possible to switch between command and bypass data transmit receive modes during an active connection e Security bonding and data encryption provides a secure link between two devices e Po
28. lectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this do
29. n progress AT AB Discovery unrecognized command Examples of commands that produce this error response are given in the following table Table 8 Example commands that generate lt ErrlnProgress gt Trying to issue the Discovery command when the previous one has not AT AB Discovery completed Doc ID 023232 Rev 2 27 35 Other responses UM1547 5 5 1 5 2 5 3 28 35 Other responses The following subsections describe types of responses that occur under specific circumstances not necessarily as a result of a specific command They are eo Reset e Escape sequence Reset Upon either a hardware reset or software reset such as the Reset command ATn FW will respond as follows after the reset is complete AT AB CommandMode AT AB BDAddress BD addr Because the BD address of the local device is reported during this response the response is different than a response to the Escape Sequence Escape sequence If the escape sequence 4 4 4 is received and no connection is active ATn FW will immediately respond with AT AB CommandMode When the escape sequence is received while a connection is still active and there is no data for 2 seconds ATn FW will respond after those 2 seconds of no data with the same string ATn FW will now be in command mode Remote escape sequence The remote escape sequence supported by AT2 FW allows a remote device to enter in a mode where it can be controlle
30. nd is used to initiate a connection with the specified device The remote BD address must be specified The remote Service is optional If not specified the first registered SPP service will be used by default Syntax AT AB SPPConnect BD Addr Service Where BD Addr is the remote device s BD Address to page Service is the specific service on the remote device optional Responses If the connection is successful the response is AT AB ConnectionUp Remote BD Addr AT AB BypassMode f the connection cannot be completed the response is AT AB SPPConnectionClosed SPPDisconnect The SPPDisconnect command is used to terminate a connection with the remote device Syntax AT AB SPPDisconnect Responses If the connection is successful the response is AT AB SPPConnectionClosed Doc ID 023232 Rev 2 ky UM1547 AT command list 3 33 3 33 1 3 33 2 3 33 3 3 34 3 34 1 3 34 2 3 35 StreamingSerial Syntax AT AB StreamingSerial Enable Disable Where Enable Disable is an e or E character to enable this parameter and a d or D character to disable it Streaming Serial will disable the RTS CTS hardware flow control and discard non transmitted data when enabled RTS CTS flow control is enabled when Streaming Serial is disabled Query An alternative syntax may be used to query the current StreamingSerial feature status This syntax is not supported by other commands AT AB
31. onnection commands This command will override the dynamic configuration of a Smart Cable device until the DeleteSmartCable command is issued it is saved in non volatile memory Syntax AT AB SmartCableSetup BD address Attempts Interval Where BD address is the BD address of the remote device to page and attempt to connect Attempts O 999 is the number of pages that will be attempted to the specified device until a connection is successful A value of 0 will not automatically page the remote device A value of 1000 will perform unlimited pages until the connection is switched from command mode to bypass mode to exchange data Interval 1 1000 is the number of 100 ms intervals 0 1 sec to 100 sec between page attempts This interval is in addition to the amount of time required by the page attempt itself Responses If the operation is successful the response is AT AB SmartCableConfigDone Doc ID 023232 Rev 2 21 35 AT command list UM1547 3 30 3 30 1 3 30 2 3 31 3 31 1 3 31 2 3 32 3 32 1 3 32 2 22 35 Sniff The Sniff command is used by AT2 FW to switch a device from active mode to sniff mode Syntax AT AB Sniff BD address Sniff Interval Where BD address is the BD address of the device to be switched to active mode Sniff Interval is given in slots from 66 10 000 Responses If the operation is successful the response is AT AB SniffMode SPPConnect The SPPConnect comma
32. processor chipset is correctly connected the output of the command gives infos versions and ID about the coprocessor Example CP Device Version 0x03 CP Firmware Version 0x01 CP Authentication protocol Major version 0x02 CP Authentication protocol Minor version 0x00 CP Device ID 0x00000200 When the coprocessor is not connected or badly connected the output of the command is CP Data Fail or CP Address Fail DefaultLocalName The DefaultLocalName command is used to set the name of the device to the name that is reported during device discoveries By default the ATn FW interface uses Amp ed UP Changing the name using this command will permanently change the local name unlike the LocalName command specified hereafter Doc ID 023232 Rev 2 13 35 AT command list UM1547 3 9 1 3 9 2 3 10 3 10 1 3 10 2 3 11 3 11 1 3 11 2 14 35 Syntax AT AB DefaultLocalName name Where name is a string for the new local name case sensitive up to 20 characters The space character is allowed the name is assumed to be all text up to the end of the command Responses If the operation is successful the response is AT AB LocalName0k DeleteSmartCable The DeleteSmartCable command removes the current Smart Cable settings that were entered using the SmartCableSetup command but not the setting from the dynamic configuration The Smart Cable will then be deactivated for the remainder of this session
33. rface Syntax AT AB Version Responses If the operation is successful the response is AT AB ATn FWVer x y where x y is the current version of the ATn FW interface Doc ID 023232 Rev 2 ky UM1547 Error responses 4 4 1 4 2 Error responses This chapter details the error responses that occur under specific circumstances There are seven error responses that can occur beyond error responses specific to a particular command e g Discovery They are ErrConnect ErrExecute ErrFormat ErrlnvalidParam ErrNumParam ErrUnknownCmd ErrlnProgress The following subsections detail the different error responses These error responses replace the original error response AT AB ErrorCommand ErrConnect The ErrConnect error response will be sent if ATn FW has a valid connection established and the command cannot be executed while connected even in the command mode Examples of commands that produce this error response are given in the following table Table 3 Example commands that generate lt ErrConnect gt Example Reason Performing a device discovery while a connection already AT AB Discovery existe Establishing a connection to a device while a connection AT AB SPPConnect 00043e000000 i exists with another ErrExecute The ErrExecute error response will be sent if the command cannot complete for any reason Examples of commands that produce this error response are
34. t UM1547 3 13 1 3 13 2 3 14 3 14 1 3 14 2 3 15 16 35 Syntax AT AB EnableBond AT AB EnableBond BD addr AT AB EnableBond BD addr PIN AT AB EnableBond BD addr PIN timeout Where BD addr is the BD Address of the remote device with which to bond PIN is the PIN code to use up to 16 characters and timeout is the duration of the timeout in seconds 1 to 1000 Responses If the operation is successful the response is AT AB BondEnabled f bonding has been initiated by a remote device the notification is AT AB BondPending BD addr where BD addr is the BD address of the remote device that initiated the bonding If bonding has occurred the notification is AT AB BondOk BD addr where BD addr is the BD address of the remote device with successful bonding If bonding was initiated by a remote device but failed the notification is AT AB BondFail When the time limit for bonding has expired the notification is AT AB BondDisabled EraseBondTable The EraseBondTable command is used to erase all of the bonded device entries Single devices cannot be erased with this command Syntax AT AB EraseBondTable Responses If the operation is successful the response is AT AB BondTableErased ExitSniff The ExitSniff command is used by AT2 FW to switch a device from sniff mode to active mode Doc ID 023232 Rev 2 1577 UM1547 AT command list 3 15 1 3 1
35. tailed in Section 4 of this document Doc ID 023232 Rev 2 1 35 www st com Contents UM1547 Contents 1 Definition and acronyms o 7 2 OVEIVIEW ios KIRA GA DA NAAPI PRN RA BEKE KAKANAN PRE NAA KAKA GA 8 2 1 AT command FW interface overview cee eee ees 8 3 AT command list ui cos sr a ARA KAP DW se 9 3 1 AA 10 3 1 1 SA 10 3 1 2 Responses sace pee Rw We KAG RAON Kap e EE A NG 10 3 2 BICVErSION aio Seo aaa 11 3 2 1 Syntax O 11 3 3 Bula aaa BA KABA a ee ee ae ee ee ee aos 11 3 3 1 SVM K is Kan ia Eee DN Na Lew eae ie eld UNA 11 3 3 2 ROSPONSCSi sii A a ee eS 11 3 4 Bypass emos one ea eae KA KAKAGAT AG PRE BNG KANA KAG 11 3 4 1 SA a cis dls Re dla 11 3 4 2 RESPONSES pedra a A AAA 11 9 5 Change aud axones 11 3 5 1 SYMAX visir rra E AAA 12 3 5 2 FRROSPONSOS a a a A AA MAA A 12 3 6 ChangeDefaultBaud xx naaa idea ira dee 12 3 6 1 A kah GAD APIR LIU BERDE paces 12 3 6 2 ROSpONnSseS a a ad eat BA ar bisa 13 3 7 Oa MA ma ee ee LAN a eee AA 13 3 7 1 IO seie a E ma a ened eam Sold ie aa es eee a A 13 3 8 Ens cda 13 3 8 1 SYNTAX ci a ada IR one 13 3 8 2 RESPONSES ii aa AAA AA 13 3 9 DefaultLocalName 2 eens 13 3 9 1 SYNTAX o epore dda nade KIRAN KANG Uh eee eh ra ear 14 3 9 2 ReSpOnses aaa eae ed bed eae beatae a eked 14 3 10 DeleteSmartCable ccc eens 14 AOL SYNTAX wk awe be a eee eae ees 14 2 35 Doc ID 023232 Rev 2 ky UM1547 Contents 3 12 3 13 3 14 3 15 3 16 3
36. wer conservation use of the Sniff feature to minimize power consumption is supported only with AT2 FW e Variable baud rates the serial port can be configured for the following baud rates 1200 2400 4800 9600 19 2k 38 4k 57 6k 115 2k default 230 4k 460 8k 921 6k Doc ID 023232 Rev 2 ky UM1547 AT command list 3 AT command list This chapter details each of the AT commands including brief descriptions of behavior syntax of the command context of the command and types of responses This AT command FW reference guide covers the commands listed in Table 2 The table compares the AT FW release to the new AT2 FW pointing out additional features Table key e S command is supported in this release e NS command is not supported in this release e New command is introduced with this release Table 2 AT command list summary Command AT FW version V1 2 AT2 FW version V1 3 Bond s s BtcVersion New s Build S S Bypass S S ChangeBaud S S ChangeDefaultBaud S S Config S S Cptest NS New DefaultLocalName S S DeleteSmartCable S S DisableBond S S Discovery S S EnableBond S S EraseBondTable S S ExitSniff NS S GetBdAddress New S GPIOConfig S GPIORead s GPIOWrite s HostEvent S S IlAPConnect NS New IAPDisconnect NS New LinkDisconnect New S LocalName S S Doc ID 023232 Rev 2 9 35 AT command list UM1547 3 1 10 35 Table 2 A
Download Pdf Manuals
Related Search
Related Contents
diário da câmara dos deputados república federativa do brasil 取 扱 説 明 書 se形埋込み照明器具 保 管 用 一 2. - AVerMedia AVerTV Global secador de pelo estimado cliente especificaciones Annexe 5 Nortel Networks Network Card 4400 User's Manual VSA-51 Manual - Hall Research Copyright © All rights reserved.
Failed to retrieve file