Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:00:38+00:00 2026-06-07T08:00:38+00:00

I’m trying to write a simple Hello World string to the first block of

  • 0

I’m trying to write a simple “Hello World” string to the first block of sector 0 on a Mifare 1K tag. The tag is brand new with default configuration. The sector trailer (block 3), when read, is: 00 00 00 00 00 00 00 00 ff 07 80 69 ff ff ff ff ff ff ff ff. Hence, the access conditions is ff 07 80 69, meaning I can read and write on each block with key A.

Still, I can’t manage to write anything on the tag. Here’s my code:

try {
    mfc.connect();
    boolean auth = false;

    auth = mfc.authenticateSectorWithKeyA(0,MifareClassic.KEY_DEFAULT);

    if (auth) {

        String text = "Hello, World!";
        byte[] value  = text.getBytes();
        byte[] toWrite = new byte[MifareClassic.BLOCK_SIZE];        

        for (int i=0; i<MifareClassic.BLOCK_SIZE; i++) {
              if (i < value.length) toWrite[i] = value[i];
              else toWrite[i] = 0;
        }           

        mfc.writeBlock(0, toWrite);
   }    

I’m getting the following exception: Transceived failed.

What am I doing wrong?

Here’s the stack trace:

07-09 00:19:44.836: W/System.err(13167):    at android.nfc.TransceiveResult.getResponseOrThrow(TransceiveResult.java:52)
07-09 00:19:44.843: W/System.err(13167):    at android.nfc.tech.BasicTagTechnology.transceive(BasicTagTechnology.java:151)
07-09 00:19:44.843: W/System.err(13167):    at android.nfc.tech.MifareClassic.writeBlock(MifareClassic.java:453)
07-09 00:19:44.843: W/System.err(13167):    at com.example.andorid.apis.mifare.MainActivity.resolveIntent(MainActivity.java:128)
07-09 00:19:44.843: W/System.err(13167):    at com.example.andorid.apis.mifare.MainActivity.onNewIntent(MainActivity.java:275)
07-09 00:19:44.843: W/System.err(13167):    at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1123)
07-09 00:19:44.843: W/System.err(13167):    at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2041)
07-09 00:19:44.843: W/System.err(13167):    at android.app.ActivityThread.performNewIntents(ActivityThread.java:2054)
07-09 00:19:44.843: W/System.err(13167):    at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2063)
07-09 00:19:44.843: W/System.err(13167):    at android.app.ActivityThread.access$1400(ActivityThread.java:122)
07-09 00:19:44.843: W/System.err(13167):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1193)
07-09 00:19:44.851: W/System.err(13167):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-09 00:19:44.851: W/System.err(13167):    at android.os.Looper.loop(Looper.java:137)
07-09 00:19:44.851: W/System.err(13167):    at android.app.ActivityThread.main(ActivityThread.java:4340)
07-09 00:19:44.851: W/System.err(13167):    at java.lang.reflect.Method.invokeNative(Native Method)
07-09 00:19:44.851: W/System.err(13167):    at java.lang.reflect.Method.invoke(Method.java:511)
07-09 00:19:44.851: W/System.err(13167):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-09 00:19:44.851: W/System.err(13167):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-09 00:19:44.851: W/System.err(13167):    at dalvik.system.NativeStart.main(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:00:40+00:00Added an answer on June 7, 2026 at 8:00 am

    You are trying to write to block 0, which is not possible. Block 0 is always read-only, even of the access conditions say that it is writeable. Block 0 contais the UID and some other manufacturer data. Try writing to block 1 or 2 instead and see whether you still have the same problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I want use html5's new tag to play a wav file (currently only supported
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.