Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

IOIO Application Protocol

garyamort edited this page · 3 revisions

The IOIO Board uses multiple protocols to communicate with a control device.

There is the hardware protocol layer, ie using the Bluetooth device or a USB connection.

Above that, there will be framing for that protocol - over Bluetooth it uses a UART emulated connection. Over USB it can use various Android defined protocols.

Above that is the IOIO Application Protocol which allows an application running on the control device to access the pins and commands of the IOIO. This IOIO Application Protocol does not consist of any framing, all communication packets contain commands and parameters - the length of the parameter data is determined by the command being used. These protocols are defined in the protocol_defs.h file in the repository. IOIO Protocol Definitions.

Many communication packets do not have a response - an application must provide it's own sanity checking to see if commands.

Language Notes: Java: In Java, the same method may be called with different numbers of parameters. In the code below I assume that you have an IOIO object derived from the IOIO interface. I have only identified the full signature API method and have not included the others. The pages specific for those methods are a much better source of documentation - the goal here is merely to give a quick reference for the official Java API, followed by references in other languages for how they change.

Firmware Command Hex Integer Parameter Format Result Expected Documentation Java Call Javascript Call Python Call PHP Call
HARD_RESET 0x00 tbd tbd tbd tbd tbd tbd tbd
ESTABLISH_CONNECTION 0x00 tbd tbd tbd tbd tbd tbd tbd
SOFT_RESET 0x01 tbd tbd tbd tbd tbd tbd tbd
CHECK_INTERFACE 0x02 tbd tbd tbd tbd tbd tbd tbd
CHECK_INTERFACE_RESPONSE 0x02 tbd tbd tbd tbd tbd tbd tbd
SET_PIN_DIGITAL_OUT 0x03 3 [Digital I/O](https://github.com/ytai/ioio/wiki/Digital-IO) IOIO.openDigitalOutput(int pin,DigitalOutput.Spec.Mode mode, boolean startValue) tbd tbd tbd tbd
SET_DIGITAL_OUT_LEVEL 0x04 tbd tbd tbd tbd tbd tbd tbd
REPORT_DIGITAL_IN_STATUS 0x04 tbd tbd tbd tbd tbd tbd tbd
SET_PIN_DIGITAL_IN 0x05 tbd tbd tbd tbd tbd tbd tbd
REPORT_PERIODIC_DIGITAL_IN_STATUS 0x05 tbd tbd tbd tbd tbd tbd tbd
SET_CHANGE_NOTIFY 0x06 tbd tbd tbd tbd tbd tbd tbd
REGISTER_PERIODIC_DIGITAL_SAMPLING 0x07 tbd tbd tbd tbd tbd tbd tbd
SET_PIN_PWM 0x08 tbd tbd tbd tbd tbd tbd tbd
SET_PWM_DUTY_CYCLE 0x09 tbd tbd tbd tbd tbd tbd tbd
SET_PWM_PERIOD 0x0A tbd tbd tbd tbd tbd tbd tbd
SET_PIN_ANALOG_IN 0x0B tbd tbd tbd tbd tbd tbd tbd
REPORT_ANALOG_IN_STATUS 0x0B tbd tbd tbd tbd tbd tbd tbd
SET_ANALOG_IN_SAMPLING 0x0C tbd tbd tbd tbd tbd tbd tbd
REPORT_ANALOG_IN_FORMAT 0x0C tbd tbd tbd tbd tbd tbd tbd
UART_CONFIG 0x0D tbd tbd tbd tbd tbd tbd tbd
UART_STATUS 0x0D tbd tbd tbd tbd tbd tbd tbd
UART_DATA 0x0E tbd tbd tbd tbd tbd tbd tbd
SET_PIN_UART 0x0F tbd tbd tbd tbd tbd tbd tbd
UART_REPORT_TX_STATUS 0x0F tbd tbd tbd tbd tbd tbd tbd
SPI_CONFIGURE_MASTER 0x10 tbd tbd tbd tbd tbd tbd tbd
SPI_STATUS 0x10 tbd tbd tbd tbd tbd tbd tbd
SPI_MASTER_REQUEST 0x11 tbd tbd tbd tbd tbd tbd tbd
SPI_DATA 0x11 tbd tbd tbd tbd tbd tbd tbd
SET_PIN_SPI 0x12 tbd tbd tbd tbd tbd tbd tbd
SPI_REPORT_TX_STATUS 0x12 tbd tbd tbd tbd tbd tbd tbd
I2C_CONFIGURE_MASTER 0x13 tbd tbd tbd tbd tbd tbd tbd
I2C_STATUS 0x13 tbd tbd tbd tbd tbd tbd tbd
I2C_WRITE_READ 0x14 tbd tbd tbd tbd tbd tbd tbd
I2C_RESULT 0x14 tbd tbd tbd tbd tbd tbd tbd
I2C_REPORT_TX_STATUS 0x15 tbd tbd tbd tbd tbd tbd tbd
ICSP_SIX 0x16 tbd tbd tbd tbd tbd tbd tbd
ICSP_REPORT_RX_STATUS 0x16 tbd tbd tbd tbd tbd tbd tbd
ICSP_REGOUT 0x17 tbd tbd tbd tbd tbd tbd tbd
ICSP_RESULT 0x17 tbd tbd tbd tbd tbd tbd tbd
ICSP_PROG_ENTER 0x18 tbd tbd tbd tbd tbd tbd tbd
ICSP_PROG_EXIT 0x19 tbd tbd tbd tbd tbd tbd tbd
ICSP_CONFIG 0x1A tbd tbd tbd tbd tbd tbd tbd
INCAP_CONFIG 0x1B tbd tbd tbd tbd tbd tbd tbd
INCAP_STATUS 0x1B tbd tbd tbd tbd tbd tbd tbd
SET_PIN_INCAP 0x1C tbd tbd tbd tbd tbd tbd tbd
INCAP_REPORT 0x1C tbd tbd tbd tbd tbd tbd tbd
SOFT_CLOSE 0x1D tbd tbd tbd tbd tbd tbd tbd
Something went wrong with that request. Please try again.