<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cannot read data on Block Mifare 1K card data using MFRC522 module and nRF52DK?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119256/cannot-read-data-on-block-mifare-1k-card-data-using-mfrc522-module-and-nrf52dk</link><description>Hello everyone, 
 I am currently facing an issue when trying to read data from a block of a Mifare 1K card. After debugging, I found that my program fails to authenticate the sector of the block. Has anyone encountered this issue before? Enviroment: nrf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Mar 2025 15:12:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119256/cannot-read-data-on-block-mifare-1k-card-data-using-mfrc522-module-and-nrf52dk" /><item><title>RE: Cannot read data on Block Mifare 1K card data using MFRC522 module and nRF52DK?</title><link>https://devzone.nordicsemi.com/thread/525771?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 15:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b671f399-7116-4277-9071-43bd4c0d3d88</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am currently facing an issue when trying to read data from a block of a Mifare 1K card.&lt;/p&gt;[/quote]
&lt;p&gt;Have you been able to use any other SPI commands on the card? Or is this the first one, and it fails?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot read data on Block Mifare 1K card data using MFRC522 module and nRF52DK?</title><link>https://devzone.nordicsemi.com/thread/524279?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 09:32:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4241bce-7a02-401c-9ab0-cc060495d5d2</guid><dc:creator>akaza-2349</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;TM_MFRC522_STS_T MFRC522_Authenticate(uint8_t auth_mode, uint8_t block_addr, uint8_t *key, uint8_t *uid)
{

	TM_MFRC522_STS_T status;
	uint16_t recvBits;
	uint8_t i;
	uint8_t buff[12];

	//Verify the command block address + sector + password + card serial number
	buff[0] = auth_mode;
	buff[1] = block_addr;
	for (i = 0; i &amp;lt; 6; i++) {
		buff[i + 2] = *(key + i);
	}
	for (i = 0; i &amp;lt; 4; i++) {
		buff[i + 8] = *(uid + i);
	}
	status = TM_MFRC522_ToCard(PCD_AUTHENT, buff, 12, buff, &amp;amp;recvBits);
	k_sleep(K_MSEC(100));
	printk(&amp;quot;------------------Status: 0x%02X&amp;quot;, status);
	TM_MFRC522_RdReg(MFRC522_REG_STATUS2);
	if ((status != MI_OK)
			|| (!(TM_MFRC522_RdReg(MFRC522_REG_STATUS2) &amp;amp; 0x08))) {
		status = MI_ERR;
	}

	return status;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>