Control Onkyo devices is possible among others through Remote Interactive port. This port is normally used for direct communication between two Onkyo devices (ex. receiver and CD player). But why not turn on the receiver automatically when you start your own player?
To connect to the RI port is used 3.5mm mono jack. Tip is for data signal and sleeve is ground (GND). Data are sent via TTL logic. So it is easy to connect RI device to 5V MCU (Arduino). Just connect data signal to some output pin and connect GND between each other.
Protocol description could be found at:
or with grafical representation at:
Protocol is pretty simple for implementation. In one message is transfered 12 bit code. This code represents action for target device. Most significant bit is send first.
There are two Onkyo-RI library:
- blocking - send() method blocks other program execution until whole command is sent. It takes up to 61 ms.
- non-blocking - send() method only start command sending. The execution is handled by processing() function. This function must be called periodically with maximum 1 ms period. Function return bool value about sending status (true - data is being sent, false - nothing to sent/sending is done). Before the command is completely sent other functions can be executed. Library use internaly Arduino micros() function, so no other timer is not blocked.
At mentioned sites are also listed codes for Onkyo devices. Unfortunnately none of the codes is not valid for my receiver TX-8020. To determine the valid codes I wrote a simple loop for Arduino (more below) that goes through the whole 12bit code range (0x0-0xFFF). Results are listed below commands.
Codes are valid for TX-8020 receiver. With a high probability it will work with other Onkyo receivers.
Action | Command | Notes |
Input CD | 0x20 | Switch input to CD channel |
Turn On + CD | 0x2F | Turn on receiver and select CD as input channel |
Input TAPE | 0x70 | Switch input to TAPE channel |
Turn On + TAPE | 0x7F | Turn on receiver and select TAPE as input channel |
Input BD/DVD | 0x120 | Switch input to BD/DVD channel |
Turn On + BD/DVD | 0x12F | Turn on receiver and select BD/DVD as input channel |
Input DOCK | 0x170 | Switch input to DOCK channel |
Turn On + DOCK | 0x17F | Turn on receiver and select DOCK as input channel |
Dimmer Hi | 0x2B0 | Set dimmer brightness to highest level |
Dimmer Mid | 0x2B1 | Set dimmer brightness to mid level |
Dimmer Lo | 0x2B2 | Set dimmer brightness to lowest level |
Dimmer Hi | 0x2B8 | Set dimmer brightness to highest level |
Dimmer Lo | 0x2BF | Set dimmer brightness to lowest level |
Turn Off | 0x420 | Turn off(set into standby) receiver |
Test mode | 0x421 - 0x424 | Some kind of test modes. Leave test mode is possible by code 0x420 (Turn Off). Test modes provides clear of receiver setting. |
Radio search next | 0x430 | Tune next radio station when radio is selected. |
Radio search previous | 0x431 | Tune previous radio station when radio is selected. |
Radio Stereo/Mono | 0x432 | Switch between Stereo and Mono when FM radio is selected. |
Radio station next | 0x433 | Jump to next stored radio station when radio is selected. |
Radio station previous | 0x434 | Jump to previous stored radio station when radio is selected. |
##Test program Program is located in repo folder Onkyo_test. It serves for check all codes (0x0 - 0xFFF) on target device in 500ms interval. For data line pin 10 is used as default.
Actual checked code is sent as ASCII through serial port and can be displayed in terminal. For serial port 9600b/s is set. Using terminal test program can be stopped, reset or user defined code could be used.
Terminal commands:
- p - pause/run command sending
- r - reset loop (program start from 0)
- hexadecimal number - number in hexadecimal format represents code that user want to test on target device. From this code automatical procedure will continue.