User Tools


Link to this comparison view

2.0:variables [2015/09/15 07:35] (current)
Line 1: Line 1:
 +====== TruConnect Variable Reference ======
 +
 +This page provides a list of TruConnect 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 [[commands#​save]] command. Some variables impact the operation of the entire system. A [[commands#​save]] and [[commands#​reboot]] is required before new settings for these types of variables take effect.
 +
 +===== Documentation Format =====
 +Many of the TruConnect responses shown in the examples on this page were captured with system print level ([[variables#​sy_p|sy p]]) = all, and system command header enabled ([[variables#​sy_c_h|sy c h]]) = 1. These settings are provided to make it easy for a host microcontroller to parse responses by examining response headers. The response headers appear first in the response output and are similar to R000009. ​
 +
 +Documentation for each variable is provided in the format shown below.
 +<​html><​h3 class="​truconnect_cmd_var_heading">​variable </h3> </​html>​
 +
 +|Brief Description|A one-line variable description|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +A description of variable function. ​                               ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +A full list of mandatory and optional arguments. ​                  
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +The factory reset default value. ​                                  
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +An example of how to read the variable, including response codes.  ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +An example of how to write the variable, including response codes (for writeable variables). ​
 +
 +
 +**NOTE!** Don't forget to check out [[commands#​cmd_nav_tips|command navigation tips]] to make it easier to find and type specific variable names.
 +
 +
 +<​BOOKMARK:​variable_list> ​
 +===== List of Variables ===== 
 +  * **All Variables** ​
 +    * [[#al|al]] --- all variables
 +  * **BLE Peripheral**<​BOOKMARK:​bl_list> ​   ​
 +    * [[#bl_a|bl a]] --- BD address
 +    * [[#​bl_c_c|bl c c]] --- connection count
 +    * [[#​bl_e_e|bl e e]] --- encryption enabled
 +    * [[#​bl_e_k|bl e k]] --- encryption key
 +    * [[#​bl_s_u|bl s u]] --- service UUID
 +    * [[#​bl_t_a|bl t a]] --- transmit power (advertising)
 +    * [[#​bl_t_c|bl t c]] --- transmit power (connection)
 +    * [[#​bl_v_d_b|bl v d b]] --- advertising data, generic beacon content
 +    * [[#​bl_v_d_f|bl v d f]] --- advertising data format
 +    * [[#​bl_v_d_g|bl v d g]] --- advertising data, GPIO mask
 +    * [[#​bl_v_d_i|bl v d i]] --- advertising data, iBeacon content
 +    * [[#​bl_v_h_d|bl v h d]] --- advertising high duration
 +    * [[#​bl_v_h_i|bl v h i]] --- advertising high interval ​   ​
 +    * [[#​bl_v_l_d|bl v l d]] --- advertising low duration
 +    * [[#​bl_v_l_i|bl v l i]] --- advertising low interval
 +    * [[#​bl_v_m|bl v m]] --- advertising mode
 +  * **Bus**<​BOOKMARK:​bus_list> ​   ​
 +    * [[#bu_i|bu i]] --- bus initialization mode
 +    * [[#​bu_s_c|bu s c]] --- bus serial control level or edge sensitivity
 +    * [[#​bu_s_s|bu s s]] --- bus stream breakout sequence
 +  * **BLE Central**<​BOOKMARK:​ce_list>​
 +    * [[#​ce_a_d|ce a d]] --- central auto-connect device
 +    * [[#​ce_c_c|ce c c]] --- connection count
 +    * [[#​ce_c_m|ce c m]] --- connection mode
 +    * [[#​ce_s_h_d|ce s h d]] --- central high scan duration
 +    * [[#​ce_s_h_i|ce s h i]] --- central high scan interval
 +    * [[#​ce_s_l_d|ce s l d]] --- central low scan duration
 +    * [[#​ce_s_l_i|ce s l i]] --- central low scan interval
 +    * [[#​ce_s_m|ce s m]] --- scan mode    ​
 +  * **GPIO**<​BOOKMARK:​gpio_list>​
 +    * [[#gp_u|gp u]] --- GPIO usage
 +  * **System**<​BOOKMARK:​system_list>​
 +    * [[#​sy_a_t|sy a t]] --- system activity timeout
 +    * [[#​sy_b_n|sy b n]] --- board name    ​
 +    * [[#​sy_c_e|sy c e]] --- command echo  ​
 +    * [[#​sy_c_h|sy c h]] --- command header ​     ​
 +    * [[#​sy_c_m|sy c m]] --- command mode
 +    * [[#​sy_c_p|sy c p]] --- command prompt enabled
 +    * [[#​sy_d_n|sy d n]] --- device name
 +    * [[#​sy_i_s|sy i s]] --- system indicator status LED blink behavior
 +    * [[#​sy_o_e|sy o e]] --- OTA enabled
 +    * [[#sy_p|sy p]] --- print level
 +    * [[#​sy_r_e|sy r e]] --- remote command enabled
 +    * [[#​sy_s_t|sy s t]] --- system go-to-sleep timeout
 +    * [[#sy_u|sy u]] -- system UUID
 +    * [[#sy_v|sy v]] -- firmware version
 +    * [[#​sy_w_t|sy w t]] -- system wakeup timeout
 +  * **UART**<​BOOKMARK:​uart_list>​
 +    * [[#ua_b|ua b]] --- UART baud
 +    * [[#ua_f|ua f]] --- UART flow
 +  * **User Storage**<​BOOKMARK:​us_list>​
 +    * [[#us_v|us v]] --- User storage
 +
 +===== Variable Description =====
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== All  ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​al>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​al ​ </h3> </​html>​
 +
 +|Brief Description|All variables|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns a list of all variables. This includes the list of GPIO settings returned by [[#gp_u|gp u]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get al
 +bl a     : 20737A129A42
 +bl c c   : 0
 +bl s u   : 175f8f23-a570-49bd-9627-815a6a27de2a
 +bl t a   : 0
 +bl t c   : 4
 +bl v m   : off
 +bl v h d : 30
 +bl v h i : 32
 +bl v l d : 300
 +bl v l i : 1024
 +bu i     : stream
 +bu s c   : edge
 +ce c c   : 0
 +ce c m   : none
 +ce s h d : 30
 +ce s h i : 96
 +ce s l d : 300
 +ce s l i : 2048
 +ce s m   : off
 +gp u     :
 +!  # Description
 +#  0 i2c_sda
 +#  1 i2c_scl
 +#  2 user_tx
 +#  3 none
 +#  4 none
 +#  5 user_rx
 +#  6 none,​factory
 +#  7 reserved
 +#  8 none
 +#  9 mode_sel
 +# 10 status_led
 +# 11 none
 +# 12 none
 +# 13 speaker
 +# 14 none
 +sy a t   : 300
 +sy b n   : AMS001-E01.2
 +sy c e   : 1
 +sy c h   : 0
 +sy c p   : 1
 +sy d n   : AMS-9A42
 +sy o e   : 1
 +sy p     : 4
 +sy r e   : 1
 +sy u     : 0D06EA434C55CC01B10B1411081309007E615F0A
 +sy v     : TruConnect-1.5.0.18,​ Built:Mar 19 2015 14:03:19, Module:N/A, Board:N/A
 +ua b     : 115200
 +ua f     : 0
 +us v     :
 +</​code>​
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== BLE Peripheral ​ ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_a>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl a </h3> </​html>​
 +
 +|Brief Description|BD address|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Get BLE device address ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl a
 +R000014
 +4C55CC129A42</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_c_c>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl c c</​h3>​ </​html>​
 +
 +|Brief Description|Connection count|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns the number of centrals connected when acting as a peripheral. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +-
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl c c
 +R000003
 +0</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_e_e>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl e e</​h3>​ </​html>​
 +
 +|Brief Description|BLE encryption enabled|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +BLE encryption enabled. ​
 +
 +Set the encryption key if required with [[#​bl_e_k|bl e k]].
 +
 +The key type determines the pairing procedure and security mode and level. See [[security|Security]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +<​code><​0/​1></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl e e
 +R000003
 +0</​code>​
 +
 +<​code>​
 +> set bl e e 1
 +Success</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_e_k>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl e k</​h3>​ </​html>​
 +
 +|Brief Description|BLE encryption key|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +BLE encryption key. This can be set to ''​none'',​ to a 6 digit pin, or to a 128 bit hex string (32 hex digits).
 +
 +BLE encryption must be enabled.See [[#​bl_e_e|bl e e]].
 +
 +The key type determines the pairing procedure and security mode and level. See [[security|Security]].
 +
 +**Note**: if the key is set to ''​none'',​ and an Android phone requests a pin, use ''​000000''​. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code>​none|<​6 digit pin code>​|<​128 bit hex string></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code><​empty></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl e k
 +R000003
 +none</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +<​code>​
 +> set bl e k 00112233445566778899AABBCCDDEEFF
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_s_u>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl s u</​h3>​ </​html>​
 +
 +|Brief Description|Service UUID|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures the peripheral service UUID. Also used as the default service UUID for the [[commands#​scan]] command. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​UUID></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl s u
 +R000038
 +175f8f23-a570-49bd-9627-815a6a27de2a</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl s u 175f8f23-a570-49bd-9627-815a6a27de2a
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_t_a>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl t a</​h3>​ </​html>​
 +
 +|Brief Description|Transmit power (advertising) |
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures the RF transmit power when advertising. Units: dBm, range -25 to 4. \\ Used in conjunction with [[variables#​bl_t_c|bl t c]]. Connecting at higher power than advertising helps to provide a more stable connection. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​advertising_power_dbm></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl t a
 +R000003
 +4
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl t a 0
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_t_c>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl t c</​h3>​ </​html>​
 +
 +|Brief Description|Transmit power (connection)|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures the RF transmit power when connected. Units: dBm, range -25 to 4. \\ Used in conjunction with [[variables#​bl_t_a|bl t a]]. Connecting at higher power than advertising helps to provide a more stable connection.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​connection_power_dbm></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​4</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl t c
 +R000003
 +0
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl t c 4
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_d_b>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v d b</​h3>​ </​html>​
 +
 +|Brief Description|BLE generic beacon data|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set the data for the BLE generic beacon (manufacturer specific data). You can set all 31 octets of the beacon data.
 +
 +Requires [[#​bl_v_d_f|bl v d f]] = ''​b''​.
 +
 +The beacon must be formatted according to the Bluetooth specification. See http://​www.bluetooth.org,​ Bluetooth v4 Core Specification:​ Vol. 3, Part C, sections 8 and 11, and Core Specification Supplement, Part A, section 1.4. 
 +
 +Note that a typical generic beacon starts with a flags structure, followed by a manufacturer data structure. See [[advertising#​example_generic_beacon|Example Generic Beacon]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​data></​code>​
 +
 +  * ''<​data>''​ is specified as hex bytes with no preceding ''​0x''​
 +  ​
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +<​code>​-</​code>​
 +(empty)
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v d b
 +R000002
 +
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v d b 0201051bff460200112233445566778899aabbccddeeff0011223344556677
 +Success</​code>​
 +
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_d_f>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v d f</​h3>​ </​html>​
 +
 +|Brief Description|BLE advertising beacon format|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set the format for BLE advertising. See [[advertising|Advertising]].
 +
 +A range of possible formats is available.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​format></​code>​
 +where the currently available formats are shown below. For each format you can set field-specific information with variables as shown:
 +
 +^ Format ​  ^ Description ​                       ^ Variable ^
 +|**b** ​    | advertise generic beacon ​          | [[#​bl_v_d_b|bl v d b]] - Set generic beacon data.|
 +|**i** ​    | advertise iBeacon ​                 |[[#​bl_v_d_I|bl v d i]] - Set iBeacon values|
 +|**s** ​    | advertise service ID and name      | [[#​bl_s_u|bl s u]] - Set service UUID \\  [[#​sy_d_n|sy d n]] - Set device name|
 +|**s,​g** ​  | advertise service ID and name. \\ The value of digital GPIOs is sent as a hex value in the scan response packet | [[#​bl_s_u|bl s u]] - Set service UUID \\  [[#​sy_d_n|sy d n]] - Set device name \\  [[#​bl_v_d_g|bl v d g]] - Set GPIO mask|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +<​code>​s</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v d f
 +R000003
 +s</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v d f s,g
 +Success</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_d_g>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v d g</​h3>​ </​html>​
 +
 +|Brief Description|BLE beacon GPIO mask|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set the BLE beacon GPIO mask. 
 +
 +Requires [[#​bl_v_d_f|bl v d f]] = ''​s,​g''​.
 +
 +See [[advertising|Advertising]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​mask></​code>​
 +
 +  * ''<​mask>''​ is specified as two hex bytes representing 16 bits, with no preceding ''​0x''​. Each bit corresponds to a GPIO, with GPIO 0 represented as the least significant bit. For example, ''​0020''​ masks all but GPIO 5.  ​
 +  ​
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +<​code>​FF</​code>​
 +(no GPIO is masked)
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v d g
 +R000008
 +0x00ff
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v d g 00FF
 +Success</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_d_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v d i</​h3>​ </​html>​
 +
 +|Brief Description|BLE ibeacon content|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set the BLE iBeacon content. iBeacon is a protocol standardised by Apple and introduced at the Apple Worldwide Developers Conference in 2013.
 +
 +Requires [[#​bl_v_d_f|bl v d f]] = ''​i''​.
 +
 +See [[advertising|Advertising]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​UUID>,<​major>,<​minor></​code>​
 +
 +iBeacon content is specified as a string in a specific format: ''<​UUID>,<​major>,<​min>''​.
 +  * ''<​UUID>''​ - the 128-bit UUID is specified as a string of 16 hex octets with hyphen separators after octets 4, 6, 8 and 10, as shown in the examples below. See http://​www.bluetooth.org,​ Bluetooth v4 Core Specification:​ Vol. 3, Section 3.2 for details of UUID format.
 +  * ''<​major>''​ - 2 hex octets with or without preceding ''​0x''​
 +  * ''<​minor>''​ - 2 hex octets with or without preceding ''​0x''​
 +  ​
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +<​code>​FF</​code>​
 +(empty)
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v d i
 +R000052
 +e2c56db5-dffb-48d2-b060-d0f5a71096e0,​0x0000,​0x0000
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v d i e2c56db5-dffb-48d2-b060-d0f5a71096e0,​0001,​0002
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_h_d>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v h d</​h3>​ </​html>​
 +
 +|Brief Description|Advertising high duration|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures high mode advertising duration. This is the duration in seconds for which advertising continues after issuing the [[commands#​adv|adv high]] command. Valid range: 0 - 1000 seconds. A value of 0 means advertise forever.
 +
 +See [[advertising|Advertising]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​duration></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​30</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v h d
 +R000004
 +30</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v h d 40
 +R000009
 +Success</​code>​
 +
 +<!-- %%pageBreakAfter%% -->
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_h_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v h i</​h3>​ </​html>​
 +
 +|Brief Description|Advertising high interval|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures high mode advertising interval, used for the [[commands#​adv|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 - 8000 slots inclusive.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​interval></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​32</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v h i
 +R000004
 +32</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v h i 50
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_l_d>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v l d</​h3>​ </​html>​
 +
 +|Brief Description|Advertising low duration|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures low mode advertising duration. This is the duration in seconds for which advertising continues after issuing the [[commands#​adv|adv low]] command. Valid range: 0 - 1000 seconds inclusive. A value of 0 means advertise forever.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​duration></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code>​
 +(Advertise in low mode forever)
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v l d
 +R000004
 +300</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v l d 350
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_l_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v l i</​h3>​ </​html>​
 +
 +|Brief Description|Advertising low interval|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures low mode advertising interval, used for the [[commands#​adv|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 - 8000 slots inclusive.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​interval></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​1024</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v l i
 +R000004
 +1024</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bl v l i 64
 +R000009
 +Success</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bl_v_m>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bl v m</​h3>​ </​html>​
 +
 +|Brief Description|Advertising mode|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Get peripheral advertising mode, as set by the [[commands#​adv|adv ]] command.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl v m
 +R000006
 +high
 +</​code>​
 +
 +
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== Bus  ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bu_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bu i</​h3>​ </​html>​
 +
 +|Brief Description|Bus initialization mode|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Serial bus initialization mode. The mode in which the bus initializes on boot up. 
 +
 +**Note**: Save before reboot, or changes will be lost. See [[serial_interface|Serial Interface]].
 +
 +To control the bus mode of a remote peripheral TruConnect module, see [[.commands#​rbmode]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​stream/​command</​code>​
 +
 +^ bu i value    ^ Description ​                        ^ Interface in Control ​                       ^
 +| ''​command'' ​  | Initialize to Local COMMAND mode    |Serial interface (remote locked out)         ​| ​
 +| ''​stream'' ​   | Initialize to STREAM mode           ​|Serial or Remote interface ​                  ​| ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>''​stream''</​code>​
 +
 +**Note**: The serial bus mode depends on the ''​mode_sel''​ GPIO configuration. See [[serial_interface#​manual_and_automatic_bus_mode_selection|Serial Interface, Manual and Automatic Bus Mode Selection]]. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bu i
 +R000008
 +stream</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bu i command
 +R000009
 +Success
 +> save
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bu_s_c>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bu s c</​h3>​ </​html>​
 +
 +|Brief Description|Bus serial control level or edge sensitivity|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +The serial bus control variable determines how the serial bus is switched between STREAM mode and COMMAND mode. If ''​bu s c''​ is set to ''​edge'',​ a rising edge on the ''​mode_sel''​ pin toggles modes. If however ''​bu s c''​ is set to ''​level'',​ the serial bus mode is selected by driving a constant high or low logic level onto the ''​mode_sel''​ pin. \\ \\ The ''​mode_sel''​ pin is configured with the [[commands#​gfu|GPIO function]] command.  ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​edge/​level></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​level</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bu s c
 +R000006
 +edge
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set bu s c edge
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​bu_s_s>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​bu s s</​h3>​ </​html>​
 +
 +|Brief Description|Set bus stream breakout sequence|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +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 ''​0''​. Note that this is distinct from setting the value ''​00''​. Setting to ''​00''​ sets the breakout sequence to the hexadecimal ''​0x00'',​ corresponding to the ASCII NULL character. ​
 +
 +See [[./​serial_interface#​serial_bus_modes|Serial Bus Modes]]. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code>​ <​sequence></​code>​
 +where:
 +  * ''<​sequence>''​ is provided as hexadecimal numbers, corresponding to a string of ASCII characters. \\ Minimum length: 1 byte; Maximum length: 4 bytes. \\ For example, the value ''​616263''​ sets the sequence to the ASCII string ''​abc''​.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​242424</​code>​
 +This correspondings to the ASCII characters "​$$$"​.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bu s s
 +R000008
 +242424
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +Set breakout sequence to ASCII characters "​BRK"​
 +<​code>​
 +> set bu s s 42524b
 +R000009
 +Success
 +</​code>​
 +
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== Central ​ ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_a_d>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce a d</​h3>​ </​html>​
 +
 +|Brief Description|Central auto-connect device|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set BD_ADDR or device name of peripheral to which central automatically connects.
 +
 +To disable connection, set to ''​0''​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code>​[<​BD_ADDR>/<​device name>​]</​code>​
 +where:
 +  * ''​BD_ADDR'':​ BD address of device to which central automatically connects
 +  * ''<​device name>'':​ device name of device to which central automatically connects \\ Maximum device name length: 8 bytes
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce a d
 +R000003
 +0</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ce a d 4C55CC129A42 ​
 +R000009
 +Success</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_c_c>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce c c</​h3>​ </​html>​
 +
 +|Brief Description|Central connection count|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns the number of peripherals connected when acting as a central. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce c c
 +R000003
 +0</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_c_m>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce c m</​h3>​ </​html>​
 +
 +|Brief Description|Central connection mode|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns the connection mode when connected with a peripheral. ​
 +
 +Connection modes are:
 +  * ''​none'': ​ no connection
 +  * ''​low'': ​  ​connected with low connection interval
 +  * ''​high'': ​ connected with high connection interval
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce c m
 +R000006
 +none</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_s_h_d>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce s d</​h3>​ </​html>​
 +
 +|Brief Description|Central scan high duration|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures central scan high mode duration. This is the duration in seconds for which scan continues after issuing the [[commands#​scan|scan high]] command. Valid range: 0 - 1000 seconds.
 +
 +If ''<​duration>''​ = 0, scan forever at the specified rate.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​duration></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​300</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce s h d
 +R000004
 +30</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ce s h d 40
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_s_h_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce s h i</​h3>​ </​html>​
 +
 +|Brief Description|Central scan high interval|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures central high mode scanning interval, used for the [[commands#​scan|scan ]] command ''​high''​ option. Valid range: 96-8000, Default: 96
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​interval></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​96</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce s h i
 +R000004
 +96</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ce s h i 1000
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_s_l_d>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce s l d</​h3>​ </​html>​
 +
 +|Brief Description|Advertising low duration|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures central low mode scanning duration. This is the duration in seconds for which scanning continues after issuing the [[commands#​scan|scan low]] command. Valid range: 0 - 1000 seconds inclusive.
 +
 +If ''<​duration>''​ = 0, scan forever at the specified rate.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​duration></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​300</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce s l d
 +R000004
 +300</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ce s l d 350
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_s_l_i>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce s l i</​h3>​ </​html>​
 +
 +|Brief Description|Advertising low interval|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Configures low mode scanning interval, used for the [[commands#​scan|scan ]] command ''​low''​ option. Valid range: 96-8000: Default 2048
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​interval></​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​2048</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce s l i
 +R000004
 +1024</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ce s l i 64
 +R000009
 +Success</​code>​
 +
 +-----
 +
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ce_s_m>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ce s m</​h3>​ </​html>​
 +
 +|Brief Description|Central scan mode|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +With this device acting as a Central, returns scan mode, as set by the [[commands#​scan|scan]] command. Values:
 +  * off:  no scan
 +  * low:  low scan
 +  * high: high scan
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ce s m
 +R000005
 +off
 +</​code>​
 +
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== GPIO  ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​gp_u>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​gp u </h3> </​html>​
 +
 +|Brief Description|GPIO usage|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Get GPIO usage. See the [[commands#​gfu|GPIO function]] command for a description of configurable and automatically assigned GPIO functions. ​
 +
 +For GPIOs set to the ''​stdio''​ function, ''​get gp u''​ displays the function and the direction set by the [[commands#​gdi]] or [[commands#​gdis]] commands. For example:
 +<​code>​
 +> gfu 9 stdio
 +Success
 +> gdi 9 ipu
 +Success
 +> gfu 10 stdio
 +Success
 +> gdi 10 ohi
 +Success
 +> get gp u
 +!  # Description
 +...
 +#  9 stdio,ipu
 +# 10 stdio,ohi
 +...
 +</​code>​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +-
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +-
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get gp u
 +R000220
 +!  # Description
 +#  0 i2c_sda
 +#  1 i2c_scl
 +#  2 user_tx
 +#  3 none
 +#  4 none
 +#  5 user_rx
 +#  6 none,​factory
 +#  7 reserved
 +#  8 none
 +#  9 mode_sel
 +# 10 status_led
 +# 11 none
 +# 12 none
 +# 13 speaker
 +# 14 none
 +</​code>​
 +
 +-----
 +<!-- structElement:​varGroupHeading -->
 +==== System ​ ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_a_t>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy a t </h3> </​html>​
 +
 +|Brief Description|System activity timeout|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Specify a period of inactivity on the BLE and UART interfaces. After the ''​system activity timeout''​ elapses it may trigger power management features as follows. ​
 +
 +The ''​system activity timeout''​ triggers entry to low power advertising mode. See [[.power_management#​low_power_advertising_mode|Power Management, Low Power Advertising Mode]].
 +
 +The ''​activity''​ GPIO may be configured to respond to the ''​system activity timeout''​. See the [[.commands#​gfu| gfu (GPIO function)]] command.
 +If configured, the ''​activity''​ GPIO goes high on PoR, and on any UART or BLE activity, and remains high for the duration specified by ''​system activity timeout''​. ​ After no interface activity for the specified duration, the ''​activity''​ GPIO goes low. See [[.power_management#​activity_gpio_function_and_system_activity_timeout|Power Management, activity GPIO and system activity timeout]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​duration in seconds></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​300</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy a t
 +R000005
 +300
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy a t 400
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_b_n>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy b n </h3> </​html>​
 +
 +|Brief Description|System board name|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 + ​Configure board name. Maximum length: 16 characters ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​name></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​ <board name> </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy b n
 +R000014
 +AMS001-E01.2
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy b n MyWahoo
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_c_e>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy c e </h3> </​html>​
 +
 +|Brief Description|System command echo|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +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. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​0/​1>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0 </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy c e
 +R000003
 +1
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy c e 0
 +R000009
 +Success
 +</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_c_h>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy c h </h3> </​html>​
 +
 +|Brief Description|System command header|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Enable/​disable a response header for commands. Only applies to command mode. Response headers make it easy to parse responses with a host MCU.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​0/​1>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0 </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy c h
 +R000003
 +1
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy c h 1
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_c_m>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy c m </h3> </​html>​
 +
 +|Brief Description|System command mode|
 +|Access|set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Puts the TruConnect command interface into human or machine mode. See [[serial_interface#​configuration|Serial Interface, Configuration]]. \\ Note! This variable is NOT readable.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code>​ <​human/​machine>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​human</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy c m machine
 +R000009
 +Success
 +</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_c_p>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy c p </h3> </​html>​
 +
 +|Brief Description|System command prompt enabled|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Enable/​disable terminal command prompt. Only applies to command mode. A prompt makes it easy for humans to interact with TruConnect. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​0/​1>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​1 </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy c p
 +R000003
 +1
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy c p 1
 +R000009
 +Success
 +</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_d_n>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy d n </h3> </​html>​
 +
 +|Brief Description|System device name|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Bluetooth device name, up to 8 characters in length. The last 2 to 6 characters from the [[variables#​bl_a|BD_ADDR]] may be substituted for # wildcards supplied in the final characters of the name. See the following examples.  ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​name[#​]>​ </​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​AMS-####​ </​code> ​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get bl d
 +4C55CCABCDEF
 +> get sy d n
 +R000010
 +AMS-CDEF
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +In the following examples the BD_ADDR address is ''​4C55CCABCDEF''​ (see [[#bl_a|bl a]])<​code>​
 +> set sy d n ACK-##
 +R000009
 +Success
 +> get sy d n
 +R000008
 +ACK-EF
 +> set sy d n ACKme###
 +R000009
 +Success
 +> get sy d n
 +R000009
 +ACKmeDEF
 +> set sy d n my######
 +R000009
 +Success
 +> get sy d n
 +R000010
 +myABCDEF </​code>​
 +
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_i_s>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy i s</​h3>​ </​html>​
 +
 +|Brief Description|System indicator status LED blink behavior|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Set the blink pattern of the system indication status LED. 
 +
 +This can be used in power management. See [[.power_management|Power Management]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​AABBCCDD>​ </​code>​
 +where AA, BB, CC and DD are hex numbers in the range ''​00''​ to ''​7F''​.
 +
 +AABB sets the LED blink pattern when **not** connected.
 +
 +CCDD sets the LED blink pattern when connected. ​
 +
 +The low part of the blink pattern is set with AA when not connected (or CC when connected).
 +
 +The high period of the blink pattern is set with BB when not connected (or DD when connected).
 +
 +The minimum high or low period is 0.125s (125ms).
 +
 +Some examples: ​
 +
 +^ Low = AA/CC ^ High = BB/DD ^ Period ^ Duty Cycle ^ Notes ^
 +| 01 | 01 | 0.25s | 50%     | Fastest possible blink. Duty cycle = 50%                  |
 +| 04 | 04 | 1.00s | 50%     | 1 Hz --- **default** blink pattern when not connected ​    |
 +| 00 | 7f | .     | 100%    | Always on --- **default** blink pattern when connected ​   |
 +| 1c | 04 | 4.00s | 12.5%   | period = (28 + 4 = 32) x 0.125, duty cycle = 100*4/​(28+4) | 
 +| 7f | 7f | 31.75s| 50%     | Slowest possible blink. Duty cycle = 50%                  |
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0404007f</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy i s
 +0404007f
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +Set to fastest blink when not connected, slowest blink when connected.
 +<​code>​
 +> set sy i s 01017f7f
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_o_e>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy o e </h3> </​html>​
 +
 +|Brief Description|System OTA enabled|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Enable/​disable OTA upgrades. 1: enabled; 0: disabled ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​1/​0>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​1 </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy o e
 +R000003
 +1
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy o e 1
 +Success
 +</​code>​
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_p>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy p </h3> </​html>​
 +
 +|Brief Description|System print level|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +System print level. Print levels: ​
 +  * ''​0''​ - None
 +  * ''​1''​ - Synchronous system msgs
 +  * ''​2''​ - Synchronous logging msgs
 +  * ''​3''​ - Asynchronous system msgs
 +  * ''​4/​all''​ - Asynchronous logging msgs
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​[0-4]/​[all]>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​all </​code> ​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy p
 +R000003
 +0
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy p 0
 +R000009
 +Success</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_r_e>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy r e </h3> </​html>​
 +
 +|Brief Description|System remote command enabled|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Enables/​disables access to the TruConnect command interface from a remote terminal via the BLE interface (remote COMMAND mode). If [[variables#​sy_r_e|sy r e]] is set to 0, access to the command interface is restricted to the UART interface (local COMMAND mode). See [[.serial_interface|Serial Interface]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code>​1/​0</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​1</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy r e
 +R000003
 +1
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy r e 1
 +Success
 +</​code>​
 +
 +<​BOOKMARK:​sy_s_t>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy s t </h3> </​html>​
 +
 +|Brief Description|System go-to-sleep timeout|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +The module automatically goes to sleep after a timeout period of the specified ''<​seconds>''​. The timeout countdown restarts when a wake event occurs. ​
 +
 +Module go-to-sleep is delayed while data is available on the connection.
 +
 +The minimum timeout is 10 seconds. This provides time, while the module is awake, to issue a command to set ''​sy s t''​ to ''​0'',​ which prevents the module cycling back to sleep.
 +
 +A save and reboot is required before the sleep timeout is enabled.
 +
 +See [[.power_management#​sleep_or_wake_on_timeout|Power Management, Sleep or Wake on Timeout]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​seconds></​code>​
 +
 +Range: 0 or 10 to 86400 
 +
 +Set to ''​0''​ to disable go-to-sleep.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy s t
 +R000003
 +0
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy s t 10
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_u>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy u </h3> </​html>​
 +
 +|Brief Description|System UUID|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns the hardware UUID of the module. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy u
 +R000042  ​
 +0D06EA434C55CC01B10B1411081309007E615F0A ​
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_v>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy v </h3> </​html>​
 +
 +|Brief Description|Firmware version|
 +|Access|get|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Returns the TruConnect firmware version. ​
 +
 +This is the variable equivalent of the [[.commands#​ver|ver]] command.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy v
 +TruConnect-1.5.0.1,​ Built:Feb 23 2015 16:50:00, Module:N/A, Board:​AMS001-E01.2
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​sy_w_t>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​sy w t </h3> </​html>​
 +
 +|Brief Description|System wakeup timeout|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +The module automatically wakes from sleep after timeout ''<​seconds>''​ from the moment of going to sleep. ​
 +
 +''​0''​ disables auto-wakeup on a timer. ​
 +
 +A save and reboot is required before the sleep timeout is enabled.
 +
 +See [[.power_management#​sleep_or_wake_on_timeout|Power Management, Sleep or Wake on Timeout]].
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​seconds></​code>​
 +
 +Range: 0 to 86400 
 +
 +Set to ''​0''​ to disable wakeup.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0</​code> ​
 +
 +<!-- %%pageBreakAfter%% -->
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get sy w t
 +R000003
 +0
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set sy w t 3600
 +Success
 +</​code>​
 +
 +
 +-----
 +
 +
 +<!-- structElement:​varGroupHeading -->
 +==== UART  ====
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ua_b>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ua b </h3> </​html>​
 +
 +|Brief Description|UART baud|
 +|Access|get/​set|
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Sets the UART baud rate. The <baud rate> argument must be one of the following standard rates: 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200, 128000, 153600, 230400, 256000, 460800, 921600, 1000000, 1500000. ​
 +
 +**Get arguments** -
 +**Set arguments** <​code><​baud rate></​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​115200 </​code> ​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ua b
 +R000008
 +115200
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ua b 115200
 +R000009
 +Success
 +</​code>​
 +
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​ua_f>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​ua f </h3> </​html>​
 +
 +|Brief Description|UART flow|
 +|Access|get/​set|
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Turn on/off UART hardware flow control. ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​1/​0>​ </​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​0 </​code> ​
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get ua f
 +R000003
 +1</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set ua f 0
 +R000009
 +Success
 +</​code>​
 +
 +-----
 +
 +<!-- structElement:​varHeading -->
 +<​BOOKMARK:​us_v>​
 +<​html><​h3 class="​truconnect_cmd_var_heading">​us v </h3> </​html>​
 +
 +|Brief Description|User storage|
 +|Access|get/​set|
 +
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Description</​span></​html>​
 +
 +Allows storage and retrieval of up to 32 bytes (256 bits) of arbitrary user information.
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Arguments</​span></​html>​
 +
 +<​code><​user_info></​code> ​
 +
 +<!-- %%pageBreakAfter%% -->
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Default</​span></​html>​
 +
 +<​code>​-</​code> ​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Set example</​span></​html>​
 +
 +<​code>​
 +> set us v 32_bytes_of_my_user_information!
 +Success
 +</​code>​
 +
 +<​html><​span class="​truconnect_cmd_var_sub">​Get example</​span></​html>​
 +
 +<​code>​
 +> get us v
 +32_bytes_of_my_user_information!</​code>​
 +
 +