EasyManua.ls Logo

LM LM068 - User Manual

Default Icon
41 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Loading...
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.

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the LM LM068 and is the answer not in the manual?

Overview

The LM068 BLE Adapter is a device designed to facilitate serial communication over Bluetooth Low Energy (BLE). It functions as a GAP peripheral device, meaning it can accept connections from Android, iOS, or any GAP-Central device. The adapter provides a standard DB9 connector for its serial interface and can be powered via a mini USB port or pin 9 of the DB9 connector. A DTE/DCE selection switch allows users to configure the adapter's role in the serial communication. The device also features LEDs to indicate various operational states.

Function Description:

The LM068 BLE Adapter, running firmware LM068_BLE_Peri_0201 (or later versions like LM961_LE_Peri_0204 and LM961_LE_Peri_0205), acts as a BLE peripheral. It initializes its GATT database and begins advertising itself for connections upon power-on. The adapter uses its static and public Bluetooth Device (BD) address for advertising, ensuring a consistent address across advertisements. A short name, "LM068BLE," is included in the scan response data, and the full device name can be read via the Generic Access service after a connection is established.

As a GAP-Peripheral device, the LM068 implements a database for Generic Access Service (0x1800), Generic Attribute Service (0x1801), and Serial-Over-GATT Service. The 128-bit UUID of the Serial-Over-GATT service is advertised as "0000-5501-d102-11e1-9b23-0002-5b00-a5a5". Advertising filters can be applied based on the LESEC configuration for BLE security, allowing connections only from whitelisted devices.

Once a BLE connection request is received, the adapter accepts it and initiates a pairing procedure if the device has not been previously paired. If pairing fails, the connection is dropped. After a successful connection, data transmission occurs via the Serial-Over-GATT service. The GAP central device sends data to the BLE adapter using "Write-WO-Response" commands, and the BLE adapter sends data to the GAP-Central device using "Notifications" requests. For active data transmission, the GAP-Central device must enable the Client-Configuration-Flag on the BLE adapter.

The adapter supports full-duplex data transfer. When the BLE adapter receives data on its UART (intended for the GAP-Central), it sends the data in 20-byte packets every 50mSec. It has an internal buffer of 200 bytes for storing data. If this buffer becomes full while the adapter is still receiving data on the TX line, a "Buffer full" warning message is issued. Data received from the Central device is uploaded to the Rx line immediately. While full-duplex transmission may experience some delays compared to simplex transfer, it is crucial to introduce a delay of at least 10 mSec between consecutive packets sent by the central device to prevent the BLE adapter from hanging up.

Important Technical Specifications:

  • GAP Role: Peripheral only (cannot be changed).
  • Bluetooth Standard: BT5.0 compliant stack.
  • Profiles Supported: No SPP profile support.
  • Maximum Transfer Unit (MTU): 20 bytes per BLE packet for sending/receiving.
  • Connection Interval: Updated to 7.5mSec (from 10mSec) in firmware LM961_LE_Peri_0204.
  • Data Packet Size (Sending): 20 bytes per packet (LM961_LE_Peri_0204 and LM961_LE_Peri_0205).
  • Data Upload Rate: Maximum 40 packets per second with 20 bytes each (LM961_LE_Peri_0205).
  • Internal Buffer: 200 bytes for data received on UART.
  • Serial Interface: Standard DB9 connector.
  • Power Supply: Mini USB or pin 9 of DB9 connector.
  • Security: Assumes No-IO capability (no DPIN input, no DPIN display), no MITM protection. Pairing is "Just works" by default.
  • Firmware Upgrade Interface: UART only.

Usage Features:

  • Configuration via AT Commands: The adapter can be configured using AT commands sent over the UART interface. These commands are case-insensitive and must be terminated with a "CR-LF" character sequence.
    • Query Commands: Retrieve current settings (e.g., AT*ADDR=? for Bluetooth address, AT*NAME=? for device name, AT*VER=? for firmware version, AT*SETTINGS=? for all settings).
    • Set Commands: Modify device settings (e.g., AT*NAME=testname to change the device name, AT*UPDATENAME=ON/OFF to enable/disable appending BD address characters to the name, AT*ECHO=on/off for command echo, AT*RESP=on/off for command response).
    • Execution Commands: Trigger actions (e.g., AT*RESET=1 for soft reset, AT*RESET=2 for hard reset and factory defaults, AT*CLRWHITE to clear the whitelist, AT*UPGRADE to enter firmware upgrade mode).
  • UART Settings:
    • Baud Rate: Configurable (e.g., AT*BAUD=3 for 38400 bps). Default is 19200 bps.
    • Parity: Configurable (e.g., AT*PAR=1 for odd parity). Default is no parity.
    • Stop Bit: Configurable (e.g., AT*STOP=1 for two stop bits). Default is one stop bit.
    • Flow Control: Configurable (e.g., AT*FLOW=ON). Default is OFF.
    • UART Configuration (UARTCONF): Can be set to "THROUGHPUT" (default, for large data blocks) or "LATENCY" (for low-latency, small string transfers).
  • BLE Security:
    • LESEC (Low Energy Security): AT*LESEC=ON/OFF to enable/disable whitelist security. When ON, only whitelisted devices can scan advertisements and connect. When OFF, any GAP-Central device can connect.
    • LEBOND: AT*LEBOND=? to query the bonded device address. AT*LEBOND=address to set the bonded device address. If set to 0000-00-000000, the adapter is not bonded and accepts connections from any device.
  • LED Indications:
    • Power On Sequence: All LEDs blink fast for 3 seconds (6-7 times) upon power on or after AT*Reset=1 or AT*Reset=2.
    • LED0 (Red): Constantly ON when the device is powered and ready to process AT commands. OFF if not powered correctly or initialized.
    • LED1 (Yellow): Indicates data transfer in BLE connected state. ON during sending/receiving data, OFF when no active data transfer or not connected.
    • LED2 (Blue): Constantly ON when connected to a remote GAP central device. Blinks fast in BLE advertiser mode until connected or in pairing mode.
    • Pairing State: LED1 and LED2 blink fast until pairing is completed.
  • Device Naming: The AT*UPDATENAME feature appends the last two characters of the BD address to the Bluetooth name to differentiate multiple LM devices in close proximity.

Maintenance Features:

  • Firmware Upgrade: The firmware can be upgraded via the UART interface.
    • Requires the LM device to be disconnected from any Bluetooth or BLE device.
    • The UARTCONF setting must be set to "THROUGHPUT" for successful upgrade.
    • The command AT*UPGRADE=LMUPDATEV_LM068_BLE_Peri_0201 (password-dependent on device type and firmware version) puts the device into upgrade mode.
    • After sending the new firmware image, the device processes it internally for about 20 seconds, during which no characters should be received on the Rx line to avoid upgrade failure.
    • Upon successful upgrade, the device reboots with the new firmware and displays power-on messages and LED sequence.
  • Reset Options:
    • Soft Reset (AT*RESET=1): Restarts the device as if power cycled, retaining all user-modified settings and disconnecting all Bluetooth/BLE connections.
    • Hard Reset (AT*RESET=2): Applies factory default settings, deletes all paired devices and corresponding data, and disconnects all Bluetooth/BLE connections.
  • Error Reporting: The device responds to AT commands with "OK" or "ERR" and provides detailed reports for query commands. GATT status codes are provided for operation failures.
  • Deep Sleep Mode: The LM device enters deep sleep mode if no command is received on UART for more than 30 seconds. It wakes up on any activity on UART lines or Bluetooth. Users should be aware that the first character of an AT command might be lost if sent while the device is in deep sleep.

LM LM068 Specifications

General IconGeneral
BrandLM
ModelLM068
CategoryAdapter
LanguageEnglish