Created
July 11, 2017 22:12
-
-
Save aSmig/eb9af054b0f4a6b214983cd2731252d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Use YardStick One and RfCat to transmit a fan remote control signal as | |
# observed by int10h here: https://i.imgur.com/JZ3pdF1.png | |
import bitstring | |
from rflib import * | |
device = RfCat() | |
device.setMdmModulation(MOD_ASK_OOK) | |
device.setFreq(433e6) | |
device.setMdmSyncMode(0x00) | |
device.setMdmDRate(5215) | |
device.makePktFLEN() | |
device.setMdmNumPreamble(0) | |
device.setPktPQT(0) | |
device.setMaxPower() | |
# Repeating is probably not necessary and may need to be rate limited | |
for i in range(3): | |
device.RFxmit(bitstring.BitArray(bin='001001011011011011011011011011001001001').tobytes()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment