Charge Station Documenation Help

Command Line Reference

Implemented commands only.

bd

Provides a breakdown of the architecture of the device, showing all hubs and ports.

Syntax

bd

Response

Key value pairs, one per line.

Parameter

Description

Ports

Number of USB ports

Sync

1=has sync capability

Temp

1=has temperature measuring capability

EXTPSU

1=uses an external PSU

The attachments section can have the following:

Parameter

Value

Description

Nodes

n

Number of USB hub nodes

Node i Type

type

i indicates node number


type indicates the node type

Node i Ports

n

Number of ports on the node

Displays

n

Number of LED display modules

Display i LEDs

n

Number of LEDs on the display module

For Hub i Port p:

Value

Description

Hub j

Hub i has a downstream hub j connected to port p

Control port

Hub i has a USB serial port attached to port p

Expansion port

Hub i has an expansion port attached to port p

Nodes types

Type

Description

HUB

USB 2.0 hub

Example response

Ports: 8 Sync: 1 Temp: 0 EXTPSU: 1 Console: LCD, LED Nodes: 2 Node 1 Type : HUB Node 1 Ports : 4

bist_check

Run the internal built-in self check.

Syntax

bist_check

Response

Self check information

boot_mode

Switch the device into boot mode. This allows the firmware on the device to be updated.

Syntax

boot_mode {enable|disable}

Dverify

Check that the device is communicating correctly, by returning an ACK response

Syntax

Dverify

Response

ACK

echo

Repeat the provided text back.

Syntax

echo text

Example

echo Hello, world response:

Hello, world

en_profile

Enable or disable a charging profile, applied to all ports.

Syntax

en_profile i e

Parameter

Description

Value

i

Profile number

See charging profiles

e

Enable flag

1=enabled


0=disabled

Example

Disable charging profile 2 on all ports:

en_profile 2 0

No profiles enabled

If all profiles are disabled, the product operates in biased mode. Device detection will work, but no charging will take place.

Response

No response

get_device_name

Return the Datamation product number

Syntax

get_device_name

Example response

U16

get_profiles

This command shows the charging profile assigned to a port.

Syntax

get_profiles p

Parameter

Description

p

Port number, starting at 1

Response

Each port profile is listed on its own line, showing enabled or disabled

Example response

1: enabled 2: enabled 3: enabled 4: enabled 5: disabled 6: disabled

health

Show status information for the device.

Syntax

health

Response

A list of key:value pairs, one per line.

Key

Description

Value

Value Description

5V Now

Current supply voltage

5V Min

Lowest supply voltage seen

5V Max

Highest supply voltage seen

5V Flags

Supply voltage error flags

No errors

5OV

Supply has gone over maximum acceptable voltage

5UV

Supply has gone under minimum acceptable voltage

Temperature Now (C)

Current device temperature

Temperature Max (C)

Highest PCB temperature seen

Temperature Flags

Temperature error flags

No errors

OT

Device has exceeded maximum working temperature

Example response

>> health System up for: 1248 seconds 5V Now: 5.3V 5V Min: 5.25V 5V Max: 5.55V 5V Flags: Temperature Now (C): 32 Temperature Max (C): 85.0 Temperature Flags: OT

host

The device monitors if a host computer is attached to the sync socket. In auto mode, the device automatically changes into sync mode.

Running the host command without any parameters will display whether a host computer is attached.

Syntax

host [mode]

Example response

Present: yes Mode change: auto

Mode parameter

Mode

Description

auto

All populated ports change automatically into sync mode when a host is connected

manual

Only commands are used to change port modes, the presence of a host has no effect on this.

id

Get information on the hardware and firmware of the device.

Syntax

id

Response

One line of text containing a comma separated list of key:value pairs.

mfr,mode,hw,hwid,fw,rd,rdfw,sn

Name

Value

mfr

Manufacturer name

mode

Firmware operating mode

hw

Hardware part number

hwid

Hex value identifying the product

fw

Firmware version number

sn

Device serial number

Example response

mfr:Datamation Systems,mode:main,hw:U16,hwid:01,fw:38,sn:12345

led

The led command assigns an RGB colour and flash bit pattern to an individual port LED.

Syntax

led port rgb ptn [control]

ledb

The ledb command assigns a flash bit pattern to an individual port LED.

Syntax

ledb port row ptn [control]

Parameter

Description

port

Port number, starting at 1

row

LED row number, as below

ptn

LED pattern code. Binary numbers should end with b, hexadecimal numbers with h.

control

H: takes control of the LED without a remote command


R: releases the LED back to normal operation.

Rows types

Row

LED function

1

Charged

Green

2

Charging

Red

3

Sync mode

Blue (only when host connected)

Examples

To flash the charging LED on port 8 at 50/50 duty cycle, use:

ledb 8 2 11110000b

To turn on the port 1 charged LED continuously (i.e. no flashing):

ledb 1 1 ffh

To turn off the port 1 sync LED:

ledb 1 3 0

Response

None

leds

The leds command assigns flash pattern to one row of LEDs. This allows, for example, the charging LED on all ports to be set at once.

Syntax

ledb row [ptnstr]

See the row types in the ledb command for row numbers. The pattern string contains flash pattern characters, one per port.

Example

To set the row 1 LEDs:

leds 1 x1fp0111

Response

No response

list_profiles

Returns the list of globally enabled charging profiles.

Syntax

list_profiles

Response

A list of profiles, one per row, showing whether they are enabled.

Example response

1: enabled 2: enabled 3: enabled 4: enabled 5: disabled 6: disabled

logc

Display the current usage for all ports at a set time interval. Logging can be stopped by sending q or \<ETX\>

Syntax

logc seconds

seconds is the number of seconds between responses, from 1-32767

Response

A comma separated list of current consumption for each port, rounded to the nearest mA

Example response

0, 540, 0, 0, 0, 1134, 0, 0

logp

Display the power usage for all ports at a set time interval. Logging can be stopped by sending q or \<ETX\>

Syntax

logp seconds

seconds is the number of seconds between responses, from 1-32767

Response

A comma separated list of power consumption for each port, in Watts

Example response

0, 5.1, 0, 0, 0, 9.3, 0, 0

mode

Set the mode of a port.

Syntax

mode m [p] [cp]

Parameter

Description

m

"Mode" character

p

Port number

cp

Charging profile

See here for a list of port modes and here for a list of charging profiles.

Response

Empty response.

q

Stop output from log commands.

qa

Display the current port connection status as a continuous log. Used for QA purposes.

Response

One character per port.

Character

Description

.

No device attached

A

Attached

C

Charging

X

Finished charging

read_device_id

Show the unique identifier for the microprocessor

Syntax

read_device_id

Response

Hexadecimal device ID

read_revision_id

Show the revision identifier for the microprocessor

Syntax

read_revision_id

Response

Hexadecimal revision ID

read_serial_number

Show the Datamation device serial number

Syntax

read_serial_number

Response

Serial number

read_system_voltage

Show the current system voltage.

Syntax

read_system_voltage

Response

Current system voltage

Example response

System Voltage: 5.3V

reboot

Reboot the product.

Syntax

reboot

remote

The LEDs on the device normally operate automatically. Remote mode allows the automatic working to be disabled and the LEDs to be set directly using commands.

Syntax

When remote mode is entered, all LEDs are turned off.

remote [mode]

Parameter

Description

empty

Enter remote mode

exit/kexit

Leave remote mode and restore normal LED operation

Response

No response

reset

Same as settings_reset

set_profiles

Info

Syntax

set_profiles p [cp]

Parameter

Description

p

Port number, starting at 1

cp

Charging profile

To assign all system profiles to a port, issue set_profiles without a list of profiles.

Examples

To set profiles 2 and 3 for port 5:

set_profiles 5 2 3

To assign all profiles to port 8:

set_profiles 8

Response

No response

settings_display

Shows the current product settings.

Syntax

settings_display

Response

Each setting parameter is displayed as a settings_set command.

settings_reset

Reset all settings back to factory defaults.

Syntax

settings_reset

Response

Settings Reset

settings_set

Set an internal settings value.

Syntax

settings_set mandatory [optional]

Response

No response

settings_unlock

Unlock the settings for writing. Must be used before settings_set and settings_reset.

Syntax

settings_unlock

Response

Unlocked

show_remote_device_info

Show information on the LED board (remote device)

Syntax

show_remote_device_info

state

Show the state of each port.

Response

One row per port, in this format:

p, current_mA, flags, profile_id, time_charging, time_charged, energy

system

Display system information (hardware code, firmware version etc.)

Last modified: 05 February 2025