Skip to content

Commit

Permalink
Merge branch 'wip_protocol_refresh'
Browse files Browse the repository at this point in the history
* 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.
  ...
  • Loading branch information
doegox committed Sep 26, 2023
2 parents 98605be + 099fb6b commit 4747d38
Show file tree
Hide file tree
Showing 59 changed files with 3,875 additions and 2,253 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
fetch-depth: 0
- name: ghcr.io login
uses: docker/login-action@v2
with:
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
fetch-depth: 0
- name: Build firmware
env:
repo: ${{ github.repository }}
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
client_pipeline:
name: Build Firmware
uses: ./.github/workflows/build_client.yml
create_release:
create_dev_release:
permissions:
contents: write
name: Create dev pre-release with artifacts
Expand Down Expand Up @@ -49,3 +49,32 @@ jobs:
run: |
git tag -f dev
git push --tags -f
create_release:
permissions:
contents: write
name: Create tagged release with artifacts
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs:
- firmware_pipeline
- client_pipeline
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
name: release-artifacts
path: release-artifacts
- name: Upload to tagged release
uses: softprops/action-gh-release@v1
with:
body: |
Auto-Generated DFU packages for Release ${{ github.ref_name }}
Built from commit ${{ github.sha }}
name: Release ${{ github.ref_name }}
draft: false
target_commitish: ${{ github.sha }}
generate_release_notes: true
append_body: true
files: release-artifacts/*
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,34 @@ All notable changes to this project will be documented in this file.
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...

## [unreleased][unreleased]
- Added `hf settings blepair` command to get and set ble pairing enable state, and default disable ble pair. (@xianglin1998)

## [v2.0.0][2023-09-26]
- Changed APP_FW_VER now deduced from git tag vx.y.z (@doegox)
- Changed initial button wakeup from 4 to 8 seconds (@aramova)
- Added MIFARE Ultralight reading features (@FlUxIuS & @doegox)
- Fixed MF1 write mode SHADOW was not preserved properly (@doegox)
- Changed field LED now active also in reader mode to indicate that reader is powering the field (@doegox)
- Changed slot enabled logic: now we have separate enabled_hf and enabled_lf, changed GET_ENABLED_SLOTS and SET_SLOT_ENABLE (@doegox)
- Changed tag type enum to be ready for new types, changed stored slotConfig and GET_SLOT_INFO (@doegox)
- Added HF14A_RAW and its support in `hf 14a raw` (@xianglin1998)
- Removed MF1_DETECT_DARKSIDE (@doegox)
- Added MF1_STATIC_NESTED_ACQUIRE and its support in `hf mf nested` (@xianglin1998)
- Changed `hf 14a scan`: Automatically send RATS to 14443-4a tags (@augustozanellato)
- Changed Darkside: use LEDs for visual feedback of attack progression (@doegox)
- Changed Darkside: longer RF field off for reset and longer CLI timeout (@doegox)
- Fixed Darkside: parity byte-to-array bug made it low probability to succeed (@doegox)
- Changed `hw detection decrypt` show progression and remove duplicate keys (@doegox)
- Changed dynamic cmd_map_init() by static cmd_map initialization (@doegox)
- Changed `hf slot list` to add clarity and colors (@doegox)
- Changed `hf mf sim` and `hf mf info` to support ATS (still to be used in actual emulation) (@doegox)
- Changed `hf mf eload` and `hf mf eread`: uploads/downloads are now 30x faster (@doegox)
- Changed CLI HF14AInfo logic merged inside HF14AScan for more consistent display of the results (@doegox)
- Added guessed type information for NXP tags, and reorganization of HF information part. (@FlUxIuS)
- Changed `hw raw` to detail status message (@doegox)
- Changed CLI to query capabilities on connect, not on every single command if device does not support get_device_capabilities (@doegox)
- Changed CLI to not instanciate ChameleonCMD on every single command (@doegox)
- Changed massively the protocol and its handlers for more consistency and easier maintenance and future dev (@doegox)
- Added `hf settings blepair` command to get and set ble pairing enable state, and default disable ble pair (@xianglin1998)
- Added `hf mf info` command to get UID/SAK/ATQA from slot (@Foxushka)
- Added `hw raw` to send raw command to Chameleon (@Foxushka)
- Added command to fetch all available commands from Chameleon and test if Chameleon supports it (@Foxushka)
Expand Down
4 changes: 4 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,7 @@ Limitations:
* SWO pin is shared with... SWO so when e.g. reflashing the device, garbage may appear on the monitoring terminal.
* 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.
# Resources
* [nRF52840 Objective Product Specification v0.5.1](https://infocenter.nordicsemi.com/pdf/nRF52840_OPS_v0.5.1.pdf)
5 changes: 5 additions & 0 deletions docs/images/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all:
pdflatex --shell-escape protocol-packet.tex

clean:
rm *.aux *.log *.pdf
Binary file added docs/images/cli_staticnested.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/protocol-packet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/images/protocol-packet.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
\documentclass[border=10pt,png]{standalone}
\usepackage{bytefield}
\usepackage{xcolor}

\begin{document}

\definecolor{lightcyan}{rgb}{0.85,1,1}
\definecolor{lightgreen}{rgb}{0.85,1,0.85}
\definecolor{lightred}{rgb}{1,0.85,0.85}
\begin{bytefield}[bitwidth=1.1em]{32}
\bitbox{8}[bgcolor=lightcyan]{SOF} &
\bitbox{8}[bgcolor=lightcyan]{LRC1} &
\bitbox{16}[bgcolor=lightgreen]{CMD} \\
\bitbox{16}[bgcolor=lightgreen]{STATUS} &
\bitbox{16}[bgcolor=lightgreen]{LEN} \\
\bitbox{8}[bgcolor=lightgreen]{LRC2} &
\bitbox[tlr]{24}[bgcolor=lightred]{} \\
\wordbox[lr]{1}[bgcolor=lightred]{DATA} \\
\wordbox[lr]{1}[bgcolor=lightred]{$\cdots$} \\
\bitbox[blr]{24}[bgcolor=lightred]{} &
\bitbox{8}[bgcolor=lightred]{LRC3}
\end{bytefield}

\end{document}
Loading

0 comments on commit 4747d38

Please sign in to comment.