Bluetooth

Bluetooth allows devices to transmit data wirelessly. It uses the 2.4 GHz radio frequency band. The xPico 250 and xPico 270 support dual-mode Bluetooth BR/EDR (Classic Bluetooth) and BLE wireless connectivity. The diagram below shows the Bluetooth stack of the xPico 250 and xPico 270 in the center. The Bluetooth BR/EDR and BLE device stacks are shown to the left and right for comparison.

Bluetooth Stacks

The Serial Port Profile (SPP) is included for Bluetooth BR/EDR. For BLE, new profiles must be implemented on top of GATT. Future releases of xPico 200 may include additional profiles, or you can develop profiles using the xPico 200 SDK. For sample Bluetooth applications, see the SDK User Guide.

Bluetooth BR/EDR and Bluetooth LE support is available in the standard xPico firmware image. These are available under the Bluetooth status and configuration and the Bluetooth_SPP configuration groups in the management interfaces. The xPico 200 SDK also provides optional Bluetooth modules which are not in the standard firmware build but may be used by including them in a custom firmware build. The optional Bluetooth modules are BLE Beacon Scanner and GATT Server. For information on how to build a custom firmware image and how to configure the optional Bluetooth modules, see the SDK User Guide.

BLE Overview

BLE (Bluetooth low-energy) is optimized for short bursts of data transmission and is designed for low power consumption. BLE devices have pre-connection and post-connection roles.

BLE Roles

Before connection, a BLE device is a peripheral or a central device. Peripheral devices advertise and wait for a wireless connection from a central device. Central devices scan for peripherals. Once the connection is made, a peripheral device is a slave and a central device is a master.

After connection, a device can be either a client or a server. This is separate from the peripheral/central or slave/master roles. A client accesses resources hosted on the server. In most cases, the peripheral device functions as the server and the central device functions as a client.

  • In the BLE central role, the xPico 250 and xPico 270 can connect to devices using GATT.
  • In the BLE peripheral role, xPico 250 and xPico 270 supports the Lantronix proprietary Gateway Provisioning Profile by default. Gateway Provisioning Profile enables communication with the Lantronix Gateway Provisioning mobile application for iOS or Android.

Bluetooth BR/EDR Overview

The original Bluetooth implementation, now referred to as Classic Bluetooth, was a wire-replacement protocol. BR/EDR, or basic rate and enhanced data rate, is the term for the data rates supported by Classic Bluetooth. Classic Bluetooth primarily offers profiles for wire-oriented protocols and devices, such as the Serial Port Profile (SPP).

One master device can connect to a maximum of seven slave devices. A slave device can only be connected to a single master device. A master device can communicate with any slave device to which it's connected. A slave device can communicate only with the master device to which it's connected.

Classic Bluetooth

The xPico 250 and xPico 270 support the master and slave role with the SPP profile. The xPico 250 and xPico 270 has three SPP Lines, allowing access and communication to a maximum of three SPP devices at a time.

Bluetooth Status and Configuration

Bluetooth status and configuration settings allow you to scan and connect to nearby Bluetooth (BR/EDR and BLE) devices, view paired Bluetooth devices, view Bluetooth operation status, and configure Bluetooth properties for the xPico device.

Bluetooth Operation Status

View the Bluetooth operation status to see the Bluetooth state (enabled or disabled), the Bluetooth device address, BLE advertising information, and details about the RFCOMM and GATT servers and connections. The status also displays the devices that are paired with the xPico 200 device.

To view Bluetooth operation status:

For Web Manager, go to Bluetooth > Status.

For CLI, go to Status Bluetooth Operation level.

To view paired Bluetooth devices:

For Web Manager, go to Bluetooth > Status or Bluetooth > Nearby Devices.

For CLI, go to Status Bluetooth Operation level.

Bluetooth Configuration

Configure the Bluetooth settings on the xPico device.

To configure Bluetooth:

For Web Manager, go to Bluetooth > Configuration.

For CLI, go to Config Bluetooth level.

For XML, go to configgroup Bluetooth.

The configurable settings are described in the table below.

Bluetooth Configuration Settings

Field Description
State Enabled or Disabled. Turns Bluetooth on or off.
Device Name Device Name may contain up to 25 characters. This is the Device Name provided to other Bluetooth devices through device discovery. The Device Name defaults to model and serial number, and if made blank, will revert to this default.
Note: Changing the Device Name requires a reboot to take effect.
Device Class Device Class may contain up to 3 bytes.
Background Scanning Background Scanning may be "Enabled" or "Disabled". This setting enables or disables background scanning, including both Bluetooth Low Energy (BLE) scanning and inquiry scanning for BR/EDR devices.
Allow Discovery No or Yes. Determines whether the device will respond to inquiry scans.
Allow Connections No or Yes. Determines whether the device will accept connections.
Note: Disabling this setting means that any Service Discovery Protocol (SDP) discovery from another device will fail.
Enable SPP Server No or Yes. Determines whether the Serial Port Profile (SPP) server is enabled.
SPP Service Channel This setting defines the RFCOMM channel number for the Serial Port Profile (SPP) server. Service Channels can range from 1 to 30.
Enable BLE Peripheral No or Yes. Enables or disables BLE Peripheral functionality. If enabled, the device will respond to BLE scans, and will run general advertisements.
Lantronix Provisioning Server Enabled or Disabled. Enables or disables the Lantronix BLE Provisioning Server.
BLE Peripheral Device Name Name may contain up to 25 characters. This setting allows the device name used in BLE advertisements to be configured differently than the device name used for device discovery. BLE advertisements are used by the Lantronix Provisioning Server. Like the Device Name used for device discovery, this setting defaults to model and serial number, and if made blank, will revert to this default.

Nearby Bluetooth Devices

Scan for nearby Bluetooth devices and select a device from the results to pair to it. Pairing consists of storing link keys to make subsequent connections to a paired device faster. On the xPico 200, some profile implementations, such as SPP, require devices to first be paired before they can be configured for data transfer.

Bluetooth connections are protocol specific, so the connections are based on what is managing the protocol. For example, SPP manages its connections to paired devices mapped to SPP lines. Other paired devices are just paired until used by another Bluetooth protocol/profile in another module or an SDK application.

To scan for nearby devices and pair to a device:

For Web Manager:

  1. Go to Bluetooth > Nearby Devices.
  2. Click Scan to scan for nearby BLE and BR/EDR devices within range.
    Scan results include the device name, device address, RSSI (dBm), and the detected Bluetooth type. Any paired devices will be marked as paired.
  3. Click the device address to attempt to connect to that device.
  4. On the Pair Device page, enter the pairing settings.
    Paired devices are displayed with an X icon next to the Device Name on the Nearby Devices page or on the Bluetooth > Status page.

For CLI, navigate to Status Bluetooth Nearby Devices level.

  • Use Scan to scan for BLE or BR/EDR devices within range.
  • Use Pair <Device_Name | Device_Address> [PIN | "-le"]. to pair with that device.

Refer to the tables below for field descriptions.

Nearby Bluetooth Devices Fields

Field Description
Device Name Name of the device. An X icon appears next to the device name if the device is paired to the xPico device.
Note: When you unpair a remote device, make sure that you unpair this device from the remote device as well. Failure to do so can result in failure to pair with that remote device in the future.
Device Address Bluetooth device address
RSSI RSSI signal strength in dBm
Type Displays the detected device type. One of the following types:
- BR/EDR – sometimes called Bluetooth Classic
- Dual mode – supports BR/EDR and BLE
- BLE (address type) – Bluetooth Low Energy.
The BLE address type can be:
a. Public – static, fixed address
b. Random – static, randomly generated address
c. Private Resolvable – private, randomly generated but resolvable address
d. Private Non-resolvable – private, randomly generated, non-resolvable address

Bluetooth Pair Device Fields

Field Description
Device Address Displays the Bluetooth device address
Transport Option to select the BR/EDR or BLE transport
PIN A PIN may be required to pair with BR/EDR devices that use the older legacy pairing method.

Bluetooth SPP

Bluetooth SPP pertains to SPP line configuration in the Bluetooth master or Bluetooth slave role.

Master Configuration

Bluetooth_SPP Master configuration settings pertain to the SPP line configuration when the xPico is connected to a Bluetooth device as the Bluetooth master role. xPico supports 3 SPP lines. Each SPP line can be assigned to one device at a time so 3 devices in total may be assigned to SPP lines.

To configure Bluetooth_SPP master:

  1. For Web Manager, go to Bluetooth_SPP > Master.
  2. Paired devices are displayed. Click Edit to Assign the device to an SPP line. Click Submit to write the changes.
  3. Configure the Line protocol for the assigned SPP line as desired. See Line

For CLI, go to Config Bluetooth_SPP Master level.

For XML, go to configgroup Bluetooth_SPP Master.

Refer to the table below for field descriptions.

Field Description
Device Address and SPP line Displays any devices that have been previously assigned to SPP lines as well as any currently bonded and connected devices. If a device is assigned to an SPP line and then forgotten, the line assignment will not be remembered.
Click Edit to assign the device to an SPP line.
SPP Line SPP line may be “unassigned” or SPP_<number>. Select SPP_<number> to connect to a Bluetooth slave device, or select Unassigned to remove the connection between a previously connected device and its SPP line.
Protocol selection for the SPP line is available in Line configuration.

Slave Configuration

Bluetooth_SPP slave configuration settings pertain to the SPP line configuration when the xPico device is connected to a master device.

Choose an SPP line to connect to the Bluetooth master device or choose “Unassigned” to remove the connection between the master device and its SPP line. The SPP line assigned here will always be connected to whichever Bluetooth device is currently bonded as a master device to this slave.

Each SPP line can only be connected to a single device.

Protocol selection for SPP Lines is available as part of Line configuration.

To configure Bluetooth_SPP slave:

For Web Manager, go to Bluetooth_SPP > Slave. Write the changes to save the configuration.

For CLI, go to Config Bluetooth_SPP Slave level.

For XML, go to configgroup Bluetooth_SPP Slave.