Skip to content

Commit a855bdc

Browse files
committed
Squashed 'applications/external/' changes from e86c037534..08ea67fc84
08ea67fc84 FBT doesn't like shared plugin names? ad684b5833 Merge gps_nmea from https://github.com/ezod/flipperzero-gps 0b67924db8 Merge magspoof from https://github.com/zacharyweiss/magspoof_flipper db9661ae05 Picopass: Fix plugin loading 91483ab Upd app.fam, fix cross-FW icon compatibility fa924248fe Format 7ba6bade84 Add picopass/plugin from https://gitlab.com/bettse/flipper-wiegand-plugin 893da4171b Picopass: Plugin as subtree f2542d903f Merge picopass from https://github.com/flipperdevices/flipperzero-good-faps 879465b5a3 Merge magspoof from https://github.com/zacharyweiss/magspoof_flipper ab15432 Refactor track autoselect 51179f0 Force-allow UART MSR setting beada60 Merge branch 'main' of https://github.com/zacharyweiss/magspoof_flipper f0cbf0d Remove unused DialogEx 3945d00 Update issue templates 6415944 Bump ver 6f05f69 Merge pull request #10 from zacharyweiss/settings ec38afd Invalid pin config logic & dialog d3dc37b Use settings pins in emulation ae5ca16 Prelim state save/load, refactoring 0acc57d Pin settings menu 3ad981c Fix filename not displayed 011a9b9 Direct file load testing, minor UART refactor facc698 Update README.md 472d08b Refactor name 27908ff2c9 picopass: Add wiegand parsing plugin (#205) 12808bd FW-specific macros, debug-locked items, reorder config bc8b69e Update module compatibility list. d14c2a7 Merge pull request #26 from haisenteck/patch-1 76d832f Fix missing brace. 38f6f63 Fix undeclared identifier. 6bc5c3d Apply all suggestions from code review. f66db0e Update gps_uart.h b98c1c5 Update gps_uart.c 20898f1 Update gps.c 967c911 Update README.md git-subtree-dir: applications/external git-subtree-split: 08ea67fc84e79ee39a2e0af08a174c50249bab6d
1 parent c1e6f51 commit a855bdc

36 files changed

+1012
-204
lines changed

gps_nmea/README.md

+38-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
# GPS for Flipper Zero
22

3-
A simple Flipper Zero application for NMEA 0183 serial GPS modules, such as the
4-
- Adafruit Ultimate GPS Breakout.
3+
[![FAP Build](https://github.com/ezod/flipperzero-gps/actions/workflows/build.yml/badge.svg)](https://github.com/ezod/flipperzero-gps/actions/workflows/build.yml)
54

6-
Heavy lifting (NMEA parsing) provided by minmea.
5+
A simple Flipper Zero application for NMEA 0183 serial GPS modules.
6+
7+
![ui](ui.png)
8+
9+
Heavy lifting (NMEA parsing) provided by [minmea].
10+
11+
## Installation
12+
13+
1. Navigate to the [FAP Build](https://github.com/ezod/flipperzero-gps/actions/workflows/build.yml)
14+
GitHub action workflow, and select the most recent run.
15+
2. The FAP is built for both the `dev` and `release` channels of the official
16+
firmware. Download the artifact corresponding to your firmware version.
17+
3. Extract `gps_nmea.fap` from the ZIP file to `apps/GPIO` on your Flipper
18+
Zero SD card.
719

820
## Usage
921

1022
This is a single-screen app, and a few interactions are provided via the
1123
hardware buttons:
1224

1325
- Long press the up button to change the **baud rate**. The default baud rate
14-
is 9600, but 19200, 38400, 57600, and 115200 baud are also supported.
26+
is 9600, but 4800, 19200, 38400, 57600, and 115200 baud are also supported.
1527
- Long press the right button to change **speed units** from knots to
1628
kilometers per hour.
1729
- Press the OK button to set the **backlight** to always on mode. Press it
@@ -23,14 +35,15 @@ hardware buttons:
2335
Connect the GPS module to power and the USART using GPIO pins 9 (3.3V), 11
2436
(GND), 13 (TX), and 14 (RX), as appropriate.
2537

38+
![wiring](wiring.png)
2639

27-
See the tutorial video - https://www.youtube.com/watch?v=5vSGFzEBp-k from
28-
Lab401 by RocketGod - https://github.com/RocketGod-git for a visual guide to
40+
See the [tutorial video](https://www.youtube.com/watch?v=5vSGFzEBp-k) from
41+
Lab401 by [RocketGod](https://github.com/RocketGod-git) for a visual guide to
2942
the hardware setup.
3043

31-
## Confirmed Compatible Modules
44+
### Confirmed Compatible Modules
3245

33-
* Adafruit Ultimate GPS Breakout
46+
* [Adafruit Ultimate GPS Breakout]
3447
* ATGM336H
3548
* Beitian BN-180
3649
* Beitian BN-220
@@ -42,17 +55,26 @@ the hardware setup.
4255
* Beitian BE-280
4356
* Beitian BN-280ZF
4457
* Beitian BN-357ZF
58+
* Fastrax UP500
59+
* [mRo GPS u-Blox Neo-M8N]
4560
* Royaltek RBT-2100LP
46-
* u-blox NEO-6M
47-
* u-blox NEO-7M
48-
* Uputronics u-blox MAX-M8C Pico
61+
* [u-Blox NEO-6M]
62+
* [u-Blox NEO-7M]
63+
* [Uputronics u-blox MAX-M8C Pico]
4964

5065
If you have verified this application working with a module not listed here,
5166
please submit a PR adding it to the list.
5267

53-
## Links
68+
## Building
69+
70+
This application can be compiled using [uFBT]. Run `ufbt` in the root directory
71+
of the repository.
5472

55-
Original repo link - https://github.com/ezod/flipperzero-gps
56-
Adafruit Ultimate GPS Breakout: https://www.adafruit.com/product/746
57-
minmea: https://github.com/kosma/minmea
58-
u-blox NEO-6M: https://www.u-blox.com/en/product/neo-6-series
73+
[Adafruit Ultimate GPS Breakout]: https://www.adafruit.com/product/746
74+
[minmea]: https://github.com/kosma/minmea
75+
[mRo GPS u-Blox Neo-M8N]: https://store.mrobotics.io/product-p/m10034-solo.htm
76+
[qFlipper]: https://flipperzero.one/update
77+
[u-Blox NEO-6M]: https://www.u-blox.com/en/product/neo-6-series
78+
[u-Blox NEO-7M]: https://www.u-blox.com/en/product/neo-7-series
79+
[uFBT]: https://github.com/flipperdevices/flipperzero-ufbt
80+
[Uputronics u-blox MAX-M8C Pico]: https://store.uputronics.com/index.php?route=product/product&product_id=72

gps_nmea/gps.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "constants.h"
33

44
#include <furi.h>
5+
#include <furi_hal_power.h>
56
#include <gui/gui.h>
67
#include <string.h>
78
#include <expansion/expansion.h>
@@ -38,7 +39,7 @@ static void render_callback(Canvas* const canvas, void* context) {
3839
32,
3940
AlignCenter,
4041
AlignBottom,
41-
gps_uart->backlight_enabled ? "Backlight enabled" : "Backlight disabled");
42+
gps_uart->backlight_on ? "Backlight enabled" : "Backlight disabled");
4243
break;
4344
case CHANGE_DEEPSLEEP:
4445
canvas_set_font(canvas, FontPrimary);
@@ -182,16 +183,16 @@ int32_t gps_app(void* p) {
182183
processing = false;
183184
break;
184185
case InputKeyOk:
185-
if(!gps_uart->backlight_enabled) {
186+
if(!gps_uart->backlight_on) {
186187
notification_message_block(
187188
gps_uart->notifications, &sequence_display_backlight_enforce_on);
188-
gps_uart->backlight_enabled = true;
189+
gps_uart->backlight_on = true;
189190
} else {
190191
notification_message_block(
191192
gps_uart->notifications, &sequence_display_backlight_enforce_auto);
192193
notification_message(
193194
gps_uart->notifications, &sequence_display_backlight_off);
194-
gps_uart->backlight_enabled = false;
195+
gps_uart->backlight_on = false;
195196
}
196197

197198
gps_uart->view_state = CHANGE_BACKLIGHT;
@@ -217,7 +218,6 @@ int32_t gps_app(void* p) {
217218

218219
gps_uart_init_thread(gps_uart);
219220
gps_uart->view_state = CHANGE_BAUDRATE;
220-
221221
furi_mutex_release(gps_uart->mutex);
222222
view_port_update(view_port);
223223
furi_delay_ms(1000);
@@ -259,7 +259,6 @@ int32_t gps_app(void* p) {
259259
}
260260
}
261261
}
262-
263262
if(gps_uart->view_state == NORMAL) {
264263
furi_mutex_release(gps_uart->mutex);
265264
view_port_update(view_port);

gps_nmea/gps_uart.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ typedef enum {
1111
#define WORKER_ALL_RX_EVENTS (WorkerEvtStop | WorkerEvtRxDone)
1212

1313
static void
14-
gps_uart_on_irq_cb(FuriHalSerialHandle* handle, FuriHalSerialRxEvent event, void* context) {
14+
gps_uart_on_irq_cb(FuriHalSerialHandle* handle, FuriHalSerialRxEvent ev, void* context) {
1515
GpsUart* gps_uart = (GpsUart*)context;
1616

17-
if(event == FuriHalSerialRxEventData) {
17+
if(ev == FuriHalSerialRxEventData) {
1818
uint8_t data = furi_hal_serial_async_rx(handle);
1919
furi_stream_buffer_send(gps_uart->rx_stream, &data, 1, 0);
2020
furi_thread_flags_set(furi_thread_get_id(gps_uart->thread), WorkerEvtRxDone);
2121
}
2222
}
2323

2424
static void gps_uart_serial_init(GpsUart* gps_uart) {
25+
furi_assert(!gps_uart->serial_handle);
26+
2527
gps_uart->serial_handle = furi_hal_serial_control_acquire(UART_CH);
2628
furi_check(gps_uart->serial_handle);
2729
furi_hal_serial_init(gps_uart->serial_handle, gps_uart->baudrate);
@@ -32,10 +34,11 @@ static void gps_uart_serial_init(GpsUart* gps_uart) {
3234
}
3335

3436
static void gps_uart_serial_deinit(GpsUart* gps_uart) {
35-
UNUSED(gps_uart);
37+
furi_assert(gps_uart->serial_handle);
3638
furi_hal_serial_async_rx_stop(gps_uart->serial_handle);
3739
furi_hal_serial_deinit(gps_uart->serial_handle);
3840
furi_hal_serial_control_release(gps_uart->serial_handle);
41+
gps_uart->serial_handle = NULL;
3942
}
4043

4144
static void gps_uart_parse_nmea(GpsUart* gps_uart, char* line) {
@@ -209,8 +212,8 @@ GpsUart* gps_uart_enable() {
209212
gps_uart->notifications = furi_record_open(RECORD_NOTIFICATION);
210213

211214
gps_uart->baudrate = gps_baudrates[current_gps_baudrate];
215+
gps_uart->backlight_on = false;
212216
gps_uart->speed_units = KNOTS;
213-
gps_uart->backlight_enabled = false;
214217
gps_uart->deep_sleep_enabled = false;
215218
gps_uart->view_state = NORMAL;
216219

gps_nmea/gps_uart.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
#include <momentum/momentum.h>
77

8-
#define UART_CH (momentum_settings.uart_nmea_channel)
9-
108
#define RX_BUF_SIZE 1024
9+
#define UART_CH (momentum_settings.uart_nmea_channel)
1110

1211
static const int gps_baudrates[6] = {4800, 9600, 19200, 38400, 57600, 115200};
1312
static int current_gps_baudrate = 1;
@@ -42,15 +41,16 @@ typedef struct {
4241
FuriThread* thread;
4342
FuriStreamBuffer* rx_stream;
4443
uint8_t rx_buf[RX_BUF_SIZE];
45-
FuriHalSerialHandle* serial_handle;
4644

4745
NotificationApp* notifications;
4846
uint32_t baudrate;
49-
bool backlight_enabled;
47+
bool backlight_on;
5048
bool deep_sleep_enabled;
5149
SpeedUnit speed_units;
5250
ViewState view_state;
5351

52+
FuriHalSerialHandle* serial_handle;
53+
5454
GpsStatus status;
5555
} GpsUart;
5656

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Select '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Versions & Hardware**
24+
- Firmware: [e.g. mntm-001, unlshd-072 , official 0.100.3]
25+
- MagSpoof: [e.g. Version 0.05, or commit {HASH}]
26+
- GPIO Module: [e.g. Rabbit-Labs Multi Pass]
27+
- Magstripe Reader: [e.g. MSR-90]
28+
29+
**Additional context**
30+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

magspoof/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# magspoof_flipper
2-
WIP of MagSpoof for the Flipper Zero. Basic TX of saved files confirmed working against an MSR90 with an external H-bridge module mirroring Samy Kamkar's design. Sample files with test data are included in `assets` for anyone wishing to experiment.
2+
WIP of MagSpoof for the Flipper Zero. Basic TX of saved files confirmed working against an MSR90 with an external H-bridge module mirroring Samy Kamkar's design. Sample files are included in `resources`.
33

44
RFID coil output weaker; able to be picked up/detected by more compact mag readers such as Square, but yet to have success with it being decoded/parsed properly. Additional investigation was made into alternate internal TX options (CC1101, ST25R3916, piezo); tentatively, RFID coil + speaker (`LF + P` config setting) results in the strongest internal TX tested to date but still weaker than a dedicated external module or an actual card swipe (and sounds like a dial-up modem from hell). For information on the state of internal TX &/or misc TODOs, known bugs, etc, confer `NOTES.md`.
55

magspoof/application.fam

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ App(
1818
fap_category="GPIO",
1919
fap_icon_assets="icons",
2020
fap_icon_assets_symbol="mag",
21-
fap_version=(0, 5), # major, minor
22-
fap_description="WIP MagSpoof port using the RFID subsystem",
21+
fap_version=(0, 7), # major, minor
22+
fap_description="Enables wireless transmission of magstripe data",
2323
fap_author="Zachary Weiss",
2424
fap_weburl="https://github.com/zacharyweiss/magspoof_flipper",
2525
)

0 commit comments

Comments
 (0)