Bus

bus.command.read_timeout

Abbreviationbu c t
Accessget/set

Description

Controls the maximum amount of time that the read command waits to complete a read.

The amount of data to be read is specified in the parameters of the read command.

Note: a timeout still returns success.

Arguments

<timeout ms> where:

Default

100 Range: 0 - 65535

Properties

Supported Platforms

Get example

> get bu c t
R000005
100

Set example

> set bu c t 256
R000008
Set OK

bus.command.rx_bufsize

Abbreviationbu c r
Accessget/set

Description

Configure the size of the UART rx buffer in command mode.

Arguments

<buffer size>

Default

256 (bytes) Range 256 to 10000 bytes

Properties

Supported Platforms

Get example

> get bu c r
R000005
256

Set example

> set bu c r 512
R000008
Set OK

bus.command.write_timeout

Abbreviationbu c w
Accessget/set

Description

Controls the maximum amount of time the write command blocks waiting for more data to be read from the data bus.

Note: On timeout the command fails.

Arguments

<timeout ms> where:

Default

25000 Range: 0 - 65535 ms

Properties

Supported Platforms

Get example

> get bu c w
R000007
25000

Set example

> set bu c w 60000
R000008
Set OK

bus.data_bus

Abbreviationbu d
Accessget/set

Description

The serial data bus to use for communication with a host.

Arguments

<uart0/uart1>

Default

<platform dependent>

Properties

Supported Platforms

Get example

> get bu d
R000007
uart1

Set example

> set bu d uart0
R000008
Set OK

bus.log_bus

Abbreviationbu l
Accessget/set

Description

All log messages are sent to this serial bus regardless of bus mode.

Arguments

<uart0/uart1>

Default

<platform dependent>

Properties

Supported Platforms

Get example

> get bu l
R000007
uart1

Set example

> set bu l uart0
R000008
Set OK

bus.mode

Abbreviationbu m
Accessget/set

Description

The serial bus mode.

Arguments

<command/stream>

Default

command

Properties

Supported Platforms

Get example

> get bu m
R000009
command

Set example

> set bu m command
R000008
Set OK

bus.stream.cmd_gpio

Abbreviationbu s g
Accessget/set

Description

The GPIO used to force the module into command mode (from stream mode). A value of -1 disables this feature.

Arguments

<[GPIO#]/[-1]>

Default

0

Properties

Supported Platforms

Get example

> get bu s g
R000003
0

Set example

> set bu s g 6
R000008
Set OK

bus.stream.cmd_seq

Abbreviationbu s s
Accessget/set

Description

Break-in sequence for stream mode. After 3 seconds of inactivity on the serial interface, sending the break-in sequence changes stream mode to command mode; send 'exit' to return to stream mode.

Note: The length of the break-in sequence affects the allowed minimum value of bus.stream.flush_count.

This feature may be disabled with the following command:

set bus.stream.cmd_seq ""

When disabled, the break-in sequence is disabled. This allows for binary data streams or for any streams which may be interpreted incorrectly as the break-in sequence.

Note: If this feature is disabled it's strongly recommended to enable bus.stream.cmd_gpio and/or another remote command feature, such as the remote terminal or the ZentriOS Web App.

Otherwise the ZentriOS command console will be inaccessible until the module is factory reset.

Arguments

<1-15 characters>

Default

$$$

Properties

Supported Platforms

Get example

> get bu s s
R000005
$$$

Set example

> set bu s s ###
R000008
Set OK

bus.stream.flush_count

Abbreviationbu s c
Accessget/set

Description

Number of bytes received on the serial bus before flushing to the network stream.

Arguments

<count> where <count> can range from minimum value to maximum value:

Default

1460

Properties

Supported Platforms

Get example

> get bu s c
R000006
1460

Set example

> set bu s c 1450
R000008
Set OK

bus.stream.flush_time

Abbreviationbu s t
Accessget/set

Description

Timeout in milliseconds before bytes are automatically flushed to the network stream.

If set to 0, automatic flush is disabled.

To achieve optimal throughput, set flush time to 0. ZentriOS transfers data with 'Zero Copy'. i.e. a data packet is directly transferred from the bus to network or network to bus.

Arguments

<0-65535>

Default

50

Properties

Supported Platforms

Get example

> get bu s t
R000004
20

Set example

> set bu s t 10
R000008
Set OK

bus.stream.flush_time_reset

Abbreviationbu s r
Accessget/set

Description

Flag whether to reset the flush timer if data is received before the flush timeout expires. When this variable is set and data is streaming, data is flushed only when the buffer is full. This allows for efficient use of the packet buffer and prevents packet fragmentation. When the variable is reset, the buffer is flushed at intervals of bus.stream.flush_time and also when the buffer is full. This allows data to be sent at consistent intervals.

Arguments

<1/0>

Default

0

Properties

Supported Platforms

Get example

> get bus.stream.flush_time_reset
0

Set example

> set bus.stream.flush_time_reset 1
Set OK