Skip to content

VCP interface

hartytp edited this page Sep 17, 2019 · 11 revisions

Booster provides a virtual COM (USB-serial) interface primarily used for debugging purposes. Users will generally not need to use this interface.

The serial port operates at 115200k Baud (8n1).

You can open a connection to the VCP using the python miniterm console by running python -m serial.tools.miniterm <dev> 115200 where <dev> is the VCP address (typically /dev/ttyACM0 on Linux or a COM on Windows). To find the device address, run python -m serial.tools.list_ports -v and look for a port with a description like desc: STM32 Virtual ComPort in FS Mode. Once you've connected to the device, use the help command to see a list of options.

Command help

Type help <command> to print detailed help (if available)

Commands

devid

Print device unique id

> devid
[devid] 002300213436470832383539

reboot

Reboot device


version

Print software version information

> version
RFPA v1.4.19252 582a7bc, built Sep  9 2019 18:24:23, hv rev 3

bootloader

Enters DFU bootloader


eepromr

Read module EEPROM address

eepromr usage:
eepromr <channel id> <address>

Used to read selected channel module EEPROM memory.

> eepromr 5 0  
[eepromr] EEPROM reg[0] = 2

eepromw

Write module EEPROM address

eepromw usage:
eepromw <channel id> <address> <data>

Used to write to selected channel module EEPROM memory.

> eepromw 5 0 2  
[eepromw] EEPROM reg[0] = 2  

task-stats

Display task info

> task-stats
Task            State   Priority        Stack   #
**************************************************
CLI             R       1               565     5
IDLE            R       0               488     8
RF Interlock    B       4               328     7
CH MEAS         B       2               681     9
DHCP            B       1               325     3
FAN             B       0               687     1
CH INFO         S       1               757     10
UDPServer       S       3               2219    4
ADC             S       3               720     2
Ext             S       2               478     6

start

Start the watch thread


stop

Stop the watch thread


ifconfig

Change or display network settings

ifconfig usage:
ifconfig - display network configuration info
ifconfig dhcp - enable DHCP
ifconfig <ip src> <gw ip> <netmask> - set static network address

> ifconfig
[log] ===== W5500 NET CONF : DHCP =====
[log]   MAC:    80:1F:12:56:69:ED
[log]   IP:     192.168.95.156
[log]   GW:     192.168.95.254
[log]   SN:     255.255.255.0
[log] =======================================

macconfig

Change network MAC address

macconfig usage:
macconfig default - restore original MAC address
macconfig XX:XX:XX:XX:XX:XX - sets selected MAC address


enable

Enable selected channel mask

enable usage:
enable <channel mask> - enable specified channel with bitmask. eg 255 enables all channels = 11111111

> enable 1
[enable] Enabled 1 channel mask

disable

Disable selected channel mask

disable usage:
disable <channel mask> - disable specified channel with bitmask. eg 255 disables all channels = 11111111

> disable 1
[disable] Disabled 1 channel mask

bias

Set channel bias voltage DAC value

bias usage:
bias <channel> <value> - sets specified DAC value for selected channel in order to adjust bias current.

Changes are not saved to EEPROM

> bias 0 4095
[bias] DAC value = 4095

int

Set output interlock by raw value

int usage:
int <channel> <value> - sets raw value to output interlock comparator

> int 0 4095
[int] Interlock value = 4095

intv

Set output interlock by power level

intv usage:
intv <channel> <power> - sets value for output interlock comparator based on output power

> intv 4 36.0
[intv] Interlock value for 36.00 = 3176

chanid

Display channel UUID

> chanid 0
[chanid] 0 = 801F12561D4C

dac

Set module DAC channel values

dac usage: dac <channel> <dac_channel> <value> - sets selected channel DAC values. DAC channel range 0-1, value 0-65535


detected

Return detected channel bit mask

> detected
[detected] 223

enabled

Show enabled and sigon channel masks

> enabled
[enabled] 0 0

status

Display channel brief status

> status 0
[status] e=0 s=0 r1=27 r2=9 tx=0.000 rf=0.000 curr=0.000 t=27.00 i=0.02 ip=-26.11

i2cdetect

Detect I2C devices on selected channel

i2cdetect usage:
i2cdetect <channel> - scan I2C bus for selected channel

> i2cdetect 1
[i2c_scan] start
[i2c_scan] Found I2C device at 8
[i2c_scan] Found I2C device at E
[i2c_scan] Found I2C device at 2C
[i2c_scan] Found I2C device at 2E
[i2c_scan] Found I2C device at 2F
[i2c_scan] Found I2C device at 48
[i2c_scan] Found I2C device at 49
[i2c_scan] Found I2C device at 4A
[i2c_scan] Found I2C device at 4C
[i2c_scan] Found I2C device at 4D
[i2c_scan] Found I2C device at 50
[i2c_scan] Found I2C device at 51
[i2c_scan] Found I2C device at 52
[i2c_scan] Found I2C device at 53
[i2c_scan] Found I2C device at 54
[i2c_scan] Found I2C device at 55
[i2c_scan] Found I2C device at 56
[i2c_scan] Found I2C device at 57
[i2c_scan] Found I2C device at 70
[i2c_scan] end

clearint

Clear interlock status of selected channel
clearcal usage:
clearcal <channel> - clear selected channel interlock. If channel number is left blank all channel interlocks are cleared

> clearint
[clear] cleared all
> clearint 1
[clear] cleared 1

i2cw

Write I2C on selected channel
i2cw usage:
i2cw <channel> <address> <data> - write one byte to selected channel address


i2cr

Read I2C on selected channel
i2cr usage:
i2cw <channel> <address> - read one byte from selected channel address


currents

Return list of all P30V currents

> currents
[currents] 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000

powercfg

Configure powering channels after boot. 0 means that channels won't be enabled after startup, 1 will enable all available channels after boot.

> powercfg 0
[powercfg] set 0

fanlevel

Configure minimum fan level (in %) while any channels are enabled. When all channels are off, the fans are turned off. The actual fan level is determined by a control loop, which attempts to stabilize the temperature inside Booster. Fan levels below 15% result in the fans being turned off completely, since the fans themselves do not work well at such low speeds.

> fanlevel 30 
[fanlevel] set 30

i2cerr

Display i2c bus communication errors for each channel

> i2cerr
                #0      #1      #2      #3      #4      #5      #6      #7
I2C ERR         0       0       0       4       0       0       0       0

i2creset

Performs i2c peripherial reset

> i2creset
Resetting I2C bus