Skip to content

Commit

Permalink
Updated the command according to @whywilson's findings. and fixed the…
Browse files Browse the repository at this point in the history
… wrong byte aswell
  • Loading branch information
iceman1001 committed Apr 22, 2024
1 parent 4304372 commit fc2a3dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
- Updated windows workflow to use latest setup-wsl script (@iceman1001)
- Added a micro second clock in the client (@iceman1001)
- Fix `hf mfdes read` - buffer overflow when reading large files (@iceman1001)
- Changed `hf 15 csetuid` - now supports gen2 command (@iceman1001)
- Changed `hf 15 csetuid` - now supports gen2 command. Thanks @whywilson! (@iceman1001)
- Changed `hf mfp info` - to identify Ev2 (@iceman1001)
- Updated Graph Markers implementation to include temporary markers and marker labels (@HACKhalo2)
- Updated to SWIG 4.2.1 (@iceman1001)
Expand Down
20 changes: 10 additions & 10 deletions armsrc/iso15693.c
Original file line number Diff line number Diff line change
Expand Up @@ -2937,17 +2937,17 @@ void SetTag15693Uid(const uint8_t *uid) {
void SetTag15693Uid_v2(const uint8_t *uid) {

LED_A_ON();
uint8_t cmd[2][11] = {

// hf 15 raw -wac -d 02e00941 + uid first four bytes
{ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x00, 0x09, 0x41, uid[7], uid[6], uid[5], uid[4], 0x00, 0x00},

// hf 15 raw -wac -d 02e00940 + uid last four bytes
{ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x00, 0x09, 0x40, uid[3], uid[2], uid[1], uid[0], 0x00, 0x00}
uint8_t cmd[4][10] = {
{ ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x09, 0x47, 0x3f, 0x03, 0x8b, 0x00, 0x00, 0x00 },
{ ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x09, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
// hf 15 raw -wac -d 02 e0 09 41 + uid first four bytes
{ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x09, 0x41, uid[7], uid[6], uid[5], uid[4], 0x00, 0x00},
// hf 15 raw -wac -d 02 e0 09 40 + uid last four bytes
{ISO15_REQ_DATARATE_HIGH, ISO15693_MAGIC_WRITE, 0x09, 0x40, uid[3], uid[2], uid[1], uid[0], 0x00, 0x00}
};

AddCrc15(cmd[0], 9);
AddCrc15(cmd[1], 9);
AddCrc15(cmd[0], 8);
AddCrc15(cmd[1], 8);

uint8_t buf[ISO15693_MAX_RESPONSE_LENGTH] = {0x00};

Expand All @@ -2957,7 +2957,7 @@ void SetTag15693Uid_v2(const uint8_t *uid) {

int res = PM3_SUCCESS;

for (int i = 0; i < 2; i++) {
for (int i = 0; i < 4; i++) {
res = SendDataTag(
cmd[i],
sizeof(cmd[i]),
Expand Down

0 comments on commit fc2a3dd

Please sign in to comment.