LM LM068 Manual de usuario

LM068
LM068 BLE Adapter
USER GUIDE v1.1
Firmware Version: LM068_BLE_PERI_0205
© All rights reserved.
All trade names are registered trademarks of respective manufacturers listed.

This manual may not be copied in any media or form without the written consent of original maker.

© Copyright LM Technologies Ltd Page 2 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
Revision
Date
Changes
Description
v1.0
21
-
05
-
2019
Created user manual for LM068_B
LE
_Peri_0201 firmware
V1.1
02
-
12
-
2019
Improved the BLE Data
upload rate

© Copyright LM Technologies Ltd Page 3 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
Contents
1. Firmware version History ..................................................................... 5
2. Introduction ......................................................................................... 6
3. Flowchart of operation ......................................................................... 7
4. Overview of LM068_BLE_Peri_0201 firmware .................................... 8
4.1 BLE Advertisement: ............................................................................ 8
4.2 BLE Advertising data: ......................................................................... 9
4.3 BLE Connection ................................................................................ 12
4.4 Serial over GATT service: .................................................................. 14
4.5 Messages on UART of BLE adapter: ................................................... 15
5. LED Indication ................................................................................... 19
5.1 Power on LED sequence ................................................................... 19
5.2 LED0 ............................................................................................... 19
5.3 LED1 ............................................................................................... 19
5.4 LED2 ............................................................................................... 19
5.4.1 Connected state: ........................................................................... 19
5.4.2 BLE advertiser-mode: .................................................................... 19
5.4.3 Pairing State ................................................................................. 19
6. AT command Parser on LM devices: ................................................... 20
7. Basic configuration AT commands ..................................................... 21
7.1 Basic configuration AT commands for Quick reference: ........................ 21
7.1.1 General settings AT commands: ..................................................... 21
7.1.2 UART settings AT commands: ........................................................ 21
7.1.3 Firmware Upgrade AT commands: .................................................. 21
7.2 Adapter Settings commands: ............................................................. 22
7.2.1 “AT*ADDR”\r\n ............................................................................. 22
7.2.2 “AT*NAME”\r\n ............................................................................. 22
7.2.3 “AT*UPDATENAME”\r\n ................................................................. 22
7.2.4 “AT*ECHO”\r\n ............................................................................. 23
7.2.5 “AT*RESP”\r\n .............................................................................. 23
7.2.6 “AT*VER”\r\n ............................................................................... 24
7.2.7 “AT*RESET”\r\n ............................................................................ 24
7.2.8 “AT*SETTINGS”\r\n ...................................................................... 25
7.3 UART Settings commands: ................................................................ 25
7.3.1 “AT*BAUD”\r\n ............................................................................. 25
7.3.2 “AT*PAR”\r\n ............................................................................... 26
7.3.3 “AT*STOP”\r\n ............................................................................. 26
7.3.4 “AT*FLOW”\r\n ............................................................................. 26

© Copyright LM Technologies Ltd Page 4 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
7.3.5 “AT*UARTCONF”\r\n: .................................................................... 27
7.4 Bluetooth Security Settings commands: .............................................. 28
7.5 Firmware Upgrade commands: .......................................................... 28
7.5.1 “AT*UPGRADEINT”\r\n .................................................................. 28
7.5.2 “AT*UPGRADE”\r\n ....................................................................... 29
8 GAP Peripheral Role related AT commands........................................ 30
8.1 GAP Central AT commands in brief .................................................... 30
8.2 BLE security commands: ................................................................... 30
8.2.1 “AT*LESEC”\r\n ............................................................................ 30
8.2.2 “AT*CLRWHITE”\r\n...................................................................... 31
8.2.3 “AT*LEBOND”\r\n ......................................................................... 31
8.2.4 “AT*LECONFIG”\r\n ...................................................................... 31
9 Firmware upgrade on LM devices ...................................................... 33
9.1 Firmware upgrade over UART interface .............................................. 33
10 Simple Secure Pairing between LM device and remote device .......... 35
11 Appendix ............................................................................................ 36
11.1 Abbreviations ................................................................................ 36
11.2 BLE Peripheral characteristics ......................................................... 36
11.3 GATT UUID type ........................................................................... 37
11.4 GATT_Status_code ........................................................................ 38
11.5 BLE Service UUIDs ........................................................................ 40
Table of Figures:
Figure 1: Application scenario for LM068_BLE_Peri_0201 firmware ......................... 6
Figure 2: Flowchart for LM068_BLE_Peri_0201 firmware ........................................ 7
Figure 3: BLE adapter in Scanned devices List ....................................................... 8
Figure 4: More data in BLE adapter advertisements ............................................. 10
Figure 5: Hex data in BLE adapter advertisements ............................................... 11
Figure 6: Pairing required for connection to be stable .......................................... 12
Figure 7: Services on BLE adapter ...................................................................... 13
Figure 8: Details of Services provided on BLE adapter .......................................... 14
Figure 9: Details for Serial-Over-GATT service ..................................................... 15
Figure 10: Default settings on Hercules for serial communication .......................... 16
Figure 11: Serial messages on BLE adapter for BLE Connection and Data receive ... 17
Figure 12: Data transfer in full Duplex over BLE link ............................................ 18

© Copyright LM Technologies Ltd Page 5 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
1. Firmware version History
Version: LM068_BLE_Peri_0201
1. LM068 adapter behaves as GAP peripheral only.
2. No support for SPP profile.
3. Firmware Upgrade provided over UART interface.
4. BT5.0 compliant stack.
Version: LM961_LE_Peri_0204
1. Released for LM961
2. LM068 adapter behaves as GAP peripheral only.
3. No support for SPP profile.
4. Firmware Upgrade provided over UART interface.
5. BT5.0 compliant stack.
6. Updated the connection interval to 7.5mSec instead of 10mSec, MTU is 23.
Can receive 23 but sends only (23-3)20Bytes in a packet.
Version: LM961_LE_Peri_0205
1. Improved the BLE Data upload rate. Maximum 40 packets per seconds are
sent with 20 bytes each.

© Copyright LM Technologies Ltd Page 6 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
2. Introduction
This document describes the functionality of the “LM068_BLE_Peri_0201” application
for LM068 adapter.
LM068 is an adapter provides standard DB9 connector for serial interface, USB mini
plugin for Powering or pin9 of DB9 connector can be used for Powering. LM068
adapter provides DTE/DCE selection Switch to switch the DTE and DCE role. LM068
adapter provides LEDs for different state indications.
This document refers the firmware LM068_BLE_Peri_0201 as “BLE adapter”.
This document provides details for
1. Firmware version history for LM068_BLE_Peri_0201 adapter firmware
2. Overview of LM068_BLE_Peri_0201 firmware
3. LED indication information
4. AT command Parser module of LM devices
5. AT commands and information
6. Firmware Upgrade procedure
The BLE adapter is configured to have GAP peripheral role. User cannot change the
GAP role of the BLE Adapter.
BLE adapter can accept connections from android, iOS or any Gap-Central device.
User can configure the adapter using AT commands before the adapter is connected
to the remote GAP-Central device, Once connected over BLE, the UART lines are
used for data transmission only. Data can be transferred in full duplex mode.
Generally, the MTU (maximum transfer unit) supported by BLE adapter is 20, i.e.
each BLE packet can send/receive maximum 20 data bytes to/from.
BLE Gap-Central
device (BLE App)
BLE-Peripheral
device
Rx = Data
received
Tx = Data to be sent
to Gap-Central
device
send data to LM068
as “Write Command
wo response”
Data from LM068
adapter is shown as
“Notification packet”
Figure 1: Application scenario for LM068_BLE_Peri_0201 firmware

© Copyright LM Technologies Ltd Page 7 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
3. Flowchart of operation
Figure 2: Flowchart for LM068_BLE_Peri_0201 firmware

© Copyright LM Technologies Ltd Page 8 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
4. Overview of LM068_BLE_Peri_0201 firmware
Below section explains the GATT peripheral role of LM068_BLE_Peri_0201 adapter
firmware.
As a BLE peripheral device, BLE adapter implements database for Generic Access
service, Generic Attribute service and Serial-Over-GATT service.
4.1 BLE Advertisement:
i. LM068_BLE_Peri_0201 firmware advertises itself as BLE peripheral device.
After power on, GATT database is initialized and BLE adapter starts
advertising itself for connections.
ii. BLE adapter uses its BD address as Static and Public BLE device address
meaning it will be advertising the same BD address for each advertisements
packet (unlike few devices which use random resolvable BD-addresses).
iii. When user starts BLE devices scanning the BLE adapter is showed with its
BD-address.
iv. A short name of the BLE adapter is added in the scan response data as
“LM068BLE”. A full name of the device can be read using Generic Access
service after connection is completed.
Figure 3: BLE adapter in Scanned devices List

© Copyright LM Technologies Ltd Page 9 of 41
www.lm-technologies.com
User Manual for “LM068_BLE_Peri_0204” FW
4.2 BLE Advertising data:
Below screen shot shows the data advertised by LM068_BLE_Peri_0201
firmware when scanned by the BLE-Gap-Central device
i. The BLE adapter advertises itself as BLE only device.
ii. The Short name of BLE adapter is included in advertising data as
“LM068BLE”.
iii. As a GAP-Peripheral device, the BLE adapter has implemented database for
Generic Access service (0x1800), Generic Attribute service (0x1801) and
Serial-Over-GATT service.
iv. Using Generic Access service, GAP-Central device can read the Full name of
the device.
v. A 128-bit UUID of Serial-Over-GATT service is added in the advertisements
as “0000-5501-d102-11e1-9b23-0002-5b00-a5a5”.
vi. Advertising filers for considering the BLE security as per the whitelist
devices is applied as per the LESEC configuration on the BLE adapter. This
is described in more detail in LESEC section further in the document.
Tabla de contenidos

















