Device Commands
Last updated
Was this helpful?
Last updated
Was this helpful?
Toggles the status of the host adapter's echoing back of received characters. This is useful for manual control when the serial console application does not provide local echo functionality. Echo is turned off by default on device power-on.
Parameters:
This function takes no parameters.
Response:
This function returns an after toggling the status of the echo setting.
Example Usage:
Returns an ACK response, useful in testing the status of the serial connection.
Parameters:
This function takes no parameters.
Response:
This function returns an .
Example Usage:
Gets/Sets the display base. The host adapter is able to use binary, decimal, or hex numeric bases for displaying values. The default value is HEX
(Base-16).
Set display base value: +BASE [base]
Get display base value: +BASE ?
Parameters:
For Binary (Base-2) display, set base to BIN
or 2
For Decimal (Base-10) display, set base toDEC
or 10
For Hexadecimal (Base-16) display, set base to HEX
or 16
To query the current setting value, set base to ?
Response:
Get: This function returns -BASE
followed by either BIN
, DEC
, or HEX
Example Usage:
Gets/Sets the color of the status LED. The RGB Status LED is user-programmable and can be especially helpful for indicating status during testing or identifying host adapters when multiple devices are being used simultaneously.
Set the LED color to preset color: +LED [color]
Set the LED color to RGB values: +LED [red] [green] [blue]
Parameters:
The following are valid values for color:
OFF
WHITE
RED
GREEN
or LIME
BLUE
YELLOW
CYAN
or AQUA
MAGENTA
or FUCHSIA
or PURPLE
The values for red, green, and blue parameters are unsigned 8-bit integers from 0 to 256. Values outside of this range will be truncated to 8-bits.
Response:
Example Usage:
Gets/Sets the mode of operation (protocol) for a given "core" of the Binho Multi-Protocol USB Host Adapter. The default value is IO
.
Set display base value: +MODE [coreIndex] [opMode]
Get display base value: +MODE [coreIndex] ?
Parameters:
For IO operating mode, set opMode to IO
For SPI operating mode, set opMode to SPI
For I2C operating mode, set opMode to I2C
or IIC
For 1-WIRE operating mode, set opMode to 1WIRE
or 1-WIRE
or ONEWIRE
For SWI operating mode, set opMode to SWI
or SINGLEWIRE
For UART operating mode, set opMode to UART
or USART
or SERIAL
To query the current operating mode, set opMode to ?
Response:
Get: This function returns -MODE
followed by [coreIndex]
followed by either IO
, SPI
, I2C
, UART
, 1WIRE
, or SWI
.
Example Usage:
Gets the globally-unique identifier of the host adapter. This identifier is very useful when working with multiple host adapters.
Parameters:
This function takes no parameters.
Response:
This function returns -ID
followed by the 256-bit globally-unique device identifier. Note that the response is always displayed in base-16 (hexadecimal) regardless of the base setting.
Example Usage:
Gets the version of the firmware running on the host adapter. This can be used to determine if the latest firmware version is installed or if the host adapter should be updated.
Parameters:
This function takes no parameters.
Response:
This function returns -FWVER
followed by the [major].[minor].[build]
number of the firmware . Note that the response is always displayed in base-10 (decimal) regardless of the base setting.
Example Usage:
Gets the version of the host adapter hardware. This is useful to programmatically determine which host adapter product hardware is connected.
Parameters:
This function takes no parameters.
Response:
This function returns -HWVER
followed by the [major].[minor]
identifier of the hardware . Note that the response is always displayed in base-10 (decimal) regardless of the base setting.
Example Usage:
Resets the host adapter, all settings return to defaults.
Parameters:
This function takes no parameters.
Response:
This function returns -OK
. Note that immediately following the transmission of the response, the host adapter will reset, which will cause the serial connection with the computer to be lost.
Depending on the implementation of the serial console application, an Error may be raised due to the lost connection before the response to this command has been received/displayed.
Example Usage:
Parameters:
This function takes no parameters.
Response:
This function returns -OK
. Note that immediately following the transmission of the response, the host adapter will reset, which will cause the serial connection with the computer to be lost. The device will then enumerate as a mass storage device.
Depending on the implementation of the serial console application, an Error may be raised due to the lost connection before the response to this command has been received/displayed.
Example Usage:
Set: This function returns an if the command succeeds. If an invalid value is provided, the function will return a .
This function returns an if the command succeeds. If an invalid value is provided, the function will return a .
Set: This function returns an if the command succeeds. If an invalid value is provided, the function will return a .
Resets the host adapter and restart in bootloader mode. The host adapter must be in bootloader mode in order to update the device firmware. While in the bootloader, the device is not available over the serial / Virtual COM port. Instead, it will enumerate as a USB Mass Storage Device. More details about firmware update can be found in the section of this guide.