Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c496962
fix typo in FuriHalDebuging.md (#2667)
suspicious-pineapple May 14, 2023
8d1f5b0
[FL-3317] fbt: allow strings for fap_version field in app manifests (…
hedger May 14, 2023
341cd5e
[FL-3312] fix PIN retry count reset on reboot (#2671)
skotopes May 14, 2023
9dedcd0
api: added lib/nfc/protocols/nfc_util.h (#2674)
hedger May 15, 2023
d062ce7
Add new indexer (#2681)
drunkbatya May 19, 2023
d9fc408
fbt: Use union for old py (#2685)
xMasterX May 21, 2023
5f1ac6e
fbt: Fix tar uid overflow when packaging (#2689)
GMMan May 22, 2023
a821a2f
[FL-3328] Removed user-specific data from tar artifacts (#2691)
hedger May 23, 2023
711f0fe
[FL-3327] Storage: common_rename is now POSIX compliant (#2693)
DrZlo13 May 23, 2023
3217f28
Services: remove deallocator for persistent services (#2692)
skotopes May 23, 2023
88f0b63
Storage, common_rename: check that old path is exists (#2698)
DrZlo13 May 25, 2023
080324f
[FL-3315] Desktop,Rpc: desktop status subscription (#2696)
skotopes May 25, 2023
faa14cf
:sparkles: Add fr-FR-mac key layout (#2666)
FelixLgr May 25, 2023
ed1ebf9
[FL-3322] Infrared: respect carrier frequency and duty cycle settings…
gsurkov May 25, 2023
12dc5b1
USB HID report timeout (#2682)
nminaylov May 25, 2023
a472ff7
Add Airwell Prime DCI Series and match file style (#2686)
minchogaydarov May 25, 2023
77bb997
desktop: Refactor favorites settings and allow app browser in selecti…
GMMan May 25, 2023
490447b
NFC: Add support for Gen4 "ultimate card" in Magic app (#2238)
nullableVoidPtr May 25, 2023
5a7cd20
nfc: Fix MFUL tearing flags read (#2669)
GMMan May 26, 2023
4f054ed
api: added toolbox/api_lock.h (#2702)
hedger May 26, 2023
cce0485
Update ac.ir (#2701)
technobulb May 26, 2023
5f52382
nfc: Mifare Ultralight C detection (#2668)
GMMan May 26, 2023
44426c7
[LRFID] Add support for Nexkey/Nexwatch (#2680)
mauimauer May 29, 2023
f9390e0
Add Carrier 42QHB12D8S (#2707)
minchogaydarov May 29, 2023
66961da
BadUSB: script execution pause (#2700)
nminaylov May 29, 2023
363f555
Implement support for reading Opal card (Sydney, Australia) (#2683)
micolous May 29, 2023
3de856f
[FL-3295] FuriHal: add bus abstraction (#2614)
skotopes May 29, 2023
8d2ea14
[FL-3330] fbt: added hooks for build & dist environments; added FW_OR…
hedger May 29, 2023
a76c189
[FL-3335] Dolphin: new animation (#2713)
skotopes May 30, 2023
d09c59f
[FL-3340] SubGhz: fix flipper crashes after exiting broadcast blockin…
Skorpionm May 31, 2023
86a6448
NFC: Fix gen1 writing with invalid BCC (lost fix from PR #2511) (#2710)
AloneLiberty May 31, 2023
3a7203e
Update dolphin.py (#2717)
TherapyPup Jun 1, 2023
1d7966f
NFC: fix MFC timings (#2719)
gornekich Jun 1, 2023
d9a9fa0
FuriHal: disable bus re-initialization on early init and extra assert…
skotopes Jun 2, 2023
72ad22b
[DEVOPS-18]: Add map file parser, mariadb inserter (#2732)
drunkbatya Jun 5, 2023
1e512b6
[FL-3293] FuriHal: add system setting to device info, bump device inf…
skotopes Jun 6, 2023
76c70bd
[FL-3316] Settings: add contrast adjustment (#2737)
skotopes Jun 6, 2023
b0555d9
[FL-3213] f7: add PB9 to debug pins (#2738)
skotopes Jun 6, 2023
61394b8
[FL-3352] Dolphin: new animation (#2735)
skotopes Jun 6, 2023
a284d21
[FL-2872] Remove unused resources (#2740)
Astrrra Jun 6, 2023
e4a2e9a
Serial_CLI: Fixing serial cli logger error so it sounds more concise …
DXVVAY Jun 6, 2023
3e1f209
Furi: smaller critical enter and critical exit macro (#2716)
DrZlo13 Jun 6, 2023
dbd48a0
[FL-3331] SubGhz: add subghz_protocol_registry external API (#2712)
Skorpionm Jun 6, 2023
6f6ead1
[FL-3045] Fix core2 permisions (#2742)
drunkbatya Jun 6, 2023
754e640
[FL-3246] fbt, ufbt: added checks for appid in app manifests(#2720)
hedger Jun 7, 2023
09fae62
Map parser licence description (#2739)
glebmashanov Jun 7, 2023
436194e
[FL-3346] fbt: added Flipper selection when multiple are connected ov…
hedger Jun 8, 2023
c186d2b
added ISO15693 (NfcV) reading, saving, emulating and revealing from p…
g3gg0 Jun 8, 2023
3226254
[FL-3351] github: re-enabled f18 build (#2743)
hedger Jun 8, 2023
e5343fd
Scripts: WiFi board updater (#2625)
DrZlo13 Jun 8, 2023
e3e64e5
[FL-3267] ble: refactored bt gatt characteristics setup (#2587)
hedger Jun 8, 2023
1c306a0
[FL-3359] github: added debugapps artifact; packaging resources per-t…
hedger Jun 8, 2023
bff5921
FuriHal: always clock SMPS from HSI (#2643)
skotopes Jun 8, 2023
62939dd
Core2, SRAM2: provide safety gap (#2754)
DrZlo13 Jun 9, 2023
0e4344a
Services: simplify api (#2540)
DrZlo13 Jun 9, 2023
49d842e
weather_station: add oregon3 with THGR221 (#2748)
clashlab Jun 9, 2023
2312fe5
[FL-3361] fbt: stable build dates (#2751)
hedger Jun 9, 2023
4900e8b
[FL-3284] Fix reading Mifare Classic cards with unusual access condit…
Astrrra Jun 9, 2023
392bd3c
FuriHal: remove clock startup time tracking from clean builds (#2764)
skotopes Jun 13, 2023
b6dbf25
furi_hal_nfc: fix rfalTransceiveBitsBlockingTx's 4th argument to bits…
leommxj Jun 14, 2023
5334a0a
[FL-3376] Fixed GATT attribute order (#2776)
hedger Jun 15, 2023
4ddfe05
Debug: sync apps on attach, makes it possible to debug already starte…
skotopes Jun 16, 2023
681a43d
Merge branch 'dev' into gornek/nfc_refactoring
gornekich Jun 22, 2023
5a47145
hal nfc: add bus handling
gornekich Jun 22, 2023
87de71d
nfc hal: fix timers work
gornekich Jun 23, 2023
40537b1
nfc app: move old nfc suctom events
gornekich Jun 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
94 changes: 42 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

env:
TARGETS: f7
TARGETS: f7 f18
DEFAULT_TARGET: f7
FBT_TOOLCHAIN_PATH: /runner/_work

Expand Down Expand Up @@ -52,10 +52,8 @@ jobs:

- name: 'Make artifacts directory'
run: |
rm -rf artifacts
rm -rf map_analyser_files
mkdir artifacts
mkdir map_analyser_files
rm -rf artifacts map_analyser_files
mkdir artifacts map_analyser_files

- name: 'Bundle scripts'
if: ${{ !github.event.pull_request.head.repo.fork }}
Expand All @@ -66,28 +64,21 @@ jobs:
run: |
set -e
for TARGET in ${TARGETS}; do
TARGET="$(echo "${TARGET}" | sed 's/f//')"; \
./fbt TARGET_HW=$TARGET copro_dist updater_package \
${{ startsWith(github.ref, 'refs/tags') && 'DEBUG=0 COMPACT=1' || '' }}
done

- name: 'Move upload files'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
set -e
for TARGET in ${TARGETS}; do
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
./fbt TARGET_HW=$TARGET_HW copro_dist updater_package \
${{ startsWith(github.ref, 'refs/tags') && 'DEBUG=0 COMPACT=1' || '' }}
mv dist/${TARGET}-*/* artifacts/
tar czpf "artifacts/flipper-z-${TARGET}-resources-${SUFFIX}.tgz" \
-C assets resources
./fbt TARGET_HW=$TARGET_HW fap_dist
tar czpf "artifacts/flipper-z-${TARGET}-debugapps-${SUFFIX}.tgz" \
-C dist/${TARGET}-*/apps/Debug .
done

- name: "Check for uncommitted changes"
run: |
git diff --exit-code

- name: 'Bundle resources'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
tar czpf "artifacts/flipper-z-any-resources-${SUFFIX}.tgz" -C assets resources

- name: 'Bundle core2 firmware'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
Expand All @@ -96,45 +87,44 @@ jobs:
- name: 'Copy map analyser files'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
cp build/f7-firmware-*/firmware.elf.map map_analyser_files/firmware.elf.map
cp build/f7-firmware-*/firmware.elf map_analyser_files/firmware.elf
cp build/${DEFAULT_TARGET}-firmware-*/firmware.elf.map map_analyser_files/firmware.elf.map
cp build/${DEFAULT_TARGET}-firmware-*/firmware.elf map_analyser_files/firmware.elf
cp ${{ github.event_path }} map_analyser_files/event.json

- name: 'Upload map analyser files to storage'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: prewk/s3-cp-action@v2
with:
aws_s3_endpoint: "${{ secrets.MAP_REPORT_AWS_ENDPOINT }}"
aws_access_key_id: "${{ secrets.MAP_REPORT_AWS_ACCESS_KEY }}"
aws_secret_access_key: "${{ secrets.MAP_REPORT_AWS_SECRET_KEY }}"
source: "./map_analyser_files/"
dest: "s3://${{ secrets.MAP_REPORT_AWS_BUCKET }}/${{steps.names.outputs.random_hash}}"
flags: "--recursive --acl public-read"

- name: 'Trigger map file reporter'
- name: 'Analyse map file'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: peter-evans/repository-dispatch@v2
with:
repository: flipperdevices/flipper-map-reporter
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
event-type: map-file-analyse
client-payload: '{"random_hash": "${{steps.names.outputs.random_hash}}", "event_type": "${{steps.names.outputs.event_type}}"}'
run: |
source scripts/toolchain/fbtenv.sh
get_size()
{
SECTION="$1";
arm-none-eabi-size \
-A map_analyser_files/firmware.elf \
| grep "^$SECTION" | awk '{print $2}'
}
export BSS_SIZE="$(get_size ".bss")"
export TEXT_SIZE="$(get_size ".text")"
export RODATA_SIZE="$(get_size ".rodata")"
export DATA_SIZE="$(get_size ".data")"
export FREE_FLASH_SIZE="$(get_size ".free_flash")"
python3 -m pip install mariadb==1.1.6 cxxfilt==0.3.0
python3 scripts/map_parser.py map_analyser_files/firmware.elf.map map_analyser_files/firmware.elf.map.all
python3 scripts/map_mariadb_insert.py \
${{ secrets.AMAP_MARIADB_USER }} \
${{ secrets.AMAP_MARIADB_PASSWORD }} \
${{ secrets.AMAP_MARIADB_HOST }} \
${{ secrets.AMAP_MARIADB_PORT }} \
${{ secrets.AMAP_MARIADB_DATABASE }} \
map_analyser_files/firmware.elf.map.all

- name: 'Upload artifacts to update server'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
mkdir -p ~/.ssh
ssh-keyscan -p ${{ secrets.RSYNC_DEPLOY_PORT }} -H ${{ secrets.RSYNC_DEPLOY_HOST }} > ~/.ssh/known_hosts
echo "${{ secrets.RSYNC_DEPLOY_KEY }}" > deploy_key;
chmod 600 ./deploy_key;
rsync -avzP --delete --mkpath \
-e 'ssh -p ${{ secrets.RSYNC_DEPLOY_PORT }} -i ./deploy_key' \
artifacts/ ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${BRANCH_NAME}/";
rm ./deploy_key;

- name: 'Trigger update server reindex'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: curl -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
FILES=$(for CUR in $(ls artifacts/); do echo "-F files=@artifacts/$CUR"; done)
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
-F "branch=${BRANCH_NAME}" \
${FILES[@]} \
"${{ secrets.INDEXER_URL }}"/firmware/uploadfiles

- name: 'Find Previous Comment'
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ jobs:
steps:
- name: Trigger reindex
run: |
curl -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
"${{ secrets.INDEXER_URL }}"/firmware/reindex
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,25 @@ bindings/
.mxproject
Brewfile.lock.json

# Visual Studio Code
/.vscode/

# Kate
.kateproject
.kateconfig

# legendary cmake's
build
CMakeLists.txt

# bundle output
dist

# kde
.directory

# SCons
.sconsign.dblite


# Visual Studio Code
/.vscode

# bundle output
/dist

# SCons build dir
build/
/build

# Toolchain
/toolchain
Expand All @@ -64,3 +62,5 @@ PVS-Studio.log
*.PVS-Studio.*

.gdbinit

/fbt_options_local.py
6 changes: 4 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ distenv.Depends(firmware_env["FW_RESOURCES"], external_apps_artifacts.resources_

fap_deploy = distenv.PhonyTarget(
"fap_deploy",
"${PYTHON3} ${ROOT_DIR}/scripts/storage.py send ${SOURCE} /ext/apps",
"${PYTHON3} ${FBT_SCRIPT_DIR}/storage.py -p ${FLIP_PORT} send ${SOURCE} /ext/apps",
source=Dir("#/assets/resources/apps"),
)

Expand Down Expand Up @@ -323,7 +323,9 @@ distenv.PhonyTarget(
)

# Start Flipper CLI via PySerial's miniterm
distenv.PhonyTarget("cli", "${PYTHON3} ${FBT_SCRIPT_DIR}/serial_cli.py")
distenv.PhonyTarget(
"cli", "${PYTHON3} ${FBT_SCRIPT_DIR}/serial_cli.py -p ${FLIP_PORT}"
)


# Find blackmagic probe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ void lfrfid_debug_scene_tune_on_enter(void* context) {
furi_hal_rfid_comp_set_callback(comparator_trigger_callback, app);
furi_hal_rfid_comp_start();

furi_hal_rfid_pins_read();
furi_hal_rfid_tim_read(125000, 0.5);
furi_hal_rfid_tim_read_start();
furi_hal_rfid_tim_read_start(125000, 0.5);

view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidDebugViewTune);
}
Expand All @@ -43,6 +41,5 @@ void lfrfid_debug_scene_tune_on_exit(void* context) {

furi_hal_gpio_init_simple(&gpio_ext_pa7, GpioModeAnalog);
furi_hal_rfid_tim_read_stop();
furi_hal_rfid_tim_reset();
furi_hal_rfid_pins_reset();
}
4 changes: 2 additions & 2 deletions applications/external/hid_app/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ int32_t hid_usb_app(void* p) {

bt_hid_connection_status_changed_callback(BtStatusConnected, app);

DOLPHIN_DEED(DolphinDeedPluginStart);
dolphin_deed(DolphinDeedPluginStart);

view_dispatcher_run(app->view_dispatcher);

Expand Down Expand Up @@ -417,7 +417,7 @@ int32_t hid_ble_app(void* p) {
furi_hal_bt_start_advertising();
bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);

DOLPHIN_DEED(DolphinDeedPluginStart);
dolphin_deed(DolphinDeedPluginStart);

view_dispatcher_run(app->view_dispatcher);

Expand Down
2 changes: 1 addition & 1 deletion applications/external/mfkey32/mfkey32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ void mfkey32(ProgramState* program_state) {
}
if(keyarray_size > 0) {
// TODO: Should we use DolphinDeedNfcMfcAdd?
DOLPHIN_DEED(DolphinDeedNfcMfcAdd);
dolphin_deed(DolphinDeedNfcMfcAdd);
}
napi_mf_classic_nonce_array_free(nonce_arr);
napi_mf_classic_dict_free(user_dict);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#include "magic.h"
#include "classic_gen1.h"

#include <furi_hal_nfc.h>

#define TAG "Magic"

#define MAGIC_CMD_WUPA (0x40)
#define MAGIC_CMD_WIPE (0x41)
#define MAGIC_CMD_ACCESS (0x43)

#define MAGIC_MIFARE_READ_CMD (0x30)
Expand All @@ -15,27 +14,14 @@

#define MAGIC_BUFFER_SIZE (32)

bool magic_wupa() {
bool magic_gen1_wupa() {
bool magic_activated = false;
uint8_t tx_data[MAGIC_BUFFER_SIZE] = {};
uint8_t rx_data[MAGIC_BUFFER_SIZE] = {};
uint16_t rx_len = 0;
FuriHalNfcReturn ret = 0;

do {
// Setup nfc poller
furi_hal_nfc_exit_sleep();
furi_hal_nfc_ll_txrx_on();
furi_hal_nfc_ll_poll();
ret = furi_hal_nfc_ll_set_mode(
FuriHalNfcModePollNfca, FuriHalNfcBitrate106, FuriHalNfcBitrate106);
if(ret != FuriHalNfcReturnOk) break;

furi_hal_nfc_ll_set_fdt_listen(FURI_HAL_NFC_LL_FDT_LISTEN_NFCA_POLLER);
furi_hal_nfc_ll_set_fdt_poll(FURI_HAL_NFC_LL_FDT_POLL_NFCA_POLLER);
furi_hal_nfc_ll_set_error_handling(FuriHalNfcErrorHandlingNfc);
furi_hal_nfc_ll_set_guard_time(FURI_HAL_NFC_LL_GT_NFCA);

// Start communication
tx_data[0] = MAGIC_CMD_WUPA;
ret = furi_hal_nfc_ll_txrx_bits(
Expand All @@ -53,15 +39,10 @@ bool magic_wupa() {
magic_activated = true;
} while(false);

if(!magic_activated) {
furi_hal_nfc_ll_txrx_off();
furi_hal_nfc_start_sleep();
}

return magic_activated;
}

bool magic_data_access_cmd() {
bool magic_gen1_data_access_cmd() {
bool write_cmd_success = false;
uint8_t tx_data[MAGIC_BUFFER_SIZE] = {};
uint8_t rx_data[MAGIC_BUFFER_SIZE] = {};
Expand All @@ -86,15 +67,10 @@ bool magic_data_access_cmd() {
write_cmd_success = true;
} while(false);

if(!write_cmd_success) {
furi_hal_nfc_ll_txrx_off();
furi_hal_nfc_start_sleep();
}

return write_cmd_success;
}

bool magic_read_block(uint8_t block_num, MfClassicBlock* data) {
bool magic_gen1_read_block(uint8_t block_num, MfClassicBlock* data) {
furi_assert(data);

bool read_success = false;
Expand Down Expand Up @@ -122,15 +98,10 @@ bool magic_read_block(uint8_t block_num, MfClassicBlock* data) {
read_success = true;
} while(false);

if(!read_success) {
furi_hal_nfc_ll_txrx_off();
furi_hal_nfc_start_sleep();
}

return read_success;
}

bool magic_write_blk(uint8_t block_num, MfClassicBlock* data) {
bool magic_gen1_write_blk(uint8_t block_num, MfClassicBlock* data) {
furi_assert(data);

bool write_success = false;
Expand Down Expand Up @@ -170,44 +141,5 @@ bool magic_write_blk(uint8_t block_num, MfClassicBlock* data) {
write_success = true;
} while(false);

if(!write_success) {
furi_hal_nfc_ll_txrx_off();
furi_hal_nfc_start_sleep();
}

return write_success;
}

bool magic_wipe() {
bool wipe_success = false;
uint8_t tx_data[MAGIC_BUFFER_SIZE] = {};
uint8_t rx_data[MAGIC_BUFFER_SIZE] = {};
uint16_t rx_len = 0;
FuriHalNfcReturn ret = 0;

do {
tx_data[0] = MAGIC_CMD_WIPE;
ret = furi_hal_nfc_ll_txrx_bits(
tx_data,
8,
rx_data,
sizeof(rx_data),
&rx_len,
FURI_HAL_NFC_LL_TXRX_FLAGS_CRC_TX_MANUAL | FURI_HAL_NFC_LL_TXRX_FLAGS_AGC_ON |
FURI_HAL_NFC_LL_TXRX_FLAGS_CRC_RX_KEEP,
furi_hal_nfc_ll_ms2fc(2000));

if(ret != FuriHalNfcReturnIncompleteByte) break;
if(rx_len != 4) break;
if(rx_data[0] != MAGIC_ACK) break;

wipe_success = true;
} while(false);

return wipe_success;
}

void magic_deactivate() {
furi_hal_nfc_ll_txrx_off();
furi_hal_nfc_sleep();
}
Loading