Grove NFC v1.1 does not work with UART

Hello,



I have bought a Grove NFC module v1.1 from Seedstudio and want to connect it to my Arduino Leonardo via UART. I know that communication via UART is the default mode. I have followed the instructions on the seed wiki website and installed all the required libraries. I have uploaded the example code for reading NFC tags via UART but it does not work.

I know that my NFC Tags are working with the Grove NFC module, because I can read them with another Grove NFC module connected via I2C.

I have tried using the Module with 3,3V and 5V. I have tried switching TX and RX.



I would appreciate any helpful advice.

Hi there!

Arduino Leonardo only one UART,So not support the UART mode of Grove NFC v1.1.And ,When I used mage2560 to run the demo, it succeeded. :smiley:

Hi,



thank you for replying to my post. I thought connecting via UART with a Leonoardo should work because it is recommended on the Wiki.

I tried connecting the Grove NFC module to my Arduino UNO via UART and it worked.

Hi there~



Please post your code and we can test it here. thanks.

Hi,

I am using the example Code from the wiki plus adding a few lines for visual feedback.

I get the “Scan a NFC tag” message on my serial monitor but it does not detect a Tag.



It worked with my Arduino UNO when I changed Serial1 to Serial, but that does not work with Leonardo. I get an error message

during compilation.

[code]
#include “PN532_HSU.h”
#include “PN532.h”
#include “NfcAdapter.h”

PN532_HSU interface(Serial1);
NfcAdapter nfc = NfcAdapter(interface);

#define rLED 8

void setup(void) {
Serial.begin(115200);
nfc.begin();
Serial.println(“NDEF Reader”);
pinMode(rLED, OUTPUT);

// testing LED functionality
digitalWrite(rLED, HIGH);
delay(200);
digitalWrite(rLED, LOW);
delay(200);
digitalWrite(rLED, HIGH);
delay(200);
digitalWrite(rLED, LOW);

}

void loop(void) {
Serial.println("\nScan a NFC tag\n");
if (nfc.tagPresent())
{
digitalWrite(rLED, HIGH);
delay(500);
digitalWrite(rLED, LOW);
NfcTag tag = nfc.read();
tag.print();
}
delay(5000);
}
[/code]

I have exactly the same problem.



Is there someone from seeed company which can answer to this questions:


  • The officiel documentation is talking about 1.0 NFC module. But i have 1.1 NFC Module. There are no documentations about 1.1 version. The soldering jumpers are not the same than the ones describes on the documentation. So does UART enabled by default ?


  • The official documentation connects the NFC Grove Module to UART on Grove base shield. This connector is mapped on Serial (pins 0 and 1 of Arduino). but the sample program contains Serial1. Where is the mistake ?


  • And i have a last question: How can i connect 3 NFC modules to the same Arduino. I have a base shield with 4 I2C connectors. But how can i “address” my modules ?



    Your documentation is very poor. I regret choosing your module. Please answer and update your documentation.



    Thanks



Hi ~, We see the same issue and we are looking @ the issue and keep you posted. thanks.

Can anyone from seedstudio answer to this question: Does this devices works with SPI ?

The tutorials shows a SPI folder but it not written anywhere if we can use SPI


Hi there~,

It does not support SPI. You can see from below schematic that the SCL and MISO are not connected. thanks.

[img]https://github.com/SeeedDocument/forum_doc/raw/master/image/SPI.png[/img]

Hi there~



Please see below replies.


  • The officiel documentation is talking about 1.0 NFC module. But i have 1.1 NFC Module. There are no documentations about 1.1 version. The soldering jumpers are not the same than the ones describes on the documentation. So does UART enabled by default ?



    The differences between v1.1 and v1.0 is 2 pads added on v1.1.

    The UART is enabled by default for v1.1.






  • The official documentation connects the NFC Grove Module to UART on Grove base shield. This connector is mapped on Serial (pins 0 and 1 of Arduino). but the sample program contains Serial1. Where is the mistake ?



    The code is used for the seeeduino lite(ATmega32u4), it has 2 uarts ports, one is serial1(digital 0/1) and the other is the micro usb port(serial). So the serial1 is right. But there is some issue with the whole code and we are looking @ the issue now.


  • And i have a last question: How can i connect 3 NFC modules to the same Arduino. I have a base shield with 4 I2C connectors. But how can i “address” my modules ?



    The Grove-RFC does not have the hardware i2c address configure, you can consider to use the software i2c.

    https://github.com/felias-fogg/SoftI2CMaster



    For the wiki and bazaar page, we sales with v1.1 now. We will update it by this week. thanks.

Hi there,



thanks for investigating this issue. I will wait for any news regarding this problem.

Thanks for your answer.



Why your library and your screenshots shows a PN532_SPI folder (and your sample programs) if your board cannot manage it ? I wasted a lot of time.



I am working with an Arduino Mega and a Grove Shield (i have tried the 2 shields: base and mega). It is impossible to make for the i2c connection.



Should i work with Wire or Wire1 (TwoWire) ?



Thanks

I am sorry but i do not understand anything.



If i want to work with i2c, i have to sold TP3 to SDA, TP2 to SCL, P1 to I2C.

The documentation says i have to “cut” connexions to TX, RX and UART. But i cannot see them.



Thanks

Hi,



the connections are on the PCB. You can use a knife to cut the connection between P1 and Uart.

After that check the connection between P1 and Uart with a multimeter.

I did use the Grove NFC v1.1 module with I2C. At first it did not work. After switching SDA and SCL on my Arduino it worked.

I do not know if it is supposed to be that way, but I was glad it worked after that.

Thanks very much for your help.



I cannot see any connexion between UART and P1. Look: This is a fresh and new Grove NFC 1.1 module:







There are no connexion between UART and P1…



Can we have an official answer from seeed about this SDA and SCL inversion ?



Thanks

Hi there,

the connection between P1 and UART is on the PCB. Bill.yu has posted the schematic of the module (05 Aug 2019 15:41). There u can see the connection between the two pads. I edited your picture for clarification.



Hi,



any news about the issue?

Hi there~



The uart works, please refer to the library and the code @ bottom as well. thanks



https://github.com/Seeed-Studio/Seeed_Arduino_NFC



http://wiki.seeedstudio.com/Grove_NFC/

[code]#include <NfcAdapter.h>
#include <PN532/PN532/PN532.h>
#if 0
#include <SPI.h>
#include <PN532/PN532_SPI/PN532_SPI.h>
PN532_SPI pn532spi(SPI, 9);
NfcAdapter nfc = NfcAdapter(pn532spi);
#elif 1

#include <PN532/PN532_HSU/PN532_HSU.h>
PN532_HSU pn532hsu(Serial1);
NfcAdapter nfc(pn532hsu);

#else

#include <Wire.h>
#include <PN532/PN532_I2C/PN532_I2C.h>

PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
#endif

void setup(void) {
SERIAL.begin(9600);
SERIAL.println(“NDEF Reader”);
nfc.begin();
}

void loop(void) {
SERIAL.println("\nScan a NFC tag\n");
if (nfc.tagPresent())
{
NfcTag tag = nfc.read();
tag.print();
}
delay(5000);
}[/code]

Hi there,



sry for my late response. The code works and I am now able to read NFC tags via UART with my Arduino Leonardo. Thanks for solving the issue!



I have another question about a different device. I wanted to connect the NFC reader module to a Blueduino (device link: <LINK_TEXT text=“https://wiki.aprbrother.com/en/BlueDuin … Guide.html”>https://wiki.aprbrother.com/en/BlueDuino_Rev2_Hookup_Guide.html</LINK_TEXT>). The BLE module of the Blueduino uses TX and RX (Serial1). I tried using the same code but it did not work. Is there any way I can connect the NFC module to my Blueduino via UART? I would really appreciate if you could help me.

Hi there~



It looks like the rx/tx is occupied by the bluetooth module. You can use the software serial to communicate with NFC. thanks.