| Electronics > Projects, Designs, and Technical Stuff |
| Trying to decode an SPI protocol |
| (1/1) |
| brainwash:
This is a shot in a dark, but perhaps worth a try. I have these big LED panels which are controlled via an RF remote. Some specs on them: - 4 channels - 32(?) steps of color temperature - 255(?) steps of brightness The remote has 16 buttons which are addressable in a matrix/multiplexer configuration through 8 pins. I want to automate these light and cannot find any info about the Rx/Tx pair. Looks like some custom chip, one remote has two chips inside while another one has just one. I'm focusing on the one with 2 chips since it seems that one does the matrix decoding and the other one the Tx on 2.4GHz. I could just attach to the key pads and connect them through a multiplexer, however, it seems that I can gain direct control over the channels by skipping the first chip. Here are the pictures from the two remotes and some Sigrok/Pulseview screenshots as well as some of my notes: https://imgur.com/a/JfetA8V I've decoded most of the protocol, but, I'm having some questions about the last two bytes. They seem to randomly toggle a specific bit if a key is re-pressed, otherwise just almost randomly toggles bits whenever something is pressed. It doesn't seem to be a checksum, as it doesn't change if the key is held pressed (such as brightness increase). It also changes slightly if the same key is pressed again. The entire thing runs on a 1Mhz SPI clock, assuming I've got the connections and assignments right. The matrix decoder/SPI encoder chip is an SSOP-14 labeled WD1391 1643 (date code). This will likely become the first result whenever someone searches for this chip. The TSSOP-16 RF chip has no markings. Anyway, just trying to get more info on this, especially if the fixed bytes mean anything (RF channel?) and how to generate the last two bytes. I'll probably just set up an Arduino thing and let it try all the combinations and see what works, at this stage it's faster than trying to decode everything. My notes so far, for reference only: --- Code: ---1Mhz clock D2, MISO D4?, MOSI D5?, CS D7? wake? 230300 ack/repeat/confirm cmd? 07.00.00 07.01.14 or 07.00.00 shutdown? 23.4f.00 first 6 bytes - [34.80.80 32.0a.ff] byte 7 = [32] byte 8 = [8] + button: 1=? 2=ch 3 on 3=ch 1 on 4=brightness up 5=? 6=ch 3 off 7=ch 1 off 8=warmer 9=ch 4 on a=ch 2 on b=cooler c=? d=ch 4 off e=ch 2 off f=bright down 00000000 byte 9 = [b5] bytes 10-13 = [32.04.01.32] byte 14 = brightness byte 15 = color temperature byte 16 = [32] bytes 17,18 = 0010 0110 1010 1111 ch1 on . 0110 0110 1010 1111 ch1 off * * 0110 0010 1010 1111 ch1 on again? . 0110 1010 1010 1111 ch1 bright up . 0110 1010 1110 1111 ch1 bright down . 1110 1010 1110 1111 ch1 warmer . 1110 1010 1110 1011 ch1 cooler * . * 0110 1010 1110 1011 ch1 warmer . . 0110 1010 1010 1001 ch2 on . 0110 1010 1010 1101 ch2 cooler . 0110 1010 1000 1101 ch2 off * 0110 1010 1010 1101 ch2 off again . . 0110 1000 1000 1101 ch3 on . 0100 1000 1000 1101 ch3 off * 0110 1000 1000 1101 ch3 off again . . 0100 1000 1001 1100 ch4 on . 0100 0000 1001 1100 ch4 bright up * 0100 1000 1001 1100 ch4 bright up again . . 0100 1000 1100 1101 ch4 bright down * 0100 1000 1000 1101 ch4 bright down again ch1 on 34.80.80 32.0a.ff 32.83.b5 32.04.01 32.02.1a 32.26.af 07.01.14 ch1 off | | 34.80.80 32.0a.ff 32.87.b5 32.04.01 32.02.1a 32.66.af 07.01.14 ch1 off bounce | 34.80.80 32.0a.ff 32.87.b5 32.04.01 32.02.1a 32.26.af 07.01.14 ch1 on 2nd after off | || 34.80.80 32.0a.ff 32.83.b5 32.04.01 32.02.1a 32.62.af 07.01.14 brigthness up 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.03.1a 32.6a.af 07.01.14 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.04.1a 32.6a.af 07.01.14 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.05.1a 32.6a.af 07.01.14 ... || 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.11.1a 32.6a.af 07.01.14 brigthness down | || | 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.10.1a 32.6a.ef 07.01.14 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.0f.1a 32.6a.ef 07.01.14 ... || 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.02.1a 32.6a.ef 07.01.14 warmer | || | 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.1c 32.ea.ef 07.01.14 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.1d 32.ea.ef 07.01.14 ... || 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.38 32.ea.ef 07.01.14 cooler | || | 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.02.37 32.ea.eb 07.01.14 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.02.36 32.ea.eb 07.01.14 ... || 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.02.00 32.ea.eb 07.01.14 warmer again | || | 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.01 32.6a.eb 07.01.14 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.09 32.6a.eb 07.01.14 warmer again || | 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.0a 32.ea.eb 07.01.14 warmer again || | 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.0b 32.6a.eb 07.01.14 34.80.80 32.0a.ff 32.88.b5 32.04.01 32.02.1f 32.6a.eb 07.01.14 *ch2 on 34.80.80 32.0a.ff 32.8a.b5 32.04.01 32.80.2d 32.6a.a9 07.01.14 cooler | || | 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.80.2c 32.6a.ad 07.01.14 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.80.2b 32.6a.ad 07.01.14 ... 34.80.80 32.0a.ff 32.8b.b5 32.04.01 32.80.17 32.6a.ad 07.01.14 ch2 off | | 34.80.80 32.0a.ff 32.8e.b5 32.04.01 32.80.17 32.6a.8d 07.01.14 ch2 off again | 34.80.80 32.0a.ff 32.8e.b5 32.04.01 32.80.17 32.6a.ad 07.01.14 ch2 off again | 34.80.80 32.0a.ff 32.8e.b5 32.04.01 32.80.17 32.6a.8d 07.01.14 ch2 off again | 34.80.80 32.0a.ff 32.8e.b5 32.04.01 32.80.17 32.6a.ad 07.01.14 *ch3 on - -- - - 34.80.80 32.0a.ff 32.82.b5 32.04.01 32.80.32 32.68.8d 07.01.14 ch3 off | | 34.80.80 32.0a.ff 32.86.b5 32.04.01 32.80.32 32.48.8d 07.01.14 ch3 off again | 34.80.80 32.0a.ff 32.86.b5 32.04.01 32.80.32 32.68.8d 07.01.14 ch3 off again | 34.80.80 32.0a.ff 32.86.b5 32.04.01 32.80.32 32.48.8d 07.01.14 *ch4 on - -- 34.80.80 32.0a.ff 32.89.b5 32.04.01 32.80.32 32.48.9c 07.01.14 bright up | || | 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.81.32 32.40.9c 07.01.14 ... || 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.88.32 32.40.9c 07.01.14 bright up again || | 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.89.32 32.48.9c 07.01.14 bright up again || | 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.8a.32 32.40.9c 07.01.14 bright down | || | 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.89.32 32.40.dc 07.01.14 ... || 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.7d.32 32.40.dc 07.01.14 ch4 off | | 34.80.80 32.0a.ff 32.8d.b5 32.04.01 32.7d.32 32.40.cc 07.01.14 on+bright down | || | 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.7c.32 32.40.8d 07.01.14 ... || 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.6b.32 32.40.8d 07.01.14 bright up | || | 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.6c.32 32.48.8d 07.01.14 ... || | 34.80.80 32.0a.ff 32.84.b5 32.04.01 32.7a.32 32.48.8d 07.01.14 bright down | || | 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.79.32 32.48.cd 07.01.14 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.68.32 32.48.cd 07.01.14 bright down again || | 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.67.32 32.48.8d 07.01.14 34.80.80 32.0a.ff 32.8f.b5 32.04.01 32.57.32 32.48.8d 07.01.14 --- End code --- |
| Navigation |
| Message Index |