Having just fixed support for Pioneer 4DEV in RM, I noticed that the Pioneer 3DEV support isn't complete. Looks like byte2 can also contain a 2nd OBC, and I need help figuring out how to translate that into the hex.
I found the formula in KM, but I can't quite make sense of it.
Here is the formula:
That code was copied from the EFCw worksheet, all it does is convert the entered code into binary, based on whether the code is an EFC or an OBC. However, that's not the code you need to focus on as you already have routines to do that conversion.
The format of the byte2 hex code is as follows:
bits 0 thru 4 (ie, the 5 rightmost bits) are the leftmost 5 bits of the 2nd OBC.
bit 5 is always zero
bits 6 thru 7 (ie, the 2 leftmost bits) are the device index in LSB format (ie, 00, 10 or 01)
The UEI protocol is able to drop the 3 rightmost bits of the 2nd OBC because they assume that bit2 will be zeroes, bit1 will be the complement of bit1 from OBC1, and bit0 will be a copy of bit0 from OBC1. Of course, this assumption is not valid, which is why I had to develop the 4DEV version.
If you look closely in KM you'll see a named item called GetB2w12newbin1 which has the following formula:
ie, grab the 5 leftmost bits from the generated binary, then generate the remaining 3 bits as decribed above. I then compare this new binary with the generated binary to see if they are the same. I do this in the GetB2w12bit3 named item, which is displayed in the greyed out column V in the byte2w sheet. If these two binaries are different, it means this command cannot be generated using the 3DEV protocol and you should switch to the 4DEV protocol. When this occurs, I substitute the generated hex code with "XX" to bring this to the users attention.
Rob www.hifi-remote.com Please don't PM me with remote questions, post them in the forums so all the experts can help!