# RawNFC command library

**URL:** <https://forum.dangerousthings.com/t/rawnfc-command-library/23294>\
**Category:** Projects\
**Created:** [September 19, 2024, 6:27pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294 "2024-09-19T18:27:50Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 19, 2024, 6:27pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/1 "2024-09-19T18:27:50Z")

</div>

# [RawNFC](https://dngr.us/rawnfc) Android App

[RawNFC](https://dngr.us/rawnfc) is an [open source](https://github.com/DangerousThings/RawNFC/) application developed by Dangerous Things to enable raw communication with compatible transponders, including non-NFC compliant transponders like Mifare Classic chips (only on compatible hardware).

You can sideload the APK from here;

[RawNFC.apk](https://forum.dangerousthings.com/uploads/short-url/7bEyo5xrLAWFJbeUZIZBdPt874g.apk) (538.0 KB)

The Google Play link is forthcoming.

# Custom URI command import

The app supports a custom URI scheme which allows you to simply tap a link to load a series of commands into [RawNFC](https://dngr.us/rawnfc) to be executed on whatever tag is tapped to the phone. This post / thread will stand as a library of commands meant to be used with the [RawNFC](https://dngr.us/rawnfc) app for Android.

The format of this URI is as follows;

`dnfc://{tag technology}/{commands in hex}`

As a simple example, the following command will return the GET\_VERSION (0x60) data for any NTAG family transponders;

`dnfc://NfcA/60`

[NTAG GET\_VERSION](dnfc://NfcA/60)

Another example is writing a blank NDEF record to an NTAG chip;

`dnfc://NfcA/A204E1100600/A2050303D000/A20600FE0000/A20700000000/A20800000000/A20900000000`

[NTAG\_BLANK\_NDEF](dnfc://NfcA/A204E1100600/A2050303D000/A20600FE0000/A20700000000/A20800000000/A20900000000)

If you have [RawNFC](https://dngr.us/rawnfc) installed and tap the link above, [RawNFC](https://dngr.us/rawnfc) will open and 60 will be pre-loaded into the input window;

 ![Screenshot_20240919-112609](https://dangerousthings-forum.b-cdn.net/original/3X/0/6/06211b83152a79e783a2393479412afa0ee0f6ee.png)

Now tap any NTAG family chip to execute the command and get back the VERSION information from the chip;

 ![Screenshot_20240919-112650](https://dangerousthings-forum.b-cdn.net/original/3X/3/a/3a03a6e01c16bcfe8571060f66ab6321ca89d36d.png)

The line numbers of the input textbox correspond to the line numbers in the output textbox. To share the output, long tap the output textbox to get an option to copy the command and response history to the clipboard;

```auto
-----BEGIN RAW NFC DUMP-----
android.nfc.tech.NfcA
> 60
< 0004040201001303
-----END RAW NFC DUMP-----

```

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 19, 2024, 10:39pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/2 "2024-09-19T22:39:00Z")

</div>

# NTAG TAG FIXES

This post contains various fixes for NTAG based products like the [xNT](https://dangerousthings.com/product/xNT/), [NExT](https://dangerousthings.com/product/next/), [flexNT](https://dangerousthings.com/product/flexnt/), [xSIID](https://dangerousthings.com/product/xSIID/), etc.

## Setting a blank NDEF on your Type 2 NFC tag

Sometimes NDEF records get borked which can cause problems writing or updating your NTAG / Ultralight. This is the first step in attempting a recovery.

> [Write blank NDEF](dnfc://NfcA/A204E1100600/A2050303D000/A20600FE0000/A20700000000/A20800000000/A20900000000)
> 
> This command will simply write a blank NDEF record starting at page 04 and null blank the following pages 07, 08, and 09 just for good measure. Each successful write should return 0A in acknowledgement.
> 
> ![image](https://dangerousthings-forum.b-cdn.net/original/3X/4/4/44aa0b1badedab427b809f88a460c0fafdfa407f.jpeg)

> [Authenticate first, then write blank NDEF](dnfc://NfcA/1BFFFFFFFF/A204E1100600/A2050303D000/A20600FE0000/A20700000000/A20800000000/A20900000000)
> 
> For people with write-protected user memory, the first line is an PWD\_AUTH command using the default FF FF FF FF password.
> 
> It is not possible to unset or remove the password, it must always be set to something, so usually that is the factory default of FF FF FF FF. If you have set your password to something else, swap out the FF FF FF FF for your 4 byte password in hexadecimal format before executing this command.
> 
> ![image](https://dangerousthings-forum.b-cdn.net/original/3X/f/8/f8b4ffd5cfe48a16a51bcec8955c01c2c57b1bf5.jpeg)

# [NExT v2 Factory Set](dnfc://NfcA/A203E1106D00/A20244000F00/A2E200007F00/A2E5444E4752/A2E3000000E3/A2040318D101/A20514550464/A2066E67722E/A20775732F73/A20863616E2D/A2096E657874/A20A7632FE00)

Programs a blank NTAG I2C as a [NExT](https://dangerousthings.com/product/next/)v2, setting the CC, locking lock bits, setting the password, changing AUTH0, and programming in the default URL [https://dngr.us/scan-nextv2](https://dngr.us/scan-nextv2)

---

<div class="post-metadata">

**Author:** ![Az\_F](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/az_f/32/28193_2.png) [@Az\_F](https://forum.dangerousthings.com/u/Az_F)\
**Post date:** [September 20, 2024, 1:53pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/3 "2024-09-20T13:53:25Z")

</div>

That’s cool! It’s also pretty much what I started building in Zinc. If I had known I would have waited 😅  
The custom Uri trick is going to be great for sharing, you could even store a series of commamds in an ndef this way. I can’t wait for someone to create some sort of trick where they load and write commamds off and on to a chip in a loop 😂

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 20, 2024, 5:10pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/4 "2024-09-20T17:10:57Z")

</div>

> [@Az\_F](#):
>
> can’t wait for someone to create some sort of trick where they load and write commamds off and on to a chip

No trick, it just works…

 ![Screenshot_20240920-101026](https://dangerousthings-forum.b-cdn.net/original/3X/6/6/66592314f452f4fb74dba8e1bde4977bf4f680f4.png)

The only reason I have to choose the OS tags intent is I have [MCT](https://play.google.com/store/apps/details?id=de.syss.MifareClassicTool&hl=en&gl=US) loaded too

---

<div class="post-metadata">

**Author:** ![Az\_F](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/az_f/32/28193_2.png) [@Az\_F](https://forum.dangerousthings.com/u/Az_F)\
**Post date:** [September 20, 2024, 5:35pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/5 "2024-09-20T17:35:00Z")

</div>

Haha awesome!  
I was thinking of having some basic non ncf commands in mine to make automation easier  
Ie:  
Basic loop  
Condition on the previous output  
Delay

So you can write something along the lines of:

> 60  
> IFOUTPUT( 00 01 00 02 04…)  
> 39:02  
> …  
> WAIT (10)  
> …  
> GOTO 0

Is that on your roadmap?

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 20, 2024, 5:51pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/6 "2024-09-20T17:51:14Z")

</div>

Not really… didn’t see the need to make a mini interpreted language out of it hahah 🙂 go nuts!

---

<div class="post-metadata">

**Author:** ![Az\_F](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/az_f/32/28193_2.png) [@Az\_F](https://forum.dangerousthings.com/u/Az_F)\
**Post date:** [September 20, 2024, 6:19pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/7 "2024-09-20T18:19:38Z")

</div>

> [@amal](#):
>
> go nuts!

![](https://media.tenor.com/1LDASDNiSu4AAAAM/ice-age-scratch.gif)

---

<div class="post-metadata">

**Author:** ![Jammyjellyfish](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/jammyjellyfish/32/39153_2.png) [@Jammyjellyfish](https://forum.dangerousthings.com/u/Jammyjellyfish)\
**Post date:** [September 20, 2024, 6:30pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/8 "2024-09-20T18:30:17Z")

</div>

Is this opensourced?

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 20, 2024, 7:19pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/9 "2024-09-20T19:19:40Z")

</div>

> [@Jammyjellyfish](#):
>
> Is this opensourced?

> **[GitHub - DangerousThings/RawNFC](https://github.com/DangerousThings/RawNFC/)**
>
> Contribute to DangerousThings/RawNFC development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Jammyjellyfish](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/jammyjellyfish/32/39153_2.png) [@Jammyjellyfish](https://forum.dangerousthings.com/u/Jammyjellyfish)\
**Post date:** [September 21, 2024, 2:15am UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/10 "2024-09-21T02:15:15Z")

</div>

hell yeah, love to see it

---

<div class="post-metadata">

**Author:** ![biovoid](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/biovoid/32/28363_2.png) [@biovoid](https://forum.dangerousthings.com/u/biovoid)\
**Post date:** [September 25, 2024, 11:52pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/11 "2024-09-25T23:52:56Z")

</div>

This is awesome; a much-needed tool in the current ecosystem. Thank you for sharing it with the community!

However, it appears to be missing a license file? Without it, it’s less ‘Open Source’ than ‘source-available’, as (in the US at least) [no license](https://choosealicense.com/no-permission/) doesn’t grant a right to let us do much with it. Please consider adding a free / open source software license!

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [September 26, 2024, 4:26am UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/12 "2024-09-26T04:26:51Z")

</div>

An oversight really… will pick a license and add … eventually 🙂

---

<div class="post-metadata">

**Author:** ![Papagajcik](https://forum.dangerousthings.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@Papagajcik](https://forum.dangerousthings.com/u/Papagajcik)\
**Post date:** [May 12, 2026, 7:11pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/13 "2026-05-12T19:11:31Z")

</div>

Hi, I tried the Factory set on my [NExT](https://dangerousthings.com/product/next/) V2 because I have had problems loading from my iPhone 12 mini for a long time and I keep getting this error on other phones and without a phone.

 ![stažený soubor](https://dangerousthings-forum.b-cdn.net/original/3X/b/e/be9e32fb1510da8b95a76a82728d2d771e528c7c.jpeg)

---

<div class="post-metadata">

**Author:** ![amal](https://forum.dangerousthings.com/user_avatar/forum.dangerousthings.com/amal/32/37192_2.png) [@amal](https://forum.dangerousthings.com/u/amal)\
**Post date:** [May 12, 2026, 7:51pm UTC](https://forum.dangerousthings.com/t/rawnfc-command-library/23294/14 "2026-05-12T19:51:49Z")

</div>

Hmm this seems like coupling to me. Can you get a read with [taginfo](https://forum.dangerousthings.com/t/how-to-share-nfc-chip-data-via-taginfo-app)?
