Edit script to allow for multiple numbers.
This commit is contained in:
parent
c0159c6920
commit
90644e11b2
@ -4,9 +4,10 @@ These keys were captured from a Genie Intellicode remote from the [GIRUD-1T kit]
|
||||
|
||||
This was decoded using the KeeLoq.c protocol decoder with a TE_short set to 200, a TE_long set to 400, and a TE_delta set to 70. The capture was on the 315MHz channel using AM650. After 65536 signals, the key repeated from the beginning.
|
||||
|
||||
Each entry in the TXT file is something like the following ``97A38C95007F1991`` which is the 64-bit key for the remote. You would need to make a file similar to the following to transmit the key.
|
||||
Each entry in the TXT file is something like the following ``97A38C95007F1991`` which is the 64-bit key for the remote.
|
||||
|
||||
**Be sure your TE_short is set to 200, TE_long to 400, and TE_delta to 70 in [keeloq.c](https://github.com/flipperdevices/flipperzero-firmware/blob/c924693a84abe88a6c53e1e3b062f0a9ab1c5886/lib/subghz/protocols/keeloq.c#L16) so the signal is sent correctly, otherwise it will not work!!!**
|
||||
|
||||
If you have a custom firmware with TE_short set to 200, TE_long to 400, and TE_delta to 70 in [keeloq.c](https://github.com/flipperdevices/flipperzero-firmware/blob/c924693a84abe88a6c53e1e3b062f0a9ab1c5886/lib/subghz/protocols/keeloq.c#L16) you could use the following genie.sub file to transmit the key.
|
||||
|
||||
```c
|
||||
Filetype: Flipper SubGhz Key File
|
||||
@ -18,5 +19,4 @@ Bit: 64
|
||||
Key: 97 A3 8C 95 00 7F 19 91
|
||||
```
|
||||
|
||||
You can run the genie.py file to generate a genie.sub file that uses the RAW protocol to transmit, so it works without modified firmware.
|
||||
Edit the ``info = 0x0D94C5EC007F1991`` to be the value of the key you wish to use.
|
||||
An easier way is to run the ``python genie.py`` file to generate a genie.sub file that uses the RAW protocol to transmit! It produces files that work on any Flipper Zero firmware. Edit the ``numbers = [0x97A38C95007F1991]`` in the script to be the value of the key you wish to use.
|
@ -1,7 +1,6 @@
|
||||
import sys
|
||||
|
||||
def main():
|
||||
info = 0x0D94C5EC007F1991
|
||||
te = 200 #200 is what original remote used. (How short the pulses are, smaller is faster.)
|
||||
hc = 11 #11 is what original remote sent. (How many pulses in header. You may be able to reduce this.)
|
||||
end = 40 #40 is what original remote sent. (How long the silence guard is. You may be able to reduce this.)
|
||||
@ -15,26 +14,32 @@ def main():
|
||||
f.write("Preset: FuriHalSubGhzPresetOok650Async\n")
|
||||
f.write("Protocol: RAW\n")
|
||||
|
||||
for j in range(repeat):
|
||||
f.write(f"RAW_Data: ")
|
||||
numbers = [0x97A38C95007F1991]
|
||||
|
||||
# header
|
||||
for i in range(hc):
|
||||
f.write(f"{te} -{te} ")
|
||||
f.write(f"{te} -{9*te} ")
|
||||
for info in numbers:
|
||||
|
||||
# iterate over each bit
|
||||
for i in range(64):
|
||||
# get bit value
|
||||
bit = (info >> (63 - i)) & 1
|
||||
for j in range(repeat):
|
||||
f.write(f"RAW_Data: ")
|
||||
|
||||
# get bit value, output on a single line.
|
||||
if bit == 0:
|
||||
f.write(f"{2*te} -{te} ")
|
||||
else:
|
||||
f.write(f"{te} -{2*te} ")
|
||||
# header
|
||||
for i in range(hc):
|
||||
f.write(f"{te} -{te} ")
|
||||
f.write(f"{te} -{9*te} ")
|
||||
|
||||
# stop
|
||||
f.write(f"{te} -{2*te} {te} -{end*te}\n")
|
||||
# iterate over each bit
|
||||
for i in range(64):
|
||||
# get bit value
|
||||
bit = (info >> (63 - i)) & 1
|
||||
|
||||
# get bit value, output on a single line.
|
||||
if bit == 0:
|
||||
f.write(f"{2*te} -{te} ")
|
||||
else:
|
||||
f.write(f"{te} -{2*te} ")
|
||||
|
||||
# stop
|
||||
f.write(f"{te} -{2*te} {te} -{end*te}\n")
|
||||
|
||||
# For signals with multiple numbers, it may be helpful to have some silence between them?
|
||||
#f.write(f"RAW_Data: 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000 100 -50000\n")
|
||||
main()
|
Loading…
Reference in New Issue
Block a user