From bb0411725b88169913df3457f8be78a928c15ea5 Mon Sep 17 00:00:00 2001 From: pc Date: Sat, 2 Mar 2024 16:39:46 +0100 Subject: [PATCH 1/2] first commit for jam capability --- include/CC1101utils.h | 2 +- src/SimpleMenuNav.h | 2 +- src/main.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/include/CC1101utils.h b/include/CC1101utils.h index ce994bd..d2c8551 100755 --- a/include/CC1101utils.h +++ b/include/CC1101utils.h @@ -1,7 +1,7 @@ #include //#define TICC1101 -//#define E07M1101D +#define E07M1101D #ifdef E07M1101D #define CCGDO0 25 diff --git a/src/SimpleMenuNav.h b/src/SimpleMenuNav.h index 9a7a839..aa67756 100755 --- a/src/SimpleMenuNav.h +++ b/src/SimpleMenuNav.h @@ -3,7 +3,7 @@ #include "Free_Fonts.h" #include -#define IO433VERSION "v0.2" +#define IO433VERSION "v0.21" #define BUTTON_UP 35 #define BUTTON_DOWN 0 #define LONGCLICK_MS 300 diff --git a/src/main.cpp b/src/main.cpp index 05d3773..623c859 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -187,6 +187,57 @@ void dump () { } +/* void jam() { + /* + // jam loop + CCInit(); + CCSetRx(); + delay(50); + //FILTER OUT NOISE SIGNALS (too few transistions or too fast) + // if jamming mode activate continously send something over RF... + // populate cc1101 sending buffer with random values + randomSeed(analogRead(0)); + + for (i = 0; i<60; i++) + { ccsendingbuffer[i] = (byte)random(255); }; + // send these data to radio over CC1101 + ELECHOUSE_cc1101.SendData(ccsendingbuffer,60); + if (SMN_isUpButtonPressed()) return; + +} +*/ + +void jam (int t) { + int i; + unsigned int totalDelay = 0; + CCInit(); + CCSetTx(); + delay(50); + int64_t startus = esp_timer_get_time(); + while (true) { + byte n = 0; + for (i = 0; i < 60; i++) { + CCWrite(n); + totalDelay = signal433_current[i]+delayus; + delayMicroseconds(totalDelay); + if (signal433_current[i] < RESET443) n = !n; + } + CCWrite(0); + if (SMN_isUpButtonPressed()) return; + while (SMN_isDownButtonPressed()) delay(100); + } + CCSetRx(); + + int64_t stopus = esp_timer_get_time(); + Serial.print("Jam Done (us): "); + Serial.println((long)(stopus - startus), DEC); + +} + +void jam () { + jam(1); +} + // THIS IS OBVIOUSLY SLOW void rawout() { @@ -289,6 +340,7 @@ void setup() { SimpleMenu *menu_more = new SimpleMenu("More",menu_main,NULL); SimpleMenu *menu_monitor = new SimpleMenu("Monitor",menu_more,monitormode); + SimpleMenu *menu_jam = new SimpleMenu("Jam",menu_more,jam); SimpleMenu *menu_load = new SimpleMenu("Raw Out",menu_more,rawout); SimpleMenu *menu_about = new SimpleMenu("About",menu_more,SMN_screensaver); From 9d9ce8afa58a7b31bb7ce8a5d3e17666fda2894c Mon Sep 17 00:00:00 2001 From: pc Date: Sat, 2 Mar 2024 16:57:05 +0100 Subject: [PATCH 2/2] commit for jam capability --- README.md | 4 ++++ src/main.cpp | 20 +------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c6053bb..79ac97c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ |___\___/ |_|___/___/ ``` +## +This is a fork (v0.21) for my personal use of the original io433 project by Krypthor. +Added "Jam" capability. This is really fun, no on in vincity can use 433Mhz devices :)) ## Description @@ -125,6 +128,7 @@ Plug the ESP32 to a battery or a to a USB-C cable. The current menu structure is ├── Dump # Dump current memory bank to screen and serial (fixed 100kbps, for easy analysis on third party software [ex. PulseView]) └── More ├── Monitor # Dump raw signal to screen and RSSI info + ├── Jam # Simple jam / send random bits on radio ├── Raw Out # Dump current signal to serial as fast as possible (default 1Mbps serial) └── About # About menu ``` diff --git a/src/main.cpp b/src/main.cpp index 623c859..67ac8d6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -187,25 +187,6 @@ void dump () { } -/* void jam() { - /* - // jam loop - CCInit(); - CCSetRx(); - delay(50); - //FILTER OUT NOISE SIGNALS (too few transistions or too fast) - // if jamming mode activate continously send something over RF... - // populate cc1101 sending buffer with random values - randomSeed(analogRead(0)); - - for (i = 0; i<60; i++) - { ccsendingbuffer[i] = (byte)random(255); }; - // send these data to radio over CC1101 - ELECHOUSE_cc1101.SendData(ccsendingbuffer,60); - if (SMN_isUpButtonPressed()) return; - -} -*/ void jam (int t) { int i; @@ -328,6 +309,7 @@ void setup() { |-> REPLAY |-> DUMP |-> MORE + |-> JAM |-> MONITOR |-> RAW OUT |-> ABOUT