Device Commands
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 ACK Response after toggling the status of the echo setting.
Example Usage:
+ECHO-OKReturns an ACK response, useful in testing the status of the serial connection.
Parameters:
This function takes no parameters.
Response:
This function returns an ACK Response.
Example Usage:
+PING-OKGets/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
BINor2 - For Decimal (Base-10) display, set base to
DECor10 - For Hexadecimal (Base-16) display, set base to
HEXor16 - To query the current setting value, set base to
?
Response:
Set: This function returns an ACK Response if the command succeeds. If an invalid value is provided, the function will return a NAK Response.
Get: This function returns -BASE followed by either BIN, DEC, or HEX
Example Usage:
+BASE BIN-OK
+BASE DEC-OK
+BASE HEX-OK
+BASE 2-OK
+BASE 10-OK
+BASE 16-OK
+BASE OCT-NG
+BASE ?-BASE HEXGets/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:
OFFWHITEREDGREENorLIMEBLUEYELLOWCYANorAQUAMAGENTAorFUCHSIAorPURPLE
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:
This function returns an ACK Response if the command succeeds. If an invalid value is provided, the function will return a NAK Response.
Example Usage:
+LED RED-OK
+LED BLUE-OK
+LED OFF-OK
+LED 255 128 128-OK
+LED 255 0-NG
+LED ORANGE-NG
+LED 333 128 128-OKGets/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
I2CorIIC - For 1-WIRE operating mode, set opMode to
1WIREor1-WIREorONEWIRE - For SWI operating mode, set opMode to
SWIorSINGLEWIRE - For UART operating mode, set opMode to
UARTorUSARTorSERIAL - To query the current operating mode, set opMode to
?
Response:
Set: This function returns an ACK Response if the command succeeds. If an invalid value is provided, the function will return a NAK Response.
Get: This function returns -MODE followed by [coreIndex] followed by either IO, SPI, I2C, UART, 1WIRE, or SWI.
Example Usage:
+MODE 0 IO-OK
+MODE 0 SPI-OK
+MODE 1 SPI-NG
+MODE 0 I2C-OK
+MODE 0 ?-MODE 0 I2C
+MODE 0 MODBUS-NGGets the globally-unique identifier of the host adapter. This identifier is 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. The response is always displayed in base-16 (hexadecimal) regardless of the base setting.
Example Usage:
+ID-ID 0xc59bb495504e5336362e3120ff042d2a+FWVER
Section titled “+FWVER”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 . The response is always displayed in base-10 (decimal) regardless of the base setting.
Example Usage:
+FWVER-FWVER 1.0.0+HWVER
Section titled “+HWVER”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 . The response is always displayed in base-10 (decimal) regardless of the base setting.
Example Usage:
+HWVER-HWVER 1.0+RESET
Section titled “+RESET”Resets the host adapter, all settings return to defaults.
Parameters:
This function takes no parameters.
Response:
This function returns -OK. Immediately following the transmission of the response, the host adapter will reset, which will cause the serial connection with the computer to be lost.
Example Usage:
+RESET-OK+BTLDR
Section titled “+BTLDR”Resets the host adapter and restart in bootloader mode. The host adapter must be in bootloader mode 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 Updating Firmware guide.
Parameters:
This function takes no parameters.
Response:
This function returns -OK . 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.
Example Usage:
+BTLDR-OK
