Learning how to implement new protocols

I have a remote controlled outlet. I have previously decoded the protocol for use with the yardstick one, so I already have all the information. I want to learn how to contribute to the flipper pre-defined protocols. I wanted to do this as a learning exercise before attempting more advanced protocols.

I have looked at the pre-existing protocols, but I really don’t understand what they do exactly.

Is there documentation somewhere that I’m just not aware of?

For example, below is the code I wrote to use with the yardstick one.

from rflib import *

d = RfCat(idx=0)
d.setFreq(314970000)

d.setMdmModulation(MOD_ASK_OOK)
d.setMdmDRate(1600)
d.setMdmSyncMode(0)

def on():
    d.RFxmit(b"\x8E\xE8\xE8\x88\x88\xE8\x88\x88\x00\x00" * 5)

def off():
    d.RFxmit(b"\x8E\xE8\xE8\x88\x88\x8E\x88\x88\x00\x00" * 5)


on()

Yes, I know I can just record the raw signals and save those, but the point was to learn so I could implement more advanced protocols.

1 Like