LM Technologies LM961 LM961 Bluetooth v4.1 Dual Mode Module User Manual
LM Technologies Ltd. LM961 Bluetooth v4.1 Dual Mode Module
Contents
- 1. 15_LM961-0650 UserMan part1
- 2. 15_LM961-0650 UserMan part2
15_LM961-0650 UserMan part1
LM LM961-0650 SPP with GAP Central Application USER GUIDE All nghls reserved. All llbde names are legislated llwemnlks 0' Mpecuve mamfloclulels listed This manual may no! be com ln any meme or lovm Without the wunen consent ol ongmal malts! TECHNOLOGIES LM961SPP With GAP Central Application v1.1 v10 17/11/2017 First iev‘iSion of this document. v1.1 8/12/2017 Minor document VeVlSIOHSr FCC Warning This device complies with Part 15 ofthe FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause imdesired operation. NOTE 1: This equipment has been tested and fomd to comply With the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment gmerates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more ofthe following measures: - Reorient or relocate the receiving antenna. - Increase the separation between the equipment and receiver. -Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. -Consult the dealer or an experienced radio/1' V technician for help. NOTE 2: Any changes or modifications to this unit not expressly approved by the party responsible for compliance could void the user's authority to operate the equipment. Please notice that ifthe FCC identification number is not visible when the module is installed inside another device, then the outside ofthe device into which the module is installed must also display a label referring to the enclosed module. This exterior label can use wording such as the following: “Contains FCC ID VVXLM961” any similar wording that expresses the same meaning may be used. This equipment complies with FCC radiation exposure limits set fonh for an uncontrolled environment. This transmitter must not be co-locateoi or operating in conjunction with any other antenna or transmitter. The module is limited to OEM installation ONLY. The OEM integrator is responsible for ensuring that the end-userhas no manual instruction to remove or install module. A separate approval is required for all other operating configurations, including portable configurations With respect to Part 2.1093 and difference antenna configurations. There is requirement that the grantee provide guidance to the host manufacturer for compliance with Part 1513 requirements. Copyright LM Technologies Ltd Page 2 of 62 www It” ictiiiuloqng ii LM961 SPP with GAP Central Application v1.1 Contents 1. Introduction ................... ........................ ....................... .............. 5 2. Functionality of SPP with GAP Central application ................... 3. LM961 GAP Central Role.......... ..... 3.1 GAP Central AT commands in briel 3.2 Enable GAP Central functionality: 3.3 BLE discovery commands: ..................... 3.4 BLE security commands: 3.5 BLE connection command 3.6 BLE Services/characteristic scan commands: ............... 3.7 BLE read data irom Characteristic:.................. 3.8 BLE write data on Characteristic:......... 4. LM961 AT commands and Default configure n... 4.1 AT commands............... 4.2 Module Settings commands: 4.3 UART Settings commands 4.4 Bluetooth Security Settings commands 4.5 SPP Related commands: 4.6 Firmware Upgrade commands:............... 5. LM961 Over The Air Firmware Upgrade Procedure 5.1 Prerequisites for Firmware upgrade:............ 5.2 Firmware upgrade procedure Flow chan:................ 5.3 Possible Failure points and corrective actions. .......... 6. Simple Secure Pairing between LM961 and remote device 6.1 Pairing of LM961(BT2.1) with 372.0 devices.......,......,...... 62 Pairing of LM961 (BT21) with BT21 devices 7. Appendix.-. 7.1 Abbreviations 7.2 BLE Peripheral characteristics ..................... 7.3 GATT UUID type.. 7.4 GATT_Status_code. 7.5 BLE Service UUIDs.. © Copyright LM Technologies Ltd Page 3 of 62 www.lm«techno|eg|es.com TECHNOLOGIES. LM961 SPP with GAP Central Application v1.1 Table of Figures Figure 1: Firmware Upgrade Fiowchan ........... Figure 2'. UART messages when the module is not connected to the peer de Figure 3: UART messages when the module opens a partition to write a new image..51 Flgure 4: UART messages when the CRC oi the received image does not match Figure 5: UART messages showing a failure in image verification . Figure 6: UART messages showing successful firmware upgrade. © Copyright LM Technologies Ltd Page 4 of 62 wwwtlnrtechnologiescom TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 1. Introduction This document describes the lunctionality ol the “SPP with GAP Central" application. 1. SPP with GAP Central application specific AT commands and information 2. All AT commands and default configurations on device 3. Over the Air Firmware Upgrade procedure 4. Secure simple pairing procedure The LM961 is a dual mode module with the capability for simultaneous connections to Bluetooth (v1.0 - v3.0), and Bluetooth low energy devices. LM Technologies supports various firmware applications on the LM961 module enabling users to develop their own applications with AT commands. 2. Functionality of SPP with GAP Central application In the SPP with GAP Central application the LM961 can either be a SPP Master or Slave: or dual mode with one SPP connection at a time. The SPP role supports BOND. ACON, and features similar to those at LM Technologies' legacy products such as the LM048. LM072 and LM400. For Bluetooth low energy, it will be in the GAP Central role and can establish connections to up to five low energy peripherals simultaneously. Users can have a maximum of six active connections with this application (five low energy and one SPP). Data can be transferred between devices using AT commands. For the Bluetooth low energy GAP Central role. the user can perform functions normally performed by Android tablets or phones. A user can discover nearby Bluetooth low energy peripherals. and up to ten devices will be reported. They can then connect to any of those devices and read or write data on various services or characteristics with file help of AT commands. The Bluetooth low energy connection also supports whitelisting It you add the paired devices to the whitelist it will only report advertising packets from the devices added to the whitelist, or only connect to devices on the whitelist. © Copyright LM Technologies Ltd Page 5 of 62 www.lm-technologies.com TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 3. LM96‘I GAP Cemral Role This section describes the AT commands for the GAP Central role to initiate a connection. pair. whitelist. or read/write data to a BLE peripheral device. AT commands for the SPP role and generic device configuration are described in section 4 “LM961 AT commands and Default configuration". Every command is terminated with “CR-LF". The module will begin parsing the AT command string after receiving the “CR-lF" sequence. For every AT command issued by a user via UART the module responds with OKIERR. If the user issues an incorrect AT command string (e.g. instead of 'AT'Settings=?' the user issues "AT'Setting=?"l. or issues a correct AT command string but in an invalid state (e.g. the user issues a connection command "AT'CONN=001122334455' while the SPP-role is Slave). the module will respond with ERR. AT commands are used to enable or disable the GAP Central role of the module. By default. this mode is disabled and the module only Initiates the SPP functionality. To enable GAP Central functions. use the AT command AT'ENBGAP=ON. The module will perform a soft reset and initialize itself with both SPP and GAP Central functions initialized. When the module has the GAP Central role disabled. for every AT command of GAP Central functionality or settings, module will respond with “ERR". When the module is in the GAP Central role it supports BLE device discovery, connection initiation. and reading/writing data. Users can use different AT commands to read/write data on BLE peripherals or receive updates from BLE peripherals via UART. The SPP with GAP Central mplication enables the SPP and BLE connections. If the module is in the slave role it is ready to accept an SPP connection at any moment. If the user application only requires GAP Central roles, then set the SPP role as Master and ACON as OFF. This means that module will only connect to a remote SPP device when the connection is initiated by the LM961 module with an AT command. If the user application requires a SPP connection with ACON 0N and BLE connections it's possible that the LM961 might connect with a remote SPP master device while reading/writing data on the BLE Peripheral. or while performing some other task. This will be indicated to user with “IND':CONNECTED=001t22334455". If so the user should use the escape sequence i.e. M to come out of SPP-Online-Connected mode and then issue the required AT commands. © Copyright LM Technologies Ltd Page 6 of 62 www.lrn-technologies.com TECHNOLOGIES‘ LM961 SPP with GAP Central Application v1.1 3.1 GAP Central AT commands in brief The table below shows the AT commands for the GAP Central role with examples (or reference. 1 “AT'ENBGAP” Query and OFF AT'ENBGAP=? Set AT'ENBGAP=ON AT’ENBGAP=OFF 2 'AT'LESEC" Query and OFF AT'LESEC=ON set I AT'LESECOFF lATLESEC=7 3 “AT'GETCID” Query only - 4 "AT'LEFIND" Execution - AT'LEFlND=ON only AT'LEFIND=OFF 5 'AT'LECONN” Execution - AT'LECONN=0011223 only 34455 6 'AT'LEDROP" Execution - AT’LEDROP=00112233 only 4455 7 ‘AT‘ENBCCFG Execution - AT‘ENBCCFG=CID,CH " only AR-Handle e.g. At'enbccfg=5.0019 8 Query only - AT'BLECONN=? 'AT'BLECONN 9 'AT'INDRESP” Execution - AT'INDRESP=CID only 2.9. At'indresp=5 1O Execution - AT'FINDSERV=CID “AT'FINDSERV only eg. " At‘findserv=5 11 Execution - AT’FINDCHAR=CID,St 'AT'FlNDCHA only art-Handle.End-Handle R” e.g. At'findchar=5,0001.mf 12 "AT'CLRWHITE Execution - ‘AT'CLRWHITE'WAn " only © Copyright LM Technologies Ltd Page 7 of 62 www.1mtechnologies.com TECHNOLOGIES‘ LM961 SPP with GAP Central Application v1.1 13 'AT‘WRWORE Execution - AT'WRWORESP=CID,C SP" only har-Handle.no-ol- bytes.actualbytes e.g. at’wnuoresp=5,0012,14 ,012345678901234567 89 14 'AT'RDCHARV Execution - AT'RDCHARVAL=CID. AL" only char-handle e.g. At'rdcharval=5.0020 15 "AT'WRCHARV Execution - AT'WRCHARVAL=CID. AL" only char-handle.no—ol- bytes.actualbytes e.g. at‘wrcharval=5,0012,14 ,012345678901234567 89 16 “AT'LEAUTOS Oueryand - AT'LEAUTOSCAN=ON CAN” Set AT'LEAUTOSCAN=0F AT'LEAUTOSCAN=? 17 "AT'RDMULTC Execution - AT‘RDMULTCHAR=CI HAR" only D,no-ol-read,char- handle1,char-handle~ 2.chav-handle3,chai- handle4, char-handles e.g. At'rdmultchaF5.05.00 03.0005.0008.0008.0 00a 18 'AT'RDLONGC Execution - AT'RDLONGCHAR=CI HAR" only D.Char—Handle e.g. at'rdlongchamspozg 19 "AT'SlWRWOR Execution - AT’SIWRWORESP=CID ESP" only .Char-Handle.no—ol- bytes,actua|-bytes e.g. at'siwrworesp=5.0028, 14.012345678900345 6789 © Copyright LM Technologies Ltd Page 8 of 62 www.|m«techno|ognes.com TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 3.2 Enable GAP Central functionality: 3.2.1 vi. vii. viii. ix. "AT‘ ENBGWMH Query and Set command. ‘ . To query settings use the command "AT'ENBGAP=?" \r\n . Response to the query command will be ‘0K'/"ERR" and report will be “REP':GAP_ENABLE=ON" or “REP‘:GAP_ENABLE=OFF” By default, this setting is OFF Le. the GAP Central role is dlsabled. The module is only initialized for the SPP functionality. To enable the GAP Central role, use the command "AT'ENBGAP=ON'. The module will respond with OK and display the message ”Module soft-Reset." to indicate that the module is performing a soft reset to enable the GAP Central role. After reset. the module shows the power on sequence “SP!”GapCentral_Message_Loop" If the module currently has ENBGAP set to OFF, and command is ssued to turn it OFF. the module shows an ERR response. Similarly. if the current setting is ON and the command is issued to turn it ON. the module will output an ERR response. Response of the “AT'SETTINGS=. " query command depends on the ENBGAP setting. Response of the AT'SETTINGS=? Command displays the settings of LESEC, LE-Auto-Scan only if the ENBGAP is ON. SPP+GapCentraI_Message_Loop at'enbgap=?at'enbgap=? OK REP‘:GAP_ENABLE=OFF at'settings=?at'settings=? OK NAME=LM961_GAP_Centra| ADDR=0002-5b00a5a5 FLOW=OFF SPPRo|e=S_AVE ACON=OFF BOND=OOOO~OO-000000 DPI N=OFF PIN=1234 GAP_ENABLE=OFF VER=961LM_GAPCEN_01.01 REP':SETT|NG$=F_ND at'enbgap:of1at'enbgap=off ERR at'enbgap=onat'enbgap=on OK Module sobeeset..SPP+GapCentral_Message_Loop © Copyright LM Technologies Ltd Page 9 of 62 www.lm-technologies.com TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 GATT Initialised REP':LESEC=5uccess at‘settings:?at'settings=? OK NAME=LM961_GAP_Centra| ADDR=OOO2—5b-OOaSaS FLOW=OFF SPPRoIe=SLAVE ACON=0FF BOND=OOOO-OO-OOOOOO DPI N=0FF Pl N=1234 GAP_ENABLE=ON LE_SEC=OFF LE_AUTO_SCAN=ON VER=961LM_GAPCEN_01.01 REP':SETT|NGS=F_ND at'enbgap=?at'enbgap=? OK REP‘:GAP_ENABLE=ON at'enbgapzonat'enbgawon ERR at'enbgap=oitat'enbgap=off OK Module soft-Reset..SPWGapCentral_Message_Loop 3.3 BLE discovery commands: 3.3.1 "AT'LEFIND"\r\n i. Execution only command. ii. To begin discovery of nearby BLE peripheral devices. use the command “AT'LEFIND=ON”\r\n iii. The module responds with OK to this command if it is not already scanning the devices, otherwise it responds as "ERR". iv. The module reports the name and BT address of the device as soon as it fnds the advertisement packet and keeps on updating the report as devices are discovered. v. The module stops the BLE scanning process when it finds 10 BLE devices and displays END oi report message. vi. There is no time limit set in the firmware to end the BLE scanning process. If the user wants to terminate the scanning process. they should issue the "AT'LEFIND:OFF" command © Copyright LM Technologies Ltd Page 10 of 62 wwwtlm-technologiescom TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 vii. If the module is displaying the scan report and user issues a connection request to any of the devices. then the scan is terminated and connection procedure is started. viii. The module indicates the beginning and end of discovery response as “REP“.BLE_SCAN_REP=START" and “REP‘:BLE_SCAN _REP:END“ respectively. ix. Below is an example report for BLE scanning: ‘at'letind=onat'lefind=on OK REP':BLE_SCAN_REP=START = 1 :1028—00—5b0002 :0 2 :1032-00-5b0002 :0 3 :3333-33-333333 :0 O: 333333333333, LM Serial Server 4 :8863—dl-be936c :0 :LML8 5 :0000—00—000000 :3 6 :1029—00-5b0012 :0 :CSR 8P Sensor 7 :1030—00—5b0012 :CSR HR Sensor = 8 :1031—00:5b0012 :0 :CSR HR Sensor at'lelindzoflNlefindwfi at‘lefind=oflat'lefind=ofl OK” x. If the user terminates the scanning process by issuing the ‘AT'LEFIND=0FF" command, the module responds to it with an OK/ERR message but it does not issue an end oi report message. xi. When the module finds a BLE advertising report, it does not show the device in the report immediately, it waits for the advertising packet in which BLE-Device-name is included. a. It the module finds address and name same packet. it displays both. b. It the module finds address only it shows address and waits for name. c. When the module finds name of the device for which it has reported address previously, it will show name in report with the serial number as 0 to indicate this is not new device but only name is appended for the device already reported. xii. If the LM961 has setting "AT'LESEC=OFF', LM961 reports BLE devices even if not present in its Whitelist. If setting is "AT'LESEC=ON", LM961 will only report advertising devices which are in its whitelig. xiii. In the discovery report, after the BD-address there is an indication lor “advertising Indication type“ ranging from 0 to 5 as mentioned below. a. ble_adv_event_connectable_undirected = O = Connectable Undirected Advert. b. ble_adv_event_connectable_directed =1 = Connectable Directed Advert. c. bie_adv_event_discoverable = 2 = Discoverable advert. © Copyright LM Technologies Ltd Page 11 of 62 www.lrn-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 XIV. XV. xvi. d. ble_adv_event_non_connectable = 3 = Non connectable. e. ble _adv e_v_ent_scan response= 4: Scan Response. f. ble _adv_ event_ unknown= 5: Unknown event type. The LM961 SPP with GAP central application also supports SPP connection The module may establish a SP? connection while performing LE dlscovery. When the module connects with the SPP device, it enters in SPF-Data mode and shows data from the remote device on UART. lt treats data sent on local UART as data to be sent to remote device. To access UART for commands and responses, the user needs to use the escape sequence and then continue with other AT commands. Refer to the screenshots below. at'lelrnd:onat‘lefind=on OK REP'BLE_SCAN_REP=START = 1 :1032-00-5b0002 :0 2 :1028-00-5b0002 :0 3 :3333-33—333333 :0 O: 333333333333, LM Serial Sewer 4 :8863-dl-b2936c :O :LML8 |ND':CONNECTED=0012-6f»0819c2 +++OK = 7 :2053-ca-20126e :0 = 8 :2053-ca-20126f :0 at'letInd=otlat'lefInd=oft OK Data during the SPP connection and receive at escape command is lost in this report (data is lost as UART is given to SPP connection). 3.4 BLE security commands: 3.4.1 iv. v. vi. 'AT‘LESECMH Query and Set command. LESEC stands for Low Energy Security Le. whether to apply whitelist security or not. Query command to query the setting is “AT'LESEC=?'\nn. Query report is “REP':LE_SEC=OFF”\I’\n or “REP':LE_SEC=ON"\I’\n. When LESEC is ON. the module will scan advertising packets only lrom whitelist added devices and connect to the devices already added to whitelist (Le. already BLE paired devices) When LESEC is OFF, the module will scan and connect to any BLE discoverable and connectable device (module will discover and connect any device even it it is not paired with module before) Note: If the LM961 wants to add a new device ln its whitelist then while establishing the connection with the device at first time user should use setting ‘AT'LESEC=OFF". This enables the © Copyright LM Technologies Ltd Page 12 of 62 www.lm-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 3.4.2 iii. iv. authentication procedure to start to add a new device to the white list. Once the module completes the pairing procedure successfully the BLE device is added to the white list. Then the LM961 can use the setting ‘AT'LESEC=ON" for further connections with the same device. "AT‘CLRWH ITE”\r\n Execution only command. This command is used to delete all the devices from BLE paired devices list l.e. White list. Command format ls “AT‘CLRWHITE‘Wnn Module responds 0K and deletes all the devices from the whitelist. 3.5 BLE connection commands: 3.5.1. iii. iv. vi. 3.5.2 ‘AT‘LEAUTOSCAN’Mn Query and set command. Enable or disable the feature to scan the connected BLE peer device automatically for its services. Low energy auto scan query “AT'LEAUTOSCAN=?'\r\n. Low energy auto scan query report: “REP':LE-AUTOSCAN_SERVER=ON" (Module default setting as LE-Auto-Scan enabled) Low energy auto scan enable command: 'REP‘:LE_AUTOSCAN_SERVER=ON’\r\n. If LE Auto Scan is enabled. after connection module starts scanning Peer device for its services and characteristics automatically. Low energy auto scan disable command: 'REP':LE_AUTOSCAN_SERVER=OFF”\r\n. lf disabled. module does not scan the Peer device for its services and characteristics automatically. Module will wait for AT'FindServ command from user. “AT‘BLECONN'Wnn Query only command. User can query how many BLE connections module is having and details for those connections. Command format is :“AT'BLECONN=?’\r\n . GAP Central application can have maximum 5 BLE connections simultaneously. Example report for this command shall be as shown below at'BLECONN=?al‘BLECONN=? © Copyright LM Technologies Ltd Page 13 of 62 www.lm-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 OK REP':BLE_CONN '1 :3333-33-333333 : 0101 2 :1030-00-5b0012 : 0182 3 : 1032-00-5b0002 10203 4 : Open 5 : Open REP':BLE_CONN END vi. The report above shows that the module is now connected with three devices. The report lists connection [D given by module, remote device BD-Address and Connection-ID i.e. CID given by BLE stack. vii. Start and end of report is mentioned. viii. E.g. In above report, row“= 3 : 1032-00-5b0002 ; 0203" mentions module has 3rd connection with 1032-00-5b0002 device and CID g'wen by BLE stack Is 0203. ix. CID given in above response is referred while readlng/writing data with AT commands. reporting disconnection, notification etc. User should note this carefully. xt Response to this module depends on current state of the moduie for BLE connections, xi. In a scenario where module has established 3 connections as shown above and if it drops connection 2 then the response to command AT'BLECONN=? Will be at‘BLECONN=?at'BLECONN=? OK REP':BLE_CONN = 1 : 3333-33-333333 : 0101 2 : Open = 3 :1032-00-5b0002 10203 4 : Open = 5 : Open REP':BLE_CONN END 3.5.3 'AT‘LECONNMH i. Execution only command ii. GAP Central application gives more details on connection parameters when connection is successful and error code value if connection fails. iii. User need to mention the BD address of the remote device with which the BLE connection is to be established. e.g. “at'Ieconn=1031-OO-5b0012'\r\n tries to establish connection with “1031-00-5b0012” device. iv. Response to this command will be ERR if any of the following is true a. string format is incorrect b. BT address is invalid c. 5 BLE connections are already established v. Response to this command will be OK if all the following conditions are true a. Command string format is correct I). BT address is valid (0 Copyright LM Technologies Ltd Page 14 of 62 www.lrn-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 c. Module has at least one BLE connection open vi. After displaying 0K response, module starts me BLE connection procedure. vii. If the connection is failed the report is given with the error code e. g. “REP':BLE_CONN,FAIL:=1031-00-5D0012.4 err_code:0014"\r\n. viii. Refer the Error code list mentioned in the appendix section. ix. If the module is successfully connected to a remote device it will show a reportwith details about the connection. E.g. 'REP':BLE,CONNECTED:=1030—00~5b0012—0 : 1 : 0080: 0017 : 0008"\r\n x. Here report includes extra information for the connection details as below. a. 1030-00-5b0012 is SO address of the remote BLE device. b. -0 with the address mentions Address type of remote BLE device. c. TYPED_BDADDR_PUBLIC is noted as 0, TYPED_BDADDR_RANDOM is noted as 1. d. 1 indicates Connection lD given by LM961 module (refer to BLEconn=? report). e. 0080 mentions CID given by BLE stack (hex value 0x0080). f. 0017 is MTU i. e. Maximum Transfer Unit for this BLE connection (hex value 0x0017). g. 0008 is Connection configuration flag (hex value 0x0008) xi. User should take note of MTU mentioned in connection report. while reading and writing data on this device, using one command (rdcahval/wrworesp etc) up to MTU number of bytes can be sent/received. If user need to read/write more than MTU number of bytes. it needs two commands. at'leconn:1030005b0012a'Ieconn=1030005b0012 OK REP':BLE_CONNECTED:=1030—00-5b0012-0 : 1 : 0080 : 0017 2 0008 BLE Auth start OK REP‘:SERVICE START: =1030—00-5b0012 =1 : 1801 : 0001 :0004 2 : 1800 : 0005 : 000D = 3 : 180d : 000C : 0013 = 4:1801:0014: 0017 REP':BLE_PAIR=1030—00«Sb0012.5uccess = 5 : 00001016d10211e19b2300025b0035a5 : 0018 : 0021 =6 :1SOa :0022211ff REP':SERVICE END: =1030—00-5b0012 xii. BLE Pairing: a. After module is connected with Peer device. If LESEC i.e. LE Security is OFF. module starts BLE Authentication process and Shows message "BLE Auth start" to indicate start of authentication process. b. If LESEC is ON, module will report or connect to only with previously Paired devices which are present in its whitelist. © Copyright LM Technologies Ltd Page 15 of 62 www.1m-technologies.com TECHNOLOGIES. LM961 SPP with GAP Central Application v1.1 c. Pairing Success or Failure indication report is given to user as “REP‘:BLE_PAlR2103O-005b00125uccess‘ or “REP‘:BLE_PAlR:1030-005b0012.Fai|" , d. Aiter module completes the pa‘ring procedure successfully, module adds this device to its whitelist. e. Pairing procedure runs at the background and can show the status of pairing at any time. e.g. above report shows the pairing report has displayed while showing Service-scan report. xiii. If LEAutoScan sewer setting is ON then. module starts scanning services supported on the remote device and displays the report. If LEAutoScan server setting is OFF, module waits for commands from user to scan the services (FINDSERV). 3.5.4 'AT'LEDROP”\r\n i. Execution only command ii. Command is used to disconnect the BLE connection. Command requires peer devices BT address. iii. BLE connection disconnection command format: ‘AT'LEDROP=1030005b0012"\r\n iv. Response tor BLE drop connection will be OK it the module is connected to the BLE device with the same address provided in Drop command. v. Response tor BLE drop connection will be ERR it the module is not connected with any BLE device or 30 address mentioned in the AT command is not same as the connected BLE device. vi. Module shows a report for the disconnection command e.g. at'ledrop21030005b001Zat‘ledrop=1030005b0012 OK REP':BLE_DlS_CONN:=1030-OO-5b0012.2 err_code:0000 vii. Error code 0000 mentions the device has terminated connection gracefully i.e. either device started disconnecion procedure. viii. Number 2 near the BD address mentions the BLE Connection ID (refereed to BLEconn=? response). ix. ll disconnection is started by remote device or due to link loss the indication for disconnection is shown as below with the reason code. “REP':BLE_DiS_CONN:: 103000-5b00122 err_code:0019" x. Refer to Die error code in the appendix. © Copyright LM Technologies Ltd Page 16 of 62 www.lm-technologies.com TECHNOLOGIES. LM961 SPP with GAP Central Application v1.1 3.6 BLE Services/characteristic scan commands: 3.6.1 iv. vi. vii. viii. 3.6.2 iv. ‘AT‘FINDSERV"\l\n Execution only command Command is used to scan services supported on connected BLE device. User needs to state connection ID for the device whose services are to be scanned. E. g. “at'iindserv=1" finds services on 1st connected device. Module provides a detailed report for the services supported by the remote device. If the BLE device has any service with 128-bit UUID then it is indicated with all bytes. IN below report the row mentions “ 1 : 1800 : 0001 : 0005 " where "1" is serial number, "1800" is 16bit UUID for service, “0001” is start handle of the service and “0005” is end handle of the service. Report is marked for start and end. For e.g refer below report. at'lindserv:1at’flndsew=1 OK REP':SERVICE START: =3333-33-333333 =1 : 1800 : 0001 : 0005 = 2 : 180a : 0006 : 0016 = 3 2 00005500d10211e19b2300025b00a5a5 : 0017 : 001a =4:1801:001b:fff1 REP'25ERVICE END: =3333-33-333333 'AT‘FINDCHAR”\1\n Execution only command Command used to scan characteristics supported by services on the BLE device. User needs to mention connection ID for the device whose services are to be scanned. And start and end handle of the services tor which scan is to be performed. User can scan characteristics for only one service or multiple services or for all services in single command. at'lindserv:1at’flndsew=1 OK REP':SERVICE START: =3333«33-333333 = 1: 1800 : 0001 : 0005 = 2 : 180a : 0006 : 0016 3 : 00005500d10211e19b2300025b003535 : 0017 '. 0013 4 : 1801 : 001D : f1" REP':SERVICE END: =3333—33—333333 Considering the above report for services. below are the possible commands. © Copyright LM Technologies Ltd Page 17 of 62 www.lm-technologies.com TECHNOLOGIES. LM961 SPP with GAP Central Application v1.1 a. Scan character‘stics of single service i.e. 1800 service. handles are 0001 and 0005. Command should be ‘AT'iindchar=1.0001.0005' b. Scan characteristics for first two services Le. 1800 and 180a. User shall issue command as “at‘lindchar:0001.0016”, c. Scan characteristics 01 all services In single command, user shall Issue command “at‘tindchanlpOOLiflf‘. vi. Report is marked for start and end. vii. The example report below shows a characteristic scan command report. at'1indchar11.0001.001bat’findchar=1,0001,001b OK REP':CHAR start a00 : 0003 : 02 z 0002 [ Rd] . 2301 : 0005 : 02 : 0004 I Rd] :2a25 : 0008 : 02 : 0007 [ Rd] =4: 2a24 : 000a : 0 : 0009 [Rd ] :2a23 :000c:02:000b[Rd] :2a27 : OOOe : 02 : OOOdIRd] :2326 : 0010 : 02 : OOOf [ Rd] 2 2a28 2 0012 :02 : 0011 I Rd] 22329 : 0014 : 02 : 0013 I Rd] =10: 2a50: 0016 :02 :0015 [ Rd] =11: 00005501 : 0019 : 14 2 0018 [ Wr_cmd CCFG ] REP':CHAR END viii. For report above, the row “=1: 2a00 : 0003 : 02 : 0002 [ Rd 1" indicates “1" as serlal number, "2a00" as 16 bit characteristic UUID, ‘0003" is characteristic handle. '02" is propenies value and "0002" is declaratlon value for that characteristic. ix. For details on Characteristic value and Declaration values refer appendix A. x, “=11: 00005501 :0019 : 14 : 0018 [ Wr_cmd CCFG ]’ row indicates the characteristic has 128 bit UUID, but here only lower 32 bits are displayed “0019" is characteristic handle. “14" is properties value. this characteristic has two properties as WR-cmd and CCFG. “0018' is declaration value for that characteristic. xi. User needs to use characteristic-Handle to read or write data on that characteristic. 3.7 BLE read data from Characteristic: 3.7.1 "AT‘RDCHARVAL’WAH i. Execution only command ii. This command is used to read data irom the BLE device for the characteristic which has properties as read “Rd" i.e. 0x02. The command format is “AT'RDCHARVAL=conn-ID. char-Handle". e.g. “at‘rdcharval=1.0003" command is used to read data from 15‘ connected device, for characteristic 0003. © Copyright LM Technologies Ltd Page 13 of 62 www.lm-technologies.com TECHNOLOGIES. vi. vii. viii. ix. xi. xii. 3.7.2 iv. The module shall output an OK response iithe CID and the Char- handle is correct. After the module gives OK response to read command, module shows data received from remote device as a report. E.g. “REP':RDCHARVAL=l:Rcvd_Bytes:OO1O LM Serial Server” is a report of read data for characteristic 0003. Report shows connection ID as 1, Received bytes as 0x10 Le. 16 bytes, and the actual bytes are "LM Serial Server". ii module receives an error response it is reported to user with the error code. Users can reter to error codes as mentioned in the appendix section. at'rdcharvald,000cat'rdcharval=1,000c OK REP':RDCHARVAL=OOO1:Err_code:02 Below show some reierence reports for read command. at'rdcharval=1.0003at'rdcharval=1,0003 OK REP'1RDCHARVAL=1:Rcvd_Bytes:OOiO LM Serial Server at'rdchawal:1.0005at'rdcharval=1,0005 OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOZ at'rdcharval=1,000aat'rdcharvaI=1,000a OK REP':RDCHARVAL=1:Rcvd_Bytes:0016 CSR—GATT-SERVER-MODEL— at'rdcharvald,000cat'rdcharval=1,000c OK REP':RDCHARVAL=00011Err_code:02 Above screenshots are taken on Hercules soitware on Windows PC, it does not show non-printable characters in rece‘wed response. It user analyse the RX line on Oscilloscope or protocol analyser. all bytes can be seen. “AT‘RDMULTCHAR’WAH Execution only command This command is used to read data from multiple characteristic on single remote device. Read data from BLF. device for the characteristic which has properties as “Rd" Le. 0x02. Maximum of 5 characteristic's data can be read in one single command. Command iormai is “AT'RdMuItChamconn-ID, no-oi-chars-to-read. char-Handlei, char-HandleZ. char-Handlea. char-HandleA. char- Handle5,". © Copyright LM Technologies Ltd Page 19 of 62 www.lm-technologies.com LM961 SPP with GAP Central Application v1.1 TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 vi. e.g. command to read data from 3 characteristics shall be "at‘rdmuItchar=1,03,0008.000a.0010' command is used to read data from ist connected device. on characteristic 0003, 0008 and 0010. at‘rdchawal:1.000kt'rdcharval=1.0008 OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOS SR_no at'rdcharvaI:1,000aat'rdcharval=1,000a OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOG mod_no at'rdcharval21,0010at'rdcharval=1.0010 OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOG FW_Ver at'rdmultchaC1.03,0008.000a.OOlOat'rdmuitcharfl,03,0008,0 00a,0010 OK REP':RDMULTCHAR=1:Success length20011 $R_nomod_noFW_Ver vii. lithe read number of bytes from characteristics exceeds than MTU bytes then lower bytes are lost and only first MTU bytes are reported. This is limitation of BLE stack and not of LM961 application. viii. E.g. refer below response (last bytes form 0003 characteristic are lost while reading multiple characteristics in one command) at'rdcharval:1.0008at'rdcharval=1.0008 OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOS SR_no at'rdcharval:1.000aat'rdcharval=1,000a OK REP':RDCHARVAL=1:Rcvd_Bytes:OOOG mod_no at'rdcharval:1.0010at'rdcharval=1,0010 OK REP'2RDCHARVAL=11Rcvd_Bytes:0006 FW_Ver at'rdcharval:i.0012at'rdcharval=1,0012 OK REP':RDCHARVAL=1:Rcvd_Bytes:0007 App_ver at‘rdchawal:1.0009at'rdcharval=1,000e OK REP':RDCHARVAL=11Rcvd_Bytes:OOOb © Copyright LM Technologies Ltd Page 20 of 62 wwwtlrn-technologiescom TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 ix. 3.7.3 iv. vi. vii. CSR101x A05 at‘rdmuItcha#4050008.0006.0010.0012.000eat'rdmultchar=1, 05.0008.000a.0010.0012.000e OK REP‘:RDMULTCHAR=1:Success length20016 SR_nomod_noFW_VerApp_v Above screen shots are taken on Hercules software on Windows PC, it does not show non printable characters in received response. If user analyse the RX line on Oscilloscope or protocol analyser, all bytes can be seen. urnotouscumm Execution only command When the Characteristic Value is longer than can be sent in a single Read Response message, user can use this command to read that value in one command. Read data from BLE device for the characteristic which has properties as “Rd" i.e. 0x02. Command format is “AT‘RdLongChaFconn-ID. char-Handle". Commands which support "rdcharval' can also be read by this command. Response to the command shows bytes received, offset of current data with respect to the whole data, and MoreToCome (MTC) flag if there is next data packet expected on the same characteristic read. Refer following read examples for more detail. at“leconn:333333333333al‘leconn=333333333333 OK REP':BLE_CONNECTED:=3333-33-333333-0 : 1 : 0100 : 0017 : 0008 BLE Auth start OK REP':SERVICE START: =3333-33—333333 - 1 : 1800 : 0001 : 0005 2 : 180a : 0006 : 0016 3 : 00005500d10211e19bZ300025b003535 : 0017 '. 0013 4 : 180' : 001D : flff REP'25ERVICE END: =3333-33-333333 at'rdlongcharzmoo8at'rdlongchar=1.0008 OK REP':RDLONGCHAR=1:0008:Success Rcvd:0005 Offset:0000 MTC:0 SR_no at'rdiongchav:l.000aat'rdlongchai=1,000a OK REP':RDLONGCHAR=1:OOOa:Success Rcvd20024 Offsetzoooo MTC20 abchFGHlelmnopORSTvaxyzO123abchF © Copyright LM Technologies Ltd Page 21 of 62 www.lm-technologies.com TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 at'rdlongchar:l.000cat'rdlongchar=1,000c OK REP':RDLONGCHAR=1 Err_code:0002 at’rdIongchar=1.0005at'rdlongchar=1.0005 OK REP':RDLONGCHAR=1:0005:Success Rcvd:0002 Oflset:0000 MTC20 at'rdlongcharzl.0003at'rdlongchar=1.0003 OK REP':RDLONGCHAR=1:0003:Success Rcvd:0010 Offset:0000 MTC20 LM Serial Server 3.8 BLE write data on Characteristic: 3.8.1 iv. vi. vii. viii. "AT' ENBCCFG"\r\n Execution only command. Command used to enable the CIient-Confrguration-Flag (CCFG) on specific characteristic. When the module scms the characteristics of the device, it shows the CCFG flag it supported by that characteristic. E.g Serial—Over- Gatt service supports this flag (highlighted yellow in below repon). While issuing command. user should mention the device connectiorHD and characteristic handle. E.g The device 1 has CCFG flag characteristic with handle 0019. To enable the CCFG flag use command “at‘enbccigleOiQ”. Module shall give 0K response if the characteristic has CCFG flag otherwise module shall give ERR response ii wrong characteristic handle is mentioned. After the module responds with “OK", the module receives ieedback from the BLE device regarding success or failure, which is reported to the user. The report "REP':WRCHARVAL:1:Success" shows enable CCFG operation ls perionned successfully. at'iindchar:1.000l.001bat’findchar=1,0001.001b OK REP':CHAR start 2300 : 0003 :02 : 0002 [ Rd] . 2801 : 0005 : 02 : 0004 [ Rd] 22825 : 0008 : 02 : 0007 [ Rd] =4: 2a24 : 0003 : 0 10009 [ Rd] :2a23 : 000C: : 0001) [ Rd ] :2a27 : OOOe: 2 : 000d[ Rd] :2a26 2 0010 : 02 : 0001 [ Rd] 12328 : 0012 2 02 : 0011 [ Rd] =9: 2329 : 0014 : 02 : 0013 [ Rd] © Copyright LM Technologies Ltd Page 22 of 62 www.lm-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 3.8.2 iv. vi. vii. viii. 3.8.3 iv. vi. vii. =10: 2a50: 0016 :02 :0015 Rd REP':CHAR END at'enbccfg:1.0019at'enbccfg=1.0019 OK REP':WRCHARVAL=1:Success "AT'INDESFfln Execution only command. This command gives feedback to server/peripheral for notification indication from server/peripheral. This command is used to acknowledge the sever that client(BLE- Central) has received characteristic value Indication, and serveriBLE-Peripheral) may send another Indication. Command format is “at‘INDRESP=Conn-ID”. e.g. “AT'INDRESP=1" gives Indication response for 15‘ connected BLE device for receiving notification indication. OK/ERR response is given by LM961 after checking the Connection ID and Connection status. Alter OK response is given Response is forwarded to remote device by BLE-Stack. No feedback form BLE-Stack is provided to this command. "AT'WRWORESV'Mn Execution only command This command is used to send data to BLE device for the characteristic which has properties as ‘Wr-cmd" l.e. 0x04. Command format is “AT'WRWORESP=conriID, char-Handle, length. actual-bytes ". e.g. “at'wrworespewom.l0.12345abcdefl012" command is used to send data to 1“ connected device, on characteristic 0019. No of bytes to write are 0x10 Le. 16 and actual bytes are 1.2.3,4,5.a.b.c.d.e.i.!.(,).1.2. As shown in the example command number of bytes to transmit is hex value. As shown in the example command. actual data bytes are not separated by a comma. When the value 0x31 is sent i.e. ASClI 1 Is sent, the data buffer is copied and sent to remote device transparentty. Note :The actual data bytes to be sent shall not have “\r\n" as the data itself because it is the terminating string for AT command parser. © Copyright LM Technologies Ltd Page 23 of 62 www.lm-technologies.com TECHNOLOGIES. LM961 SPP with GAP Central Application v1.1 VIII. ix. xi. 3.8.4 iv. vi. vii. viii. For command “AT'WRWORESP=conn-ID, char-Handle. length. actual-bytes” module gives 0K response if all the following conditions are true: a. connection ID is correct (if module is connected to 3 devices and CID mentions 4, then it is invalid) b. Characteristic handle has WR_cmd properties c. Value of “length" field is less than 21 i.e. (0x15). d. Actual data bytes are same as value of “length" field. After the module responds to the command with "OK". the module sends the data to the remote BLE device. if the remote device receives the data and sends feedback to the LM961, that feedback is displayed on UART. E.g. report shows, “REP’:WRWORESP=1:001915uccess' which indicates the data has been received by the remote device successfully. 1 is the CID-given by module and 0019 is the characteristic handle. at'wrworespi1.0019.05,1234 Sat‘wmoresp=1.0019.05,12345 OK REP':WRWORESP=1:0019:Success at‘wrworesp=10019.10.12345abcdefli)12at‘wrworesp=1.0019,10,1 23453bcdefl012 OK REP':WRWORESP=1:OO19:Success ‘AT‘WRCHARVAL'WAn Execution only command This command is used to send data to BLE device for the characteristic which has properties as “Wr_req" i.e. 0x08. Command format is “AT‘WRCHARVAL=conn-ID. char-Handle, length. actual-bytes". e.g. “at'WRCHARVAL=1.0019.10.12345abcdeflo12" command is used to send data to ‘F‘ connected device, on characteristic 0019. No of bytes to write are 16 (0x10) and actual bytes are 12345abcdefl012. As shown in the example command. no of bytes to transmit is hex value As shown in the example command. actual data bytes are not separated by comma. When the value 0x31 is sent i.e. ASCII 1 Is sent. the data buffer is copied and sent to remote device transparently. Note :The actual data bytes to be sent should not have ‘\r\n" as the data itself because it is the terminating string for AT command parser. For command “AT'WRWORESP=conn-ID, char-Handle. length. actual-bytes” module gives OK response if all the following conditions are true: a. connection ID is correct (if module is connected to 3 devices and CID mentions 4, then it is invalid) © Copyright LM Technologies Ltd Page 24 of 62 wwwirn-technologiescom TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 b. Characteristic handle has Wr_req properties c. Value of “length" field is less than 21 i.e. (0x15). d. Actual data bytes are same as value of “length" field. ix. Alter module responds to this command as “OK", module sends the data to remote BLE device. at'lindcbar:2.0001.lfflat’findchaFZDOOtffif OK REP':CHAR start =1: 2305 : 0003 2 20 : 0002 [mail =3: 2a01 : 0009 : 02 2 0008 [Rd ] =4: 2a04 : 000b : 02 : 000a [Rd] =5: 2a37 : 000e : 10 : 000d [CCFG] =6: 2338 : 0011 :02 : 0010 [Rd ] =7: 2a39 : 0013 : 08 z 0012 [Wr_req ] =8: 2a19 : 0016 :12 : 0015 [Rd CCFG] =9: 00001013 : 001a :Oa : 0019 [ Rd Wr_req ] =10: 00001018 : 001C : 08 : 001b {Wr_req} REP':CHAR END at’wvcharval=2‘0013.05.1234Sat’wrcharval=2.0013,05,12345 OK REP':WRCHARVAL=2:Err_code:ld at‘wvcharval:2.0007.05.1234Sat‘wrcharva|=2,0007,05,12345 OK REP':WRCHARVAL=2:Success at'wrcnaivel:200007005.abCDEat’wrcharval=2.0007.05.abCDE OK REP':WRCHARVAL=2:Success at‘wvcharva|=2.00lc.05.abCDEat'wrchaNal=2.001c.OS.abCDE OK REP':WRCHARVAL=2:Err_code:Od at'wrchawal22.001a.05.abcDEat’wrcharval=2,001a,05,abCDE OK REP':WRCHARVAL=2:Err_code:0e at'wrcharva|=2.0013.05.abCDEat‘wrcharval=2,0013.05,abCDE OK REP':WRCHARVAL=2:Err_code:ld x If the remote device receives the data and sends leedback to the LM961. that feedback is displayed on UART. © Copyright LM Technologies Ltd Page 25 of 62 wwwtlm-technologiescom TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 i. xi xii Above report shows the WRCharval command is successful only on characteristic 0005 and 0007. i. If the WrCharVaI command fails In execution. then the error code reported by BLE-stack is reported to user in failure report. E.g. Err_code:fd , Err_code:0e, Err_code:0d i. Refer Appendix section for more details on error code. 3.8.5 "AT'SMRWORESWM i. Execution only command i. This command is used to send data to BLE device for the characteristic which has properties as “Si_Wrt" i.e. 0x40. ‘i. Command format is “AT'WRCHARVAL=conn-ID. char-Handle, length. actual-bytes". iv. e.g. “at'WRCHARVAL=l.0019.10.12345abcdel!()12" command is used to send data to 1st connected device, on characteristic 0019. No of bytes to write are 16 (0x10) and actual bytes are 12345abcdell012. v. As shown in the example command, no of bytes to transmit is hex vi vii value i. As shown in the example command. actual data bytes are not separated by comma. When the value 0x31 is sent i.e. ASCII 1 is sent. the data buffer is copied and sent to remote device transparently. i. Note : The actual data bytes to be sent should not have "inn" as the data itself because it Is the terminating string for AT command parser. i. For command “AT'WRWORESP=conn-ID. char-Handle. length. actual-bytes" module gives OK response if all the following conditions are true: a. connection ID is correct (if module is connected to 3 devices and CID mentions 4. then it Is invalid) b. Characteristic handle has Wr_req properties c. Value of “length" field is less than 21 i.e. (0x15). d. Actual data bytes are same as value of “length" field. ix. After module responds to this command as 0K, module sends the data to remote BLE device. 3.8.6 NOTIFJND notification Indication © Copyright LM i. Indication given by module. i. When the module receives data from the remote BLE device. it notifies the user on UART. i. E.g. the command below shows some indication reports: |ND':NOT|F_lND=1:OO19 R_bytes:0014 dataFromBLEDex/I23456 Technologies Ltd Page 26 of 62 www.lm-technologies.com TECHNOLOGIESI LM961 SPP with GAP Central Application v1.1 |ND':NOT|F_IND=1:OO19 R_by1es:0003 789 |ND‘:NOTIF_IND=1:0019 R_bytes:0014 abcdefghijklmnopqrst |ND':NOT|F_IND=1:0019 R_bytes:0006 uvwxyz |ND':NOTIF_IND=1:0019 R_bytes:0014 abcdefghijklmnopqrst |ND':NOT|F_IND=1:0019 R_bytes:0006 uvwxyz iv. In report '1ND':NOT|F_IND=1:OO19 R_bytes:0014 dataFromBLEDein23456" the module shows CID as 1. Characteristic from which data is received is 0x0019, the actual received bytes are 0x0014, and then the actual bytes as “dataFromBLEDevl23456”. v. The module can receive a maximum of 20 bytes i.e. 0x14 bytes in one notification packet. vi. If the remote device sends more than 20 bytes in one packet then the module shows two notification indication messages. 5.9. If the remote device sends the string "dataFromBLEDev123456789“. the module shows "dataFromBLEDev123456” first and then “789”. © Copyright LM Technologies Ltd Page 27 of 62 wwwtlm-technologiescom TECHNOLOGIES' LM961 SPP with GAP Central Application v1.1 4. LM961 AT commands and Default configuration This section describes the AT command structure lor the LM961 module. Serial terminals (such as Hercules. HyperTerminaI. Tera Term or Putty) can be used lor serial communication with the LM961. Every command ls terminated with 'CR-LF". T parsing the AT command strings after receiving “CR-LF" sequence. AT Commands are case insensitive e.g. 'At'Resp=On". "at'resp=on" and "AT'RESP=ON" are all valid. Following are the AT command types: 1. Query only commands - Commands to query Module state. linnware version number etc. 2. Query and Set commands - Commands to query the setting and modify Module setting e.g. discoverability. Role, Baud. etc. 3. Execution only command - commands to perform specific action e.g. start discovery for Bluetooth devices. start connection procedure. start upgrade procedure etc. The LM961 outputs indication messages to the user through the serial port for indications like connection/pairing request. result of connectlon/palr procedure. result of Bluetooth devices discovery. disconnection indication etc. Alter the indication message is displayed. the LM961 waits for inputs lrom the user to execute further action. For example. after incoming pairing indications. enter accept/reject pair response or after indication for PASSKEY_clm, provide yes/no confirmation for the passkey etc. The module responds to each AT command as "OK'\r\n or “ERR”\r\n. Alter this response the module takes requested action or it will output report to the user on UART. If module does not receive "AT' as a stan of new command. the module may not respond to this command even if it is terminated with “\r\n“ (e.g. instead ol "AT'NAME=?". user issues ‘A'name=?”). Module will neglect the received string and is ready to receive new AT command and to process it. When the module does not receive any command on UART for more than 30 seconds. the module enters deep sleep mode. The module can come out of this mode on UART activity or BT activity. lfthe user enters AT commands while the module is in deep sleep. the module may lose the first character ofan AT command. e.g. [or command “AT'NAME=?”. module may show the echo as 't'name=?” or "Nname=?" i.e. some garbage character at start. The module will not respond to AT commands such as ERR/0K. but it ignores this data and waits for a new AT command to process. AT commands expects the BT address in the string. In this document “01267357215” is considered a reference BT address. whereas 0012 is nap. St is © Copyright LM Technologies Ltd Page 28 of 62 www.lm-technologies.com TECHNOLOGIES‘ LM961 SPP with GAP Central Application v1.1 nap and 357215 is lap in the BT address. Users should use the BT address of their devices. 4.1 AT commands The table below shows all the AT commands that are supported on the LM961 module and the default settings wherever applicable for quick reference. 4.1.1 General settings AT commands: 1 AT'ADDR Query only -- 2 AT‘NAME Query and set Firmware version dependent e.g. 068LM_SPP_O104 3 AT'ECHO Query and set ON 4 AT‘RESP Query and set ON 5 AT‘DCOV Query and set ON 6 AT‘PAIR Query and set ON 7 AT'STATE Query only .- 8 AT'VER Query only -- 9 AT‘RESET Execution only -- 10 AT‘SETTINGS Query only Refer command details 4.1.2 UART settings AT commands: 1 AT'BAUD Query and set 19200 (5) 2 AT'PAR Query and set No paritflO) 3 AT'STOP Query and set One stop bit (0) 4 AT'FLOW Query and set Off 5 AT'CTS Query only -- 6 AT‘RTS Set only -- 7 AT‘DTR Set only -- 8 AT'DSR Query only -- 9 AT'MODEM Query and set NONE Note: CTS. RTS, DTR. DSR. MODEM commands are not appllcable for LM961 module. © Copyright LM Technologies Ltd Page 29 of 62 wwwtlmtechnologiescom - TECHNOLOGIES LM961 SPP with GAP Central Application v1.1 4.1.3 Bluetooth security settings commands: AT'PIN Query and set 1234 AT‘DPIN Query and set OFF AT'MITM Query and set OFF AT'IOTYPE Query and set N0_ln0ut AT'DEL Execution oniy -- AT'PASSKEY Execution only -- AT'PASSCFM Execution only -- AT'STOPPAIR Execution oniy -- AT'PAIRLIST Query only .- QMNO‘U'Itth‘ 4.1.4 SPP related AT commands: 1 AT'FIND Execution only -- 2 AT'ROLE Query and set Dual 3 AT‘ACON Query and set OFF 4 AT'CONN Execution only -- 5 Escape Execution only -- sequence “m, 6 AT'AUTO Execution only -- 7 AT'DROP Execution only -- 8 AT‘BOND Query and set Default bond device address 0000-00- 000000 4.1.5 Firmware Upgrade AT commands: 1 AT'UPGRADE Execution only -- © Copyright LM Technologies Ltd Page 30 of 62 wwamtechnologrescom
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.6 Linearized : No Author : Tom Cruise Create Date : 2018:06:14 09:11:43+08:00 Modify Date : 2018:06:14 09:11:52+08:00 XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:08:04 Metadata Date : 2018:06:14 09:11:52+08:00 Creator Tool : Microsoft® Word 2016 Format : application/pdf Title : untitled Creator : Tom Cruise Document ID : uuid:a109ddf8-3d3c-4f8b-bc62-3685acc70d38 Instance ID : uuid:a4a388a8-2fb5-4d0c-982c-223a8a280cc0 Producer : Acrobat Distiller 9.3.2 (Windows) Page Count : 30EXIF Metadata provided by EXIF.tools