New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other modulation types supported (2-FSK)? #4

Closed
trishmapow opened this Issue Jan 13, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@trishmapow

trishmapow commented Jan 13, 2017

Hi,
First of all, this is such a great piece of software.
I haven't been able to test the Arduino sketch yet, because I'm having issues compiling. However, in the PDF replay tutorial you mentioned that this only supports OOK.
Is it possible to transmit FSK with this, as I know the CC1101 chip itself supports it? If not, could you please point me to something about transmitting FSK on the CC, I haven't found any good sources,

Thanks

@jglim

This comment has been minimized.

Show comment
Hide comment
@jglim

jglim Jan 13, 2017

Owner

Hey,

I've tested out 2FSK briefly and it seems to work. You can configure the registers manually via the CC1101's datasheet or use TI's SmartRF Studio (free - requires TI login though) and let it generate the registers for you.

These are the RF settings I used to test (2FSK @ 433.9MHz, 82.5KHz deviation)

cc1101-smartrf-settings

This is the output (annotated)

cc1101-2fsk-annotated

You can configure your desired RF settings, export the registers (1), choose the correct output type and copy the text (2) and import it into CCManager through pasting into the dialog in "Import SimpliciTI Settings" (3)

reg-export-annotated

Hope it helps!

Owner

jglim commented Jan 13, 2017

Hey,

I've tested out 2FSK briefly and it seems to work. You can configure the registers manually via the CC1101's datasheet or use TI's SmartRF Studio (free - requires TI login though) and let it generate the registers for you.

These are the RF settings I used to test (2FSK @ 433.9MHz, 82.5KHz deviation)

cc1101-smartrf-settings

This is the output (annotated)

cc1101-2fsk-annotated

You can configure your desired RF settings, export the registers (1), choose the correct output type and copy the text (2) and import it into CCManager through pasting into the dialog in "Import SimpliciTI Settings" (3)

reg-export-annotated

Hope it helps!

@trishmapow

This comment has been minimized.

Show comment
Hide comment
@trishmapow

trishmapow Jan 14, 2017

Thanks a lot for that! Such a nice and detailed guide!

Anyway, the particular rolling code system I have has a symbol rate of around 18kHz, which the CC1101 can do, however it does have ~1000 symbols that need to be transmitted ... I see that your program only supports 61 bytes. Do you have any idea on how to tackle this challenge (I am using an Arduino Pro Mini, 3.3V, 8MHz)? Also, is there a way to run your CCManager program without the GUI, just with a CLI in Linux shell/Windows command prompt? I'd like to be able to automate this on a Raspberry Pi -> analyses/decodes FSK -> sends code to CC1101.

Sorry for the many questions, I am still a n00b with this hardware.
Thanks again.

trishmapow commented Jan 14, 2017

Thanks a lot for that! Such a nice and detailed guide!

Anyway, the particular rolling code system I have has a symbol rate of around 18kHz, which the CC1101 can do, however it does have ~1000 symbols that need to be transmitted ... I see that your program only supports 61 bytes. Do you have any idea on how to tackle this challenge (I am using an Arduino Pro Mini, 3.3V, 8MHz)? Also, is there a way to run your CCManager program without the GUI, just with a CLI in Linux shell/Windows command prompt? I'd like to be able to automate this on a Raspberry Pi -> analyses/decodes FSK -> sends code to CC1101.

Sorry for the many questions, I am still a n00b with this hardware.
Thanks again.

@jglim

This comment has been minimized.

Show comment
Hide comment
@jglim

jglim Jan 14, 2017

Owner

Hey no worries!

With regards to your requirements on ~1k symbols, the hardware you have (CC1101, 3.3V Arduino) is enough to do so - however you may wish to write your own firmware on the Arduino itself as CCManager is not able to solve the issue as-is.

CCManager works by queuing bytes into the CC1101's internal TX FIFO (limited to 61 bytes), then requesting the CC1101 to TX the buffer's content. This allows timing flexibility between the host/bridge/CC1101.

There is also a second mode (serial synchronous/asynchronous mode) on the CC1101. Upon enabling TX, the CC1101 will generate a clock signal and read data from its GDO pins. In this mode, the CC1101 acts more like a simple modulator and you should be able to send a transmission of arbitrary length.

This is the literature from TI which might help you in the alternative mode:
http://www.ti.com/lit/an/swra359a/swra359a.pdf

Unfortunately I have not implemented a CLI version of CCManager. Perhaps in the future ^_^

Might I suggest looking at rfcat for similar features, but more powerful in the "expert mode" and automation department? (Different hardware though)

Owner

jglim commented Jan 14, 2017

Hey no worries!

With regards to your requirements on ~1k symbols, the hardware you have (CC1101, 3.3V Arduino) is enough to do so - however you may wish to write your own firmware on the Arduino itself as CCManager is not able to solve the issue as-is.

CCManager works by queuing bytes into the CC1101's internal TX FIFO (limited to 61 bytes), then requesting the CC1101 to TX the buffer's content. This allows timing flexibility between the host/bridge/CC1101.

There is also a second mode (serial synchronous/asynchronous mode) on the CC1101. Upon enabling TX, the CC1101 will generate a clock signal and read data from its GDO pins. In this mode, the CC1101 acts more like a simple modulator and you should be able to send a transmission of arbitrary length.

This is the literature from TI which might help you in the alternative mode:
http://www.ti.com/lit/an/swra359a/swra359a.pdf

Unfortunately I have not implemented a CLI version of CCManager. Perhaps in the future ^_^

Might I suggest looking at rfcat for similar features, but more powerful in the "expert mode" and automation department? (Different hardware though)

@trishmapow

This comment has been minimized.

Show comment
Hide comment
@trishmapow

trishmapow Jan 14, 2017

Thanks for all the help.
After searching around, I seem to be on my own :( I don't have much experience with SPI etc.
Oh well, I'll see how this whole "serial synchronous" business works out.

trishmapow commented Jan 14, 2017

Thanks for all the help.
After searching around, I seem to be on my own :( I don't have much experience with SPI etc.
Oh well, I'll see how this whole "serial synchronous" business works out.

@trishmapow

This comment has been minimized.

Show comment
Hide comment
@trishmapow

trishmapow Jan 18, 2017

Hi again,
Just wondering if this idea makes any sense: instead of transferring the data continuously over serial and having to deal with clocks etc, could I just hard code the entire transmission in a string in the Arduino sketch? There should be enough flash memory for this. I could have a Raspberry Pi dynamically generate and upload the sketch to the Arduino once it captures a key press.

Then I could simply go on by looping and keeping the TX FIFO filled (not sure on how to do this, but there are libraries I suppose)? Would this work?
Thanks.

trishmapow commented Jan 18, 2017

Hi again,
Just wondering if this idea makes any sense: instead of transferring the data continuously over serial and having to deal with clocks etc, could I just hard code the entire transmission in a string in the Arduino sketch? There should be enough flash memory for this. I could have a Raspberry Pi dynamically generate and upload the sketch to the Arduino once it captures a key press.

Then I could simply go on by looping and keeping the TX FIFO filled (not sure on how to do this, but there are libraries I suppose)? Would this work?
Thanks.

@jglim

This comment has been minimized.

Show comment
Hide comment
@jglim

jglim Jan 19, 2017

Owner

Hey,

It might work, though it sounds somewhat hacky given that the data would be sent in blocks of 61 bytes with an unknown interval, and I don't think I am able to give more advice than that. It would be easier and more reliable to get the Arduino to do the work via asynchronous mode with the CC1101 in your case for long packets.

Asynchronous mode is similar to the method you describe, where you store your data on the microcontroller, and configure the CC1101 to both transmit and read the next packet's data simultaneously.

Owner

jglim commented Jan 19, 2017

Hey,

It might work, though it sounds somewhat hacky given that the data would be sent in blocks of 61 bytes with an unknown interval, and I don't think I am able to give more advice than that. It would be easier and more reliable to get the Arduino to do the work via asynchronous mode with the CC1101 in your case for long packets.

Asynchronous mode is similar to the method you describe, where you store your data on the microcontroller, and configure the CC1101 to both transmit and read the next packet's data simultaneously.

@trishmapow

This comment has been minimized.

Show comment
Hide comment
@trishmapow

trishmapow Jan 19, 2017

Thanks again for so much help.
I don't know how I misinterpreted it so badly, but I actually only need to send 17 bytes! I managed to use GRC to record from an RTL-SDR and use wave-converter to demodulate and decode the 2-FSK rolling key code and then convert it to a hexadecimal code. Turns out the code is repeated twice, so only 8 bytes, 2 of the bytes increment by 16 every button press, 5 bytes are constant, leaving only one true "rolling code". I'll see if there's some sort of pattern to it.

Crazy how this is the stuff protecting my car! 1 byte of data. So much for rolling code security.

trishmapow commented Jan 19, 2017

Thanks again for so much help.
I don't know how I misinterpreted it so badly, but I actually only need to send 17 bytes! I managed to use GRC to record from an RTL-SDR and use wave-converter to demodulate and decode the 2-FSK rolling key code and then convert it to a hexadecimal code. Turns out the code is repeated twice, so only 8 bytes, 2 of the bytes increment by 16 every button press, 5 bytes are constant, leaving only one true "rolling code". I'll see if there's some sort of pattern to it.

Crazy how this is the stuff protecting my car! 1 byte of data. So much for rolling code security.

@jglim

This comment has been minimized.

Show comment
Hide comment
@jglim

jglim Jan 19, 2017

Owner

Congrats!

Do remember that rolling code can be desynchronized (by accident usually) and there probably is a sequence of actions you may have to take to re-synchronize it. Hopefully CCManager is capable of opening your car for you :^)

Owner

jglim commented Jan 19, 2017

Congrats!

Do remember that rolling code can be desynchronized (by accident usually) and there probably is a sequence of actions you may have to take to re-synchronize it. Hopefully CCManager is capable of opening your car for you :^)

@trishmapow trishmapow closed this Jan 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment