Skip to content

Commit

Permalink
bug fixing + new features
Browse files Browse the repository at this point in the history
  • Loading branch information
nmrr committed Jul 11, 2023
1 parent 140e36d commit 837404d
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 20 deletions.
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# flipperzero-rfidbeacon
A letter/number [Morse]([https://en.wikipedia.org/wiki/Letter_beacon](https://fr.wikipedia.org/wiki/Code_Morse_international)) beacon on **125 kHz** using **RFID** interface of the **Flipper Zero**
A letter/number [Morse](https://fr.wikipedia.org/wiki/Code_Morse_international) beacon on **125 kHz** using **RFID** interface of the **Flipper Zero**

![banner](https://raw.githubusercontent.com/nmrr/flipperzero-rfidbeacon/main/img/banner-rfid.jpg)
(banner has been made with **DALL.E 2**)
(banner has been made with **Dall.E 2**)


Like Russia with their HF [letter beacons](https://en.wikipedia.org/wiki/Letter_beacon), it's possible to use the **Flipper Zero** as a letter/number [Morse]([https://en.wikipedia.org/wiki/Letter_beacon](https://fr.wikipedia.org/wiki/Code_Morse_international)) beacon. **Flipper Zero** has multiple RF interfaces (RFID, NFC and UHF) and it's possible to transmit raw data over these interfaces.

This application can transmit the whole alphabet (A to Z) and numbers (0 to 9) in morse on **RFID** interface. Range is about 5m.
Like Russia with their HF [letter beacons](https://en.wikipedia.org/wiki/Letter_beacon), it's possible to use the **Flipper Zero** as a letter/number/symbol [Morse](https://fr.wikipedia.org/wiki/Code_Morse_international) beacon. **Flipper Zero** has multiple RF interfaces (RFID, NFC and UHF) and it's possible to transmit raw data over these interfaces.

This application can transmit the whole alphabet (A to Z), numbers (0 to 9) and symbols in [Morse](https://fr.wikipedia.org/wiki/Code_Morse_international) on **RFID** interface (125 kHz). Range is about 5m with a **SDR**.

## Gallery

Expand All @@ -17,15 +18,19 @@ Menu of the application:

Led of the **Flipper Zero** turns in red when transmitting.

**Airspy Discovery HF+** SDR bas been used during these tests with a small loop antenna. Following measures have been made at a distance of 2m.
**Airspy Discovery HF+** **SDR** bas been used during these tests with a small loop antenna. Following measures have been made at a distance of 2m from the **Flipper Zero**.

**A** letter:

<img src="https://github.com/nmrr/flipperzero-rfidbeacon/blob/main/img/a.png" width=50% height=50%>
<img src="https://github.com/nmrr/flipperzero-rfidbeacon/blob/main/img/screen1.png" width=50% height=50%>

**5** number:

<img src="https://github.com/nmrr/flipperzero-rfidbeacon/blob/main/img/screen2.png" width=50% height=50%>

**3** number:
**+** symbol (on the air):

<img src="https://github.com/nmrr/flipperzero-rfidbeacon/blob/main/img/3.png" width=50% height=50%>
<img src="https://github.com/nmrr/flipperzero-rfidbeacon/blob/main/img/screen3.png" width=50% height=50%>

## Build the program

Expand Down Expand Up @@ -57,3 +62,13 @@ Build has been made with official toolchain, **API Mismatch** error may appear i
* Transmit on NFC interface (13.56 MHz), range is wider than **RFID**
* Transmit on UHF interface (433 MHz, etc)
* Transmit personalized text message over the air

## Changelog

* 2023-07-11
* Bug fixing
* Symbols have been added
* Morse code view has been added

* 2023-07-10
* Initial release
Binary file modified flipper_rfidbeacon.fap
Binary file not shown.
51 changes: 39 additions & 12 deletions flipper_rfidbeacon/flipper_rfidbeacon.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// CC0 1.0 Universal (CC0 1.0)
// Public Domain Dedication
// https://github.com/nmrr

#include <stdio.h>
#include <furi.h>
#include <gui/gui.h>
Expand All @@ -19,9 +15,9 @@ typedef struct {
InputEvent input;
} EventApp;

const char CW_char[36] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
const uint8_t CW_size[36] = {2, 4, 4, 3, 1, 4, 3, 4, 2, 4, 3, 4, 2, 2, 3, 4, 4, 3, 3, 1, 3, 4, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5};
const uint8_t CW_value[36] = {0b01000000, 0b10000000, 0b10100000, 0b10000000, 0b00000000, 0b00100000, 0b11000000, 0b00000000, 0b00000000, 0b01110000, 0b10100000, 0b01000000, 0b11000000, 0b10000000, 0b11100000, 0b01100000, 0b11010000, 0b01000000, 0b00000000, 0b10000000, 0b00100000, 0b00010000, 0b01100000, 0b10010000, 0b10110000, 0b11000000, 0b11111000, 0b01111000, 0b00111000, 0b00011000, 0b00001000, 0b00000000, 0b10000000, 0b11000000, 0b11100000, 0b11110000};
const char CW_char[54] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', ',', '?', '\'', '!', '/', '(', ')', '&', ':', ';', '=', '+', '-', '_', '"', '$', '@'};
const uint8_t CW_size[54] = {2, 4, 4, 3, 1, 4, 3, 4, 2, 4, 3, 4, 2, 2, 3, 4, 4, 3, 3, 1, 3, 4, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 6, 5, 6, 6, 5, 5, 6, 6, 6, 7, 6};
const uint8_t CW_value[54] = {0b01000000, 0b10000000, 0b10100000, 0b10000000, 0b00000000, 0b00100000, 0b11000000, 0b00000000, 0b00000000, 0b01110000, 0b10100000, 0b01000000, 0b11000000, 0b10000000, 0b11100000, 0b01100000, 0b11010000, 0b01000000, 0b00000000, 0b10000000, 0b00100000, 0b00010000, 0b01100000, 0b10010000, 0b10110000, 0b11000000, 0b11111000, 0b01111000, 0b00111000, 0b00011000, 0b00001000, 0b00000000, 0b10000000, 0b11000000, 0b11100000, 0b11110000, 0b01010100, 0b11001100, 0b00110000, 0b01111000, 0b10101100, 0b10010000, 0b10110000, 0b10110100, 0b01000000, 0b11100000, 0b10101000, 0b10001000, 0b01010000, 0b10000100, 0b00110100, 0b01001000, 0b00010010, 0b01101000};

typedef struct {
FuriMutex* mutex;
Expand All @@ -42,8 +38,35 @@ static void draw_callback(Canvas* canvas, void* ctx)
canvas_set_font(canvas, FontPrimary);
canvas_draw_str_aligned(canvas, 64, 5, AlignCenter, AlignCenter, "RFID Beacon");

char buffer[8];
snprintf(buffer, sizeof(buffer), "%c", CW_char[mutexVal->status]);
char buffer[16];
uint8_t positionBuffer = 0;
buffer[positionBuffer++] = CW_char[mutexVal->status];
buffer[positionBuffer++] = ' ';
buffer[positionBuffer++] = ' ';
buffer[positionBuffer++] = ' ';
buffer[positionBuffer++] = ' ';

uint8_t maskMorse = 0b10000000;
for (uint8_t i=0;i<CW_size[mutexVal->status];i++)
{
if (i != 0)
{
buffer[positionBuffer++] = ' ';
maskMorse >>= 1;
}

if ((CW_value[mutexVal->status] & maskMorse) != 0)
{
buffer[positionBuffer++] = '_';
}
else
{
buffer[positionBuffer++] = '.';
}
}

buffer[positionBuffer++] = '\0';

canvas_draw_str_aligned(canvas, 64, 32, AlignCenter, AlignCenter, buffer);

if (mutexVal->enableCW_mutex == 0) canvas_draw_str_aligned(canvas, 64, 59, AlignCenter, AlignCenter, "OFF");
Expand Down Expand Up @@ -143,7 +166,11 @@ int32_t flipper_rfidbeacon_app()
letterPosition = 0;
draw = 0;
}
else enableCW = 0;
else
{
RFID_OFF(notification);
enableCW = 0;
}

mutexVal.enableCW_mutex = enableCW;
screenRefresh = 1;
Expand All @@ -154,7 +181,7 @@ int32_t flipper_rfidbeacon_app()
furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);

if (mutexVal.status != 0) mutexVal.status--;
else mutexVal.status = 35;
else mutexVal.status = 53;

screenRefresh = 1;
furi_mutex_release(mutexVal.mutex);
Expand All @@ -163,7 +190,7 @@ int32_t flipper_rfidbeacon_app()
{
furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);

if (mutexVal.status != 35) mutexVal.status++;
if (mutexVal.status != 53) mutexVal.status++;
else mutexVal.status = 0;

screenRefresh = 1;
Expand Down
Binary file removed img/off.png
Binary file not shown.
Binary file removed img/onair.png
Binary file not shown.
Binary file added img/screen1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screen2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screen3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 837404d

Please sign in to comment.