BGX13 Variable Reference

This page provides a list of Bluetooth Xpress (BGX) BLE variables with a full description of the function of each variable together with example usage.

Variables are cached in volatile RAM and must be saved to non-volatile flash memory to persist between reboots. To save variables to flash, use the save command.

NOTE! Don't forget to check out command navigation tips to make it easier to find and type specific variable names.

Documentation Format

Many of the Bluetooth Xpress responses shown in the examples on this page were captured with the highest system print level (sy p) = 4, and system command header enabled (sy c h) = 1. These settings are provided to make it easy for a host microcontroller to parse responses by examining response headers.

Version Availability

Variables that were not available in the original product release but that have been added since are indicated with Version Notes. If the variable has no version notes, it means it was available since the original release.

List of Variables


Variable Description

All

al

All (variables)

Description

Returns a list of all variables. This includes the list of GPIO settings returned by gp u.

AttributeDescription
accessget

Get example

> get al
bl a     : D0CF5E828F18
bl c c   : 0
bl c i   : 12
bl c t   : 400
bl d a   : 512
bl e b   : 1
bl e k   : none
bl e p   : any
bl p m   : 0
bl p p   : 1m
bl t c   : 8
bl v h d : 30
bl v h i : 32
bl v l d : 0
bl v l i : 874
bl v m   : high
bl v p   : high
bu i     : command
bu s c   : level
bu s s   : 242424
ce c c   : 0
ce s h d : 30
ce s h i : 96
ce s l d : 300
ce s l i : 2048
ce s m   : off
ce w m   : ack
gp u     : 
!  # Description
#  0 none
#  1 none
#  2 none
#  3 none
#  4 none
#  5 none
#  6 none
#  7 none
sy c e   : 1
sy c h   : 0
sy c p   : 1
sy d n   : BGX-8F18
sy i m   : Silicon Labs
sy i p   : Bluetooth Xpress
sy i s   : 04047F00
sy o e   : 1
sy o p   : none
sy p     : 4
sy r e   : 1
sy r p   : none
sy s m   : deep
sy u     : <DMS.UUID here>
sy v     : BGX13P.1.1.1229.0-1229-1229
sy w c   : 1
tm n p   : 0
ua b     : 115200
ua f     : 0
uf u     : 
!  # Description
#  0 none ()
#  1 none ()
#  2 none ()
#  3 none ()

BLE Peripheral

bl a

BLE Address

Description

Returns the BLE device address.

AttributeDescription
format6-byte hex string, big-endian
defaultunique per device
accessget
saven/a

Get example

> get bl a
D0CF5E35E0D8

bl c c

BLE Connection Count

Description

Returns the number of centrals that are connected when acting as a peripheral. Will return 0 or 1.

AttributeDescription
formatinteger
unitscount
min0
max1
default0
accessget
saven/a

Get example

> get bl c c
0

bl c i

BLE Connection Interval

Description

BLE connection interval. See Bluetooth specification : Important Connection Parameters : Connection Interval, Supervision Timeout

Notes:

AttributeDescription
formatinteger
units1.25 ms
min6 (7.5 ms)
max3200 (4000 ms)
default12 (15 ms)
accessget/set
saveyes

Get example

> get bl c i
12

Set example

> set bl c i 10
Success

bl c t

BLE Connection Timeout

Description

BLE connection supervision timeout. See Bluetooth specification : Important Connection Parameters : Connection Interval, Supervision Timeout.

AttributeDescription
formatinteger
units10 ms
min10 (100 ms)
max3200 (32000 ms)
default400 (4000 ms)
accessget/set
saveyes

Get example

> get bl c t
400

Set example

> set bl c t 500
Success

bl d a

BLE Device Appearance

Description

BLE device appearance is a 16 bit integer that describes how the device appears to other devices. It is part of the GAP database. The default value of 512 corresponds to Generic tag, Generic category.

For other appearance values, see Bluetooth GAP Appearance.

AttributeDescription
formatinteger
unitsn/a
min0
max65535
default512
accessget/set
saveyes

Get example

get bl d a
512

Set example

set bl d a 512
Success

bl e b

BLE Encryption Bondable (mode)

Description

Enables or disable bonding. Encryption is always enabled for the Bluetooth Xpress module.

Note: The Bluetooth Xpress device can remember up to 14 devices in its internal bonding table. As new devices are added (beyond 14), older less used devices are forgotten.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default1
accessget/set
saveyes

Get example

> get bl e b
1

Set example

> set bl e b 1
Success

bl e k

BLE Encryption Key

Description

The BLE encryption key can be set to none or to a 6 digit pin. Entering more or less than 6 digits, or entering a pin with non-numeric characters other than 'none' will cause the command to fail. Encryption is always enabled on the Bluetooth Xpress module.

The key type determines the pairing procedure and security mode and level. See Security.

Note: if the key is set to none, and an Android phone requests a pin, use 000000.

AttributeDescription
format6-digit integer or 'none'
unitsn/a
min000000
max999999
default'none'
accessget/set
saveyes

Get example

> get bl e k
none

Set example

> set bl e k 123456
Success

bl e p

BLE Encryption Pairing (mode)

Version Notes

Starting at 1.1.1229.0 added new option "off" and changed the default from "secure" to "any".

Description

Determines the policy for new pairing requests. When set to off, all new pairing requests are rejected. Selecting secure enables pairing with LE Secure Connections (BLE 4.2 or newer) only, while any enables pairing with either secure or legacy methods. When any is selected LE Secure Connections will be used by default if supported by the connecting device. Encryption is always enabled on Bluetooth Xpress modules.

Note: This setting only applies to new pairing requests and does not affect devices that were previously bonded.

AttributeDescription
formatstring enumeration
units'secure'=secure only
'any'=secure or legacy
'off'=disabled
defaultany
accessget/set
saveyes

Get example

> get bl e p
secure

Set example

> set bl e p off
Success

bl p m

BLE PHY Multiplex

Version Notes

Added in 1.1.1229.0

Description

Selects whether the peripheral advertises on one or multiple PHY's. When enabled the peripheral will advertise on both the LE 1M and LE Coded PHY's. When disabled the peripheral will advertise on one PHY determined by PHY preference setting bl p p.

Note: The BGX only supports one connection at a time. Once a connection is established on any PHY, advertising is automatically disabled on all enabled PHY's.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default0
accessget/set
saveyes

Get example

> get bl p m
0

Set example

> set bl p m 1
Success

bl p p

BLE PHY Preference

Version Notes

Beginning with version 1.1.1229.0, added new options 125k and 500k. Also changed the preferred PHY requester from the BGX peripheral to the central device (phone or BGX).

Description

Specifies the PHY preference for BLE GAP procedures. When either 1m or 2m is selected the device will advertise, scan and initiate connections using the BLE 1M PHY. If the central device (phone or BGX) has been configured to prefer the BLE 2M PHY, it will start a procedure to switch PHY's once a connection is established.

When either 125k or 500k is selected the device will advertise, scan and initiate connections using the BLE Coded PHY (S=8). For both central and peripheral devices, selecting 500k only affects the transmit direction. After a connection is established using the BLE Coded PHY (S=8), the transmit PHY will switch to the BLE Coded PHY (S=2).

It is possible to advertise on both the 1M and Coded PHY's at the same time. Use bl p m to enable this feature.

Notes:

AttributeDescription
formatstring enumeration
units'1m'=1M PHY
'2m'=2M PHY
'125k'=Coded PHY(S=8)
'500k'=Coded PHY(S=2)
default1m
accessget/set
saveyes

Get example

> get bl p p
1m

Set example

> set bl p p 2m
Success

bl t c

BLE Transmit Connected (power)

Description

Configures the RF transmit power when connected.

AttributeDescription
formatinteger
unitsdBm
min-25
max8
default8
accessget/set
saveyes

Note: The BGX uses its low power amplifier when the transmit power setting is below 0 dBm. The low power amplifier only supports several discrete power settings below 0 dBm. For this reason, negative output power values will result in an actual output power that does not exactly match the value specified.

Get example

> get bl t c
8

Set example

> set bl t c 4
Success

bl v h d

BLE adVertising High Duration

Description

Configures high mode advertising duration. This is the duration in seconds for which advertising continues after issuing the adv high command. See BLE Advertising.

AttributeDescription
formatinteger
unitsseconds
min0 (advertise forever)
max1000
default30
accessget/set
saveyes

Get example

> get bl v h d
30

Set example

> set bl v h d 40
Success

bl v h i

BLE adVertising High Interval

Description

Configures high mode advertising interval, used for the adv command high option. The interval is measured in slots. For example, an interval of 32 means advertise in slot 0, then 32, then 64 and so on. Valid range: 32 - 16384 slots inclusive.

AttributeDescription
formatinteger
unitsslots
min32
max16384
default32
accessget/set
saveyes

Get example

> get bl v h i
32

Set example

> set bl v h i 50
Success

bl v l d

BLE adVertising Low Duration

Description

Configures low mode advertising duration. This is the duration in seconds for which advertising continues after issuing the adv low command. See BLE Advertising.

AttributeDescription
formatinteger
unitsseconds
min0 (advertise forever)
max1000
default0 (forever)
accessget/set
saveyes

Get example

> get bl v l d
0

Set example

> set bl v l d 350
Success

bl v l i

BLE adVertising Low Interval

Description

Configures low mode advertising interval, used for the adv command low option. The interval is measured in slots. For example, an interval of 32 means advertise in slot 0, then 32, then 64 and so on. Valid range: 32 - 16384 slots inclusive.

AttributeDescription
formatinteger
unitsslots
min32
max16384
default874
accessget/set
saveyes

Get example

> get bl v l i
874

Set example

> set bl v l i 64
Success

!-- structElement:varHeading -->

bl v x d

BLE adVertising Xpress Duration

Description

Configures Xpress mode advertising duration. This is the duration in seconds for which advertising continues after issuing the adv xpr command. See BLE Advertising.

AttributeDescription
formatinteger
unitsseconds
min1
max180
default30
accessget/set
saveyes

Get example

> get bl v x d
30

Set example

> set bl v x d 40
Success

bl v x i

BLE adVertising Xpress Interval

Description

Configures Xpress mode advertising interval, used for the adv command xpr option. The interval is measured in slots. For example, an interval of 32 means advertise in slot 0, then 32, then 64 and so on. Valid range: 32 - 16384 slots inclusive.

AttributeDescription
formatinteger
unitsslots
min32
max16384
default32
accessget/set
saveyes

Get example

> get bl v x i
32

Set example

> set bl v x i 64
Success

bl v m

BLE adVertising Mode

Version Notes

xpr value added in 1.2.2045.0.

Description

Get peripheral advertising mode, as set by the adv command.

AttributeDescription
formatstring enumeration
units'high'=adv high mode
'low'=adv low mode
'xpr'=adv xpress mode
'off'=no advertising
default'high'
accessget
saven/a

Get example

> get bl v m
high

bl v p

BLE adVertising Preference

Version Notes

Added in 1.1.1229.0

xpr argument added in 1.2.2045.0.

Description

Selects which advertising mode is entered whenever exiting a non-advertising mode (sleep, connection, scan, etc.).

AttributeDescription
formatstring enumeration
units'high'=adv high mode
'low'=adv low mode
'xpr'=adv xpress mode
'off'=no advertising
default'high'
accessget/set
saveyes

Get example

> get bl v p
low

Set example

> set bl v p off
Success

Bus

bu i

Bus Initialization (mode)

Description

Serial bus initialization mode for str_select. If GPIO option str_select is used, and it is configured for edge mode (see bu s c), then this option determines the initial mode of the serial bus (COMMAND or STREAM).

Notes:

AttributeDescription
formatstring enumeration
units'stream'=stream mode
'command'=command mode (remote command mode locked out)
default'command'
accessget/set
saveyes

Get example

> get bu i
command

Set example

> set bu i stream
Success
> save
Success

bu s c

Bus Serial Control

Description

Serial bus switch control mode for str_select. If GPIO option str_select is used, then this option is used to determine whether the pin switching is edge or level mode for selecting serial bus STREAM or COMMAND mode.

If bu s c is set to edge, a rising edge on the str_select pin toggles the mode. The initial bus mode after reset can be configured (see bu i).

If bu s c is set to level, the serial bus mode is selected by driving a constant high or low logic level onto the str_select pin. In level mode a low level selects COMMAND mode and a high level selects STREAM mode.

Note: The str_select pin is configured with the GPIO function command.

AttributeDescription
formatstring enumeration
units'edge'=rising edge toggle on str_select
'level'=mode selected by logic level
default'level'
accessget/set
saveyes

Get example

> get bu s c
level

Set example

> set bu s c edge
Success

bu s s

Bus Stream (breakout) Sequence

Description

Set a new bus stream breakout sequence. Sending the breakout sequence when in STREAM mode places the device in local COMMAND mode. To disable the breakout sequence, set to none. See Serial Bus Modes.

In order to be seen as a breakout condition, the breakout sequence must be preceded and followed by idle periods of at least 500 milliseconds on the BGX UART's Rx line. The amount of time between each character in the breakout sequence must be less than 255 bit times or 4 milliseconds, whichever is shorter.

Due to these timing constraints, it is generally not possible to send the breakout sequence by manually typing it into a terminal. Instead, a terminal program with the capability to send macros should be used.

Note: Setting to 00 sets the breakout sequence to the hexadecimal 0x00, corresponding to the ASCII NULL character.

Note: The breakout sequence does not work reliably for serial data rates less than 5000 bits per second.

AttributeDescription
formatup to 4-byte hex string
default242424 ('$$$')
accessget/set
saveyes

Get example

> get bu s s
242424

Set example

Set breakout sequence to ASCII characters "BRK"

> set bu s s 42524b
Success

Disable breakout sequence:

> set bu s s none

Central

ce c c

Central Connection Count

Description

Returns the number of peripherals connected when acting as a central. Will return 0 if not connected, and 1 if connected.

AttributeDescription
formatinteger
unitscount
min0
max1
default0
accessget
saven/a

Get example

> get ce c c
0

ce s h d

Central Scan High Duration

Description

Configures central scan high mode duration. This is the duration in seconds for which scan continues after issuing the scan high command.

AttributeDescription
formatinteger
unitsseconds
min0 (scan forever)
max1000
default30
accessget/set
saveyes

Get example

> get ce s h d
30

Set example

> set ce s h d 40
Success

ce s h i

Central Scan High Interval

Version Notes

Starting with version 1.1.1229.0, if scanning is configured to use the BLE Coded PHY, the configured scan interval values are automatically tripled.

Description

Configures central high mode scanning interval, used for the scan command high option.

AttributeDescription
formatinteger
unitsslots
min4
max16384
default96
accessget/set
saveyes

Get example

> get ce s h i
96

Set example

> set ce s h i 1000
Success

ce s l d

Central Scan Low Duration

Description

Configures central low mode scanning duration. This is the duration in seconds for which scanning continues after issuing the scan low command.

AttributeDescription
formatinteger
unitsseconds
min0 (scan forever)
max1000
default300
accessget/set
saveyes

Get example

> get ce s l d
300

Set example

> set ce s l d 350
Success

ce s l i

Central Scan Low Interval

Version Notes

Starting with version 1.1.1229.0, if scanning is configured to use the BLE Coded PHY, the configured scan interval values are automatically tripled.

Description

Configures low mode scanning interval, used for the scan command low option.

AttributeDescription
formatinteger
unitsslots
min4
max16384
default2048
accessget/set
saveyes

Get example

> get ce s l i
2048

Set example

> set ce s l i 64
Success

ce s m

Central Scan Mode

Description

With this device acting as a Central, returns scan mode, as set by the scan command.

AttributeDescription
formatstring enumeration
units'high'=scan high mode
'low'=scan low mode
'off'=no scanning
default'off'
accessget
saven/a

Get example

> get ce s m
off

ce w m

Central Write Mode

Version Notes

Starting with version 1.2.2045.0, the ack setting uses Fast-Ack Flow Control instead of Legacy Flow Control (see Xpress Streaming Service Flow Control). The noack setting is not recommended, because the ack setting guarantees data integrity while achieving 90%-95% the throughput of the noack setting. The noack setting is still available to maintain backwards-compatibility with existing BGX applications.

Description

This variable controls whether the connection requires acknowledgement on writes.

AttributeDescription
formatstring enumeration
units'ack'=use write acknowledgement
'noack'=do not use acknowledgment
default'ack'
accessget/set
saveyes

Get example

> get ce w m
ack

Get example

> set ce w m noack
Success

GPIO

gp u

GPIO Usage

Description

Get GPIO usage. See the GPIO function command for a description of configurable and automatically assigned GPIO functions.

By default get gp u displays the function and the direction set by the gdi or gdis commands. For example:

> gfu 5 stdio
Success
> gdi 5 ipu
Success
> gfu 6 stdio
Success
> gdi 6 ohi
Success
> get gp u
!  # Description
...
#  5 stdio,ipu
#  6 stdio,ohi
...

To view the pin mode and extra options set by the gdi command set this variable to verbose. To change back to the shorter display, set this variable to default.

> set gp u verbose
Success
> get gp u
!  # Description
    ...
#  5 stdio,ipu (ioz)
#  6 stdio,ohi (ioz,pp,drvst)
    ...
AttributeDescription
formattable list
units'default'=abbreviated display
'verbose'=detailed display
default'default'
accessget/set
saveno

Get example

> get gp u
!  # Description
#  0 stdio
#  1 stdio
#  2 none
#  3 none
#  4 none
#  5 none
#  6 none
#  7 none

I2C

i2 b s

I2C Bus Speed

Version Notes

Added in 1.2.2045.0

Description

I2C Master bus speed in kHz. This is the bus speed that will be used for the i2crd and i2cwr commands.

AttributeDescription
formatinteger
unitskHz
min10
max1000
default92
accessget/set
saveyes

Note: The ratio between the low period and high period of the clock pulses on i2cm_scl (Tlow:Thigh) varies at different I2C bus speed settings as shown in the table below:

i2 b sTlow:Thigh
i2 b s <= 921 : 1
93 <= i2 b s <= 3922 : 1
i2 b s >= 3933.67 : 1

Get example

> get i2 b s
92

Set example

> set i2 b s 1000
Success

System

sy c e

System Command Echo

Description

Enable/disable character echo.

Note! If character echo is turned off, keystrokes that are subsequently typed are not echoed to the serial interface (or terminal). This mode is primarily intended for machine control.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default1
accessget/set
saveyes

Get example

> get sy c e
1

Set example

> set sy c e 0
Success

sy c h

System Command Header

Description

Enable/disable a response header for commands. Only applies to command mode. Response headers make it easy to parse responses with a host MCU.

See Serial Interface, Response Format for the reponse header format.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default0
accessget/set
saveyes

Get example

> get sy c h
0

Set example

> set sy c h 1
Success

sy c m

System Command Mode

Description

Puts the Bluetooth Xpress command interface into human or machine mode. See Serial Interface, Configuration. Note! This variable is NOT readable.

AttributeDescription
formatstring enumeration
units'machine'=machine mode
'human'=human mode
default'human'
accessset
saveyes

Set example

> set sy c m machine
Success

sy c p

System Command Prompt

Description

Enable/disable terminal command prompt. Only applies to command mode. A prompt makes it easy for humans to interact with Bluetooth Xpress module.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default1
accessget/set
saveyes

Get example

> get sy c p
1

Set example

> set sy c p 1
Success

sy d n

System Device Name

Description

Bluetooth device name, up to 16 characters in length. Up to all 12 digits of the Bluetooth address from BD_ADDR may be substituted by hash # wildcard characters. The wildcard characters must be contiguous and the BD address will be right-justified within the field. See the examples below.

AttributeDescription
formatstring
min--
max16 characters length
default'BGX-####'
accessget/set
saveyes

Get example

> get bl a
4C55CCABCDEF
> get sy d n
BGX-CDEF

Set example

In the following examples the BD_ADDR address is 4C55CCABCDEF (see bl a)

> set sy d n ACK-##
Success
> get sy d n
ACK-EF
> set sy d n BGX###
Success
> get sy d n
BGXDEF
> set sy d n my######
Success
> get sy d n
myABCDEF
> set sy d n ###-DEV
Success
> get sy d n
DEF-DEV

sy i m

System Info Manufacturer

Description

Manufacturer string, up to 32 characters in length. Use double quotes to enter a name containing a space.

AttributeDescription
formatstring
min--
max32 characters length
default'Silicon Labs'
accessget/set
saveyes

Get example

> get sy i m
Silicon Labs

Set example

> set sy i m "Placeholder Name"
Success
> get sy i m
Placeholder Name

sy i p

System Info Product

Version Notes

Prior to 1.1.1229.0 the default value was "Blue Gecko Xpress"

Description

Product information string, up to 32 characters in length. Use double quotes to enter a name containing a space.

AttributeDescription
formatstring
min--
max32 characters length
default'Bluetooth Xpress'
accessget/set
saveyes

Get example

> get sy i p
Bluetooth Xpress

Set example

> set sy i p "Placeholder Product"
Success
> get sy i p
Placeholder Product

sy i s

System Indicator Status (setting)

Version Notes

Starting with version 1.2.2045.0 an additional blink pattern was added for attempting to connect/advertising.

Description

Set the blink pattern for the con_status_led pin function. The command takes 6 hexadecimal values AABBCCDDEEFF, where AA, BB, CC and DD are hex numbers in the range 00 to FF.

AABB sets the LED blink pattern when not connected. CCDD sets the LED blink pattern when connected. EEFF sets the blink pattern when attempting to connect (i.e. adv or con command is executing).

Note: For backwards compatibility, the EEFF portion of the variable can be omitted. When the variable is set using AABBCCDD, the connecting blink pattern will match the not connected blink pattern. For versions prior to 1.2.2045.0 the EEFF portion will not be accepted.

The low part of the blink pattern is set with AA when not connected (CC when connected, EE when attempting to connect).

The high period of the blink pattern is set with BB when not connected (DD when connected, FF when attempting to connect).

Each pattern tick equals 0.1 sec (100 msec).

Some examples:

Low = AA/CC/EEHigh = BB/DD/FFPeriodDuty CycleNotes
04040.80s50%1.25 Hz --- default blink pattern when not connected or attempting to connect
7f00---0%Always low --- default blink pattern when connected
01010.20s50%Fastest possible blink. Duty cycle = 50%
ffff51.0s50%Slowest possible blink. Duty cycle = 50%
1c043.20s12.5%Period = (28 + 4) x 0.1s, Duty cycle = 4/(28 + 4) x 100%
AttributeDescription
format6-byte hex string (4 bytes for legacy behavior)
units0.1 sec resolution per byte
min'00' per byte (inactive)
max'FF' per byte
default'04047F000404' (1.25 Hz blink when not connected or attempting to connect, always low when connected)
accessget/set
saveyes

Get example

> get sy i s        
04047F000404

Set example

Set to fastest blink when not connected, slower blink when connected.

> set sy i s 0101ffff0202
Success

sy o e

System OTA Enable

Description

Enable or disable OTA upgrades.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default1
accessget/set
saveyes

Get example

> get sy o e
1

Set example

> set sy o e 1
Success

sy o p

System OTA Password

Version Notes

This variable was added in 1.2.2045.0.

Description

Requires the remote device to provide a password to enable OTA firmware update.

If set to none, OTA is not protected by a password.

If set to a string, the remote device must provide a password when performing a firmware update.

AttributeDescription
formatUp to 16-character string
defaultnone
accessget/set
saveyes

Get example

> get sy o p
none

Set example

> set sy o p 123456
Success

sy p

System Print (level)

Description

System print level.

AttributeDescription
formatinteger
units0 = no messages
1 = synchronous system messages
2 = synchronous logging messages
3 = asynchronous system messages
4 = all/asynchronous logging messages
min0
max4
default4
accessget/set
saveyes

Get example

> get sy p
0

Set example

> set sy p 0
Success

sy r e

System Remote (commanding) Enabled

Version Notes

Restricted mode was added in version 1.2.2045.0.

Description

Enables/disables/restricts access to the Bluetooth Xpress module command interface from a remote terminal via the BLE interface (remote COMMAND mode).

If sy r e is set to 0, access to the command interface is restricted to the UART interface (local COMMAND mode). See Serial Interface.

If sy r e is set to 1, access to the command interface is enabled for remote COMMAND mode.

If sy r e is set to 2, access to the command interface is restricted to the following set of commands.

Remote Commands Allowed in Restricted Mode

CommandUsage
gdiset GPIO direction and pin mode (stdio)
gdisset direction for multiple GPIOs
gfuselect GPIO function
ggeget GPIO value (stdio)
ggesget multiple GPIO values
gseset GPIO value (stdio)
gsesset multiple GPIO values
i2crdI2C read
i2cwrI2C write
rssidisplay RSSI value for current connection
strswitch to stream mode
vershow version
AttributeDescription
formatinteger
units0=disabled, 1=unrestricted, 2=restricted (GPIO and I2C only)
min0
max2
default1
accessget/set
saveyes

Get example

> get sy r e
1

Set example

> set sy r e 1
Success

sy r p

System Remote (commanding) Password

Version Notes

This variable was added in 1.2.2045.0.

Description

Requires that the remote device use a password to access the Bluetooth Xpress module's command interface from a remote terminal via the BLE interface (remote COMMAND mode).

If set to none, remote COMMAND mode is not protected by a password (although is can still be disabled or restricted via sy r e).

If set to a string, specifies the password that the remote device must use when issuing the rbmode remote command to access the module's command interface remotely.

AttributeDescription
formatup to 16-character string
defaultnone
accessget/set
saveyes

Get example

> get sy r p
none

Set example

> set sy r p 123456
Success

sy s m

System Sleep Mode

Description

Sets the sleep mode to be entered by the Bluetooth Xpress module. See Power Management for more information.

AttributeDescription
formatstring enumeration
units'deep' = stop all active advertising and scanning operations when entering sleep mode
'radio' = continue all active advertising and scanning operations when entering sleep mode
default'deep'
accessget/set
saveyes

Get example

> get sy s m
deep

Set example

> set sy s m radio
Success

sy u

System UUID

Description

Returns the hardware UUID of the module.

AttributeDescription
format20-byte hex string
defaultunique per device
accessget
saven/a

Get example

> get sy u
0D06EA434C55CC01B10B1411081309007E615F0A

sy v

System (firmware) Version

Description

Returns the Bluetooth Xpress firmware version.

AttributeDescription
formatstring
defaultvaries
accessget
saven/a

This is the variable equivalent of the ver command. Refer to the ver command for a description of the version fields.

Get example

> get sy v
BGX13.1.0.821.0-1229-821

sy w c

System Wake on CTS

Description

Enables/disables waking the device from sleep mode when a falling edge is detected on the UART CTS pin.

UART baud rate (ua b) must be greater than 9600 bps for the device to wake from sleep on a falling edge of CTS. If the baud rate is 9600 bps or less, the UART interface is operational in sleep mode, so CTS retains its normal function as a flow control signal and cannot be used as a wake pin. In this scenario, the user can issue the wake command (wake) to put the device into active mode.

See Power Management for more information on power modes.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default1
accessget/set
saveyes

Get example

> get sy w c
1

Set example

> set sy w c 0
Success

Test Mode

tm n p

Test Mode Number of Packets

Description

This variable reports the number of packets that were transmitted or received between the dtm start and dtm stop commands. It is set to 0 when dtm start runs and records total packets when dtm stop runs.

See Test mode (dtm) for more details.

AttributeDescription
formatinteger
unitscount
min0
max65535
default0
accessget
saven/a

Get example

> get tm n p
0

UART

ua b

UART Baud

Description

Sets the UART baud rate.

Note: The new data rate does not take effect until the user issues the uartu command.

AttributeDescription
formatinteger
unitsbits per second
min0
max2000000
default115200
accessget/set
saveyes

Get example

> get ua b
115200

Set example

> set ua b 115200
Success

ua f

UART Flow control

Description

Turn on/off UART hardware flow control.

Note: The new flow control setting does not take effect until the user issues the uartu command.

AttributeDescription
formatinteger
units1=true/enabled, 0=false/disabled
min0
max1
default0
accessget/set
saveyes

Get example

> get ua f
1

Set example

> set ua f 0
Success

User Function

uf l p

User Function Long-Press Duration

Description

Configures the minimum length of time a ufu_level pin configured to trigger a hi_long or lo_long user event (see uevt command) must remain high (for hi_long) or low (for lo_long) in order for the event to be seen as a long-press rather than a short-press.

AttributeDescription
formatinteger
units100 milliseconds
min1 (100 milliseconds)
max100 (10 seconds)
default20 (2 seconds)
accessget/set
saveyes

Get example

> get uf l p
20

Set example

> set uf l p 30
Success

uf u

User Function Usage

Description

User functions and the events that trigger them are displayed using this read-only variable. This multi-line variable behaves similar to the gpio "gp u" variable.

AttributeDescription
formattable list
accessget
saven/a

Get example

> get uf u
!  # Description
#  0 lo,3 (con D0CF5E35E0D8 10)
#  1 hi,3 (dct)
#  2 none ()
#  3 none ()