Skip to content

Commit 4747d38

Browse files
committed
Merge branch 'wip_protocol_refresh'
* wip_protocol_refresh: (38 commits) CI for releases changelog build_firmware.yml: fetch depth=0 to be able to build proper version strings Deduce APP_FW_VER from git tag bump app version style colors Increase initial button wakeup from 4 to 8 seconds Adding MIFARE Ultralight reading, wip hf14a_raw: use @expect_response and fix tests Fix shadow mode not being preserved. Breaking change: nfc_tag_mf1_write_mode_t has one new mode SHADOW_REQ. Client can set SHADOW or SHADOW_REQ, internally it will be transformed to SHADOW_REQ. When it's time to save data, if SHADOW_REQ, the fw will change it to SHADOW and still allow to save the data before acting as shadow. Breaking: when client reads back MF1 write mode just after settings SHADOW and before saving config, it will receive SHADOW_REQ and must be ready to handle this new enum value. MF1_DETECT_SUPPORT: remove redundant data Breaking change: DATA_CMD_GET_DEVICE_MODEL to match chameleon_device_type_t hw 14a raw: closer to pm3 syntax, removed bit_frame,... use field LED also in reader mode fix changelog new tag_specific_type_t enum, new slotConfig struct. FW will take care of existing slots. Disruptive changes: see below Implemented hf 14a raw Fixed initialization bugs and added raw command implementation functions. Update the table of MFC attack support levels. ...
2 parents 98605be + 099fb6b commit 4747d38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3875
-2253
lines changed

.github/workflows/build_firmware.yml

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
uses: actions/checkout@v3
2424
with:
2525
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
26+
fetch-depth: 0
2627
- name: ghcr.io login
2728
uses: docker/login-action@v2
2829
with:
@@ -56,6 +57,7 @@ jobs:
5657
uses: actions/checkout@v3
5758
with:
5859
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
60+
fetch-depth: 0
5961
- name: Build firmware
6062
env:
6163
repo: ${{ github.repository }}

.github/workflows/on_push.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
client_pipeline:
1414
name: Build Firmware
1515
uses: ./.github/workflows/build_client.yml
16-
create_release:
16+
create_dev_release:
1717
permissions:
1818
contents: write
1919
name: Create dev pre-release with artifacts
@@ -49,3 +49,32 @@ jobs:
4949
run: |
5050
git tag -f dev
5151
git push --tags -f
52+
create_release:
53+
permissions:
54+
contents: write
55+
name: Create tagged release with artifacts
56+
runs-on: ubuntu-latest
57+
if: startsWith(github.ref, 'refs/tags/v')
58+
needs:
59+
- firmware_pipeline
60+
- client_pipeline
61+
steps:
62+
- name: Check out the repo
63+
uses: actions/checkout@v3
64+
- name: Download release artifacts
65+
uses: actions/download-artifact@v3
66+
with:
67+
name: release-artifacts
68+
path: release-artifacts
69+
- name: Upload to tagged release
70+
uses: softprops/action-gh-release@v1
71+
with:
72+
body: |
73+
Auto-Generated DFU packages for Release ${{ github.ref_name }}
74+
Built from commit ${{ github.sha }}
75+
name: Release ${{ github.ref_name }}
76+
draft: false
77+
target_commitish: ${{ github.sha }}
78+
generate_release_notes: true
79+
append_body: true
80+
files: release-artifacts/*

CHANGELOG.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,34 @@ All notable changes to this project will be documented in this file.
33
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
44

55
## [unreleased][unreleased]
6-
- Added `hf settings blepair` command to get and set ble pairing enable state, and default disable ble pair. (@xianglin1998)
6+
7+
## [v2.0.0][2023-09-26]
8+
- Changed APP_FW_VER now deduced from git tag vx.y.z (@doegox)
9+
- Changed initial button wakeup from 4 to 8 seconds (@aramova)
10+
- Added MIFARE Ultralight reading features (@FlUxIuS & @doegox)
11+
- Fixed MF1 write mode SHADOW was not preserved properly (@doegox)
12+
- Changed field LED now active also in reader mode to indicate that reader is powering the field (@doegox)
13+
- Changed slot enabled logic: now we have separate enabled_hf and enabled_lf, changed GET_ENABLED_SLOTS and SET_SLOT_ENABLE (@doegox)
14+
- Changed tag type enum to be ready for new types, changed stored slotConfig and GET_SLOT_INFO (@doegox)
15+
- Added HF14A_RAW and its support in `hf 14a raw` (@xianglin1998)
16+
- Removed MF1_DETECT_DARKSIDE (@doegox)
17+
- Added MF1_STATIC_NESTED_ACQUIRE and its support in `hf mf nested` (@xianglin1998)
18+
- Changed `hf 14a scan`: Automatically send RATS to 14443-4a tags (@augustozanellato)
19+
- Changed Darkside: use LEDs for visual feedback of attack progression (@doegox)
20+
- Changed Darkside: longer RF field off for reset and longer CLI timeout (@doegox)
21+
- Fixed Darkside: parity byte-to-array bug made it low probability to succeed (@doegox)
22+
- Changed `hw detection decrypt` show progression and remove duplicate keys (@doegox)
23+
- Changed dynamic cmd_map_init() by static cmd_map initialization (@doegox)
24+
- Changed `hf slot list` to add clarity and colors (@doegox)
25+
- Changed `hf mf sim` and `hf mf info` to support ATS (still to be used in actual emulation) (@doegox)
26+
- Changed `hf mf eload` and `hf mf eread`: uploads/downloads are now 30x faster (@doegox)
27+
- Changed CLI HF14AInfo logic merged inside HF14AScan for more consistent display of the results (@doegox)
28+
- Added guessed type information for NXP tags, and reorganization of HF information part. (@FlUxIuS)
29+
- Changed `hw raw` to detail status message (@doegox)
30+
- Changed CLI to query capabilities on connect, not on every single command if device does not support get_device_capabilities (@doegox)
31+
- Changed CLI to not instanciate ChameleonCMD on every single command (@doegox)
32+
- Changed massively the protocol and its handlers for more consistency and easier maintenance and future dev (@doegox)
33+
- Added `hf settings blepair` command to get and set ble pairing enable state, and default disable ble pair (@xianglin1998)
734
- Added `hf mf info` command to get UID/SAK/ATQA from slot (@Foxushka)
835
- Added `hw raw` to send raw command to Chameleon (@Foxushka)
936
- Added command to fetch all available commands from Chameleon and test if Chameleon supports it (@Foxushka)

docs/development.md

+4
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,7 @@ Limitations:
345345
346346
* SWO pin is shared with... SWO so when e.g. reflashing the device, garbage may appear on the monitoring terminal.
347347
* SWO pin is also shared with the blue channel of the RGB slot LEDs, so faint blue may appear briefly when logs are sent and LED might not work properly when supposed to be blue.
348+
349+
# Resources
350+
351+
* [nRF52840 Objective Product Specification v0.5.1](https://infocenter.nordicsemi.com/pdf/nRF52840_OPS_v0.5.1.pdf)

docs/images/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
all:
2+
pdflatex --shell-escape protocol-packet.tex
3+
4+
clean:
5+
rm *.aux *.log *.pdf

docs/images/cli_staticnested.jpg

11.3 KB
Loading

docs/images/protocol-packet.png

-16.6 KB
Loading

docs/images/protocol-packet.tex

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
\documentclass[border=10pt,png]{standalone}
2+
\usepackage{bytefield}
3+
\usepackage{xcolor}
4+
5+
\begin{document}
6+
7+
\definecolor{lightcyan}{rgb}{0.85,1,1}
8+
\definecolor{lightgreen}{rgb}{0.85,1,0.85}
9+
\definecolor{lightred}{rgb}{1,0.85,0.85}
10+
\begin{bytefield}[bitwidth=1.1em]{32}
11+
\bitbox{8}[bgcolor=lightcyan]{SOF} &
12+
\bitbox{8}[bgcolor=lightcyan]{LRC1} &
13+
\bitbox{16}[bgcolor=lightgreen]{CMD} \\
14+
\bitbox{16}[bgcolor=lightgreen]{STATUS} &
15+
\bitbox{16}[bgcolor=lightgreen]{LEN} \\
16+
\bitbox{8}[bgcolor=lightgreen]{LRC2} &
17+
\bitbox[tlr]{24}[bgcolor=lightred]{} \\
18+
\wordbox[lr]{1}[bgcolor=lightred]{DATA} \\
19+
\wordbox[lr]{1}[bgcolor=lightred]{$\cdots$} \\
20+
\bitbox[blr]{24}[bgcolor=lightred]{} &
21+
\bitbox{8}[bgcolor=lightred]{LRC3}
22+
\end{bytefield}
23+
24+
\end{document}

0 commit comments

Comments
 (0)