NFC 2 Click board Tag wont send data

Thread Starter

kamel2913

Joined Mar 6, 2015
43
I'm using nfc 2 click (NT3H2111), I tried via arduino to send data to my mobile phone using this code :

Code:
#include <Wire.h>

int i = 0;
int j = 0;




uint8_t NDEF_DATA[] = { 0x03, // NDEF Message
15, // Message size
0xD1, // Record header
1, // Type Length - 1 byte
11, // Payload Length - 11 bytes
'U', // Type / URI
0x01, // Payload
'm', 'i', 'k', 'r', 'o', 'e', '.', 'c', 'o', 'm',
0xFE
}; // NDEF Message End Mark


void setup()
{

delay(5000);
Wire.begin();
// initialisation de la liaison I2C
Serial.begin(9600);
// initialisation de la liaison série vers la console

Wipe_Tag() ;

Wire.beginTransmission(0x55);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(0x55, 7);
Serial.println("UUID:");
while(Wire.available())
{
Serial.print(Wire.read(),HEX);
}

delay(1000);
Serial.println();

Serial.println("Start wrting");
Wire.beginTransmission(0x55);
Wire.write(0x01);

for (i = 0; i < 16; i++)
{
Wire.write(NDEF_DATA[i]); //Fill Block with Data
}
Wire.endTransmission();
delay(50);

Wire.beginTransmission(0x55);
Wire.write(0x02);

for (i = 16; i < 32; i++)
{
if(i<=18)
 Wire.write(NDEF_DATA[i]); //Fill Block with Data
else
 Wire.write(0x00);
}
Wire.endTransmission();
delay(50);

Serial.println("Start wrting");

}
void loop()
{

}

void Wipe_Tag()
{
for (i = 1; i < 50; i++)
{
Wire.beginTransmission(0x55);
Wire.write(i);
for (j = 0; j < 16; j++)
{
Wire.write(0x00); //Fill Block with Zeros
}
Wire.endTransmission();
delay(50); //Delay 50 ms

}
}
All I get is the right UUID than nothing happened, if I try to put my phone I can't read nothing ( it should send me to mikroe website).

As I'm using the nfc 2 click from mikroe.

Thanks for reading.
 
Top