M6E Nano UHF RFID with ESP32

Hey everyone

I don’t expect to get this working without using an UNO as a middleman, but I figured I’d ask anyway.

I’ve spent all day trying to get the M6E Nano RFID shield working with an ESP32.

I’ve tried both HardwareSerial and SoftwareSerial

nano.begin(baudRate) is what throws a Guru Meditation Error every single time.

Just for fun here’s the memory dump:

Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400f2860: 32004136 00004062 88004136
Core  1 register dump:
PC      : 0x400f2866  PS      : 0x00060a30  A0      : 0x800d16e7  A1      : 0x3ffb2220  
A2      : 0x3ffc2438  A3      : 0x3ffc2544  A4      : 0x00000003  A5      : 0x00000000  
A6      : 0x00000028  A7      : 0x00000000  A8      : 0x00000001  A9      : 0x3ffb2200  
A10     : 0x00000002  A11     : 0x3f40016a  A12     : 0x80081500  A13     : 0x3ffbf27c  
A14     : 0x3ffc2808  A15     : 0x00000040  SAR     : 0x00000007  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x40086855  LEND    : 0x40086865  LCOUNT  : 0xfffffffd  


Backtrace: 0x400f2863:0x3ffb2220 0x400d16e4:0x3ffb2240 0x400d1760:0x3ffb2260 0x400d3af2:0x3ffb2290

Anyway, going to just proceed with development using an Uno as a middleman. If in the almost zero chance someone finds this and has some advice, I’m open to it and happy to collab!

Thanks everyone.

I have got the M6E nano to work without problems on different ESP32 devices. While there is a challenge with level conversion, I never had this error. Looks to me a software problem.

can you share your sketch ?

what board do you use?

Which ESP32 library version do you use?

paulvha:
I have got the M6E nano to work without problems on different ESP32 devices. While there is a challenge with level conversion, I never had this error. Looks to me a software problem.

can you share your sketch ?

what board do you use?

Which ESP32 library version do you use?

Thanks Paul!

Yes I could throw the sketch back together but it seems I foolishly didn’t save any of my attempts.

I’m using an ESP32 “DEVKIT V1” (WROOM-32)

ESP32 library version?

I’ve attempted using SoftwareSerial, HardwareSerial, and need to give EspSoftwareSerial an honest attempt.

All of these are at their latest version as of the time of writing this.

Level shifting is the only part I’m confident is working properly, as serial communications between the ESP32 and Uno are also using the shifter and working flawlessly.

Since I’d strongly prefer to NOT use the UNO as a middleman, I’m going to de-solder my setup and reattach the M6E to the ESP32 and try again.

I’ll post the code I’m using once I finish it.

Arduino sketch running on the ESP32:

/*
  Reading multiple RFID tags, simultaneously!
  By: Nathan Seidle @ SparkFun Electronics
  Date: October 3rd, 2016
  https://github.com/sparkfun/Simultaneous_RFID_Tag_Reader

  Single shot read - Ask the reader to tell us what tags it currently sees. And it beeps!

  If using the Simultaneous RFID Tag Reader (SRTR) shield, make sure the serial slide
  switch is in the 'SW-UART' position.
*/

#include <SoftwareSerial.h>

#ifndef D5
#if defined(ESP8266)
#define D8 (15)
#define D5 (14)
#define D7 (13)
#define D6 (12)
#define RX (3)
#define TX (1)
#elif defined(ESP32)
#define D8 (5)
#define D5 (18)
#define D7 (23)
#define D6 (19)
#define RX (33)
#define TX (25)
#endif
#endif

#ifdef ESP32
#define BAUD_RATE 38400
#else
#define BAUD_RATE 38400
#endif

#undef SWAPSERIAL

#ifndef SWAPSERIAL
auto& usbSerial = Serial;
SoftwareSerial testSerial;
#else
SoftwareSerial usbSerial;
auto& testSerial = Serial;
#endif

#include <SoftwareSerial.h> //Used for transmitting to the device

//SoftwareSerial softSerial(33, 25); //RX, TX

#include "SparkFun_UHF_RFID_Reader.h" //Library for controlling the M6E Nano module
RFID nano; //Create instance

#define BUZZER1 9
//#define BUZZER1 0 //For testing quietly
#define BUZZER2 10

void setup()
{
  delay(5000);
  Serial.begin(38400);
  Serial.println("Debugging marker 0a");
  #ifndef SWAPSERIAL
    Serial.println("Debugging marker 0b");
    delay(200);
    usbSerial.begin(38400);
    Serial.println("SWAPSERIAL being used");
    // Important: the buffer size optimizations here, in particular the isrBufSize (11) that is only sufficiently
    // large to hold a single word (up to start - 8 data - parity - stop), are on the basis that any char written
    // to the loopback SoftwareSerial adapter gets read before another write is performed.
    // Block writes with a size greater than 1 would usually fail. Do not copy this into your own project without
    // reading the documentation.
    Serial.println("Debugging marker 0c");
    testSerial.begin(BAUD_RATE, SWSERIAL_8N1, D7, D8, false, 95, 11);
    Serial.println("Debugging marker 0d");
#else
    Serial.println("SWAPSERIAL not defined");
    testSerial.begin(38400);
    Serial.println("Debugging marker 0e");
    testSerial.setDebugOutput(false);
    Serial.println("Debugging marker 0f");
    testSerial.swap();
    usbSerial.begin(BAUD_RATE, SWSERIAL_8N1, RX, TX, false, 95);
#endif
    Serial.println("Debugging marker 0g");
    usbSerial.println(PSTR("\nSoftware serial test started"));

    for (char ch = ' '; ch <= 'z'; ch++) {
        testSerial.write(ch);
    }
    testSerial.println();

  Serial.println("Debugging marker 0h");
  //pinMode(BUZZER1, OUTPUT);
  //pinMode(BUZZER2, OUTPUT);

  //digitalWrite(BUZZER2, LOW); //Pull half the buzzer to ground and drive the other half.
  Serial.println("Debugging marker 0i");
  while (!Serial);
  Serial.println();
  Serial.println("Initializing...");
  Serial.println("Debugging marker 0j");
  if (setupNano(38400) == false) //Configure nano to run at 38400bps
  {
    Serial.println("Debugging marker 0k");
    Serial.println("Module failed to respond. Please check wiring.");
    while (1); //Freeze!
  }

  nano.setRegion(REGION_NORTHAMERICA); //Set to North America

  nano.setReadPower(500); //5.00 dBm. Higher values may cause USB port to brown out
  //Max Read TX Power is 27.00 dBm and may cause temperature-limit throttling
}

void loop()
{
  Serial.println(F("Press a key to scan for a tag"));
  while (!Serial.available()); //Wait for user to send a character
  Serial.read(); //Throw away the user's character

  byte myEPC[12]; //Most EPCs are 12 bytes
  byte myEPClength;
  byte responseType = 0;

  while (responseType != RESPONSE_SUCCESS)//RESPONSE_IS_TAGFOUND)
  {
    myEPClength = sizeof(myEPC); //Length of EPC is modified each time .readTagEPC is called

    responseType = nano.readTagEPC(myEPC, myEPClength, 500); //Scan for a new tag up to 500ms
    Serial.println(F("Searching for tag"));
  }

  //Beep! Piano keys to frequencies: http://www.sengpielaudio.com/KeyboardAndFrequencies.gif
  tone(BUZZER1, 2093, 150); //C
  delay(150);
  tone(BUZZER1, 2349, 150); //D
  delay(150);
  tone(BUZZER1, 2637, 150); //E
  delay(150);

  //Print EPC
  Serial.print(F(" epc["));
  for (byte x = 0 ; x < myEPClength ; x++)
  {
    if (myEPC[x] < 0x10) Serial.print(F("0"));
    Serial.print(myEPC[x], HEX);
    Serial.print(F(" "));
  }
  Serial.println(F("]"));
}

//Gracefully handles a reader that is already configured and already reading continuously
//Because Stream does not have a .begin() we have to do this outside the library
boolean setupNano(long baudRate)
{
  Serial.println("Debugging marker 1");
// tried this with both testSerial and usbSerial
  nano.begin(testSerial); //Tell the library to communicate over software serial port
  Serial.println("Debugging marker 2");
  //Test to see if we are already connected to a module
  //This would be the case if the Arduino has been reprogrammed and the module has stayed powered
  usbSerial.begin(baudRate); //For this test, assume module is already at our desired baud rate
  Serial.println("Debugging marker 3");
  while(!usbSerial); //Wait for port to open
  Serial.println("Debugging marker 4");
  //About 200ms from power on the module will send its firmware version at 115200. We need to ignore this.
  while(usbSerial.available()) usbSerial.read();
  Serial.println("Debugging marker 5");
  nano.getVersion();

  if (nano.msg[0] == ERROR_WRONG_OPCODE_RESPONSE)
  {
    //This happens if the baud rate is correct but the module is doing a ccontinuous read
    nano.stopReading();

    Serial.println(F("Module continuously reading. Asking it to stop..."));

    delay(1500);
  }
  else
  {
    //The module did not respond so assume it's just been powered on and communicating at 115200bps
    usbSerial.begin(115200); //Start software serial at 115200

    nano.setBaud(baudRate); //Tell the module to go to the chosen baud rate. Ignore the response msg

    usbSerial.begin(baudRate); //Start the software serial port, this time at user's chosen baud rate
  }

  //Test the connection
  nano.getVersion();
  if (nano.msg[0] != ALL_GOOD) return (false); //Something is not right

  //The M6E has these settings no matter what
  nano.setTagProtocol(); //Set protocol to GEN2

  nano.setAntennaPort(); //Set TX/RX antenna ports to 1

  return (true); //We are ready to rock
}

Output:

13:45:35.906 -> �Debugging marker 0a
13:45:35.906 -> Debugging marker 0b
13:45:36.118 -> SWAPSERIAL being used
13:45:36.118 -> Debugging marker 0c
13:45:36.118 -> Debugging marker 0d
13:45:36.118 -> Debugging marker 0g
13:45:36.118 -> 
13:45:36.118 -> Software serial test started
13:45:36.118 -> Debugging marker 0h
13:45:36.150 -> Debugging marker 0i
13:45:36.150 -> 
13:45:36.150 -> Initializing...
13:45:36.150 -> Debugging marker 0j
13:45:36.150 -> Debugging marker 1
13:45:36.150 -> Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
13:45:36.182 -> Memory dump at 0x400f28e0: 32004136 00004062 88004136
13:45:36.182 -> Core  1 register dump:
13:45:36.214 -> PC      : 0x400f28e6  PS      : 0x00060a30  A0      : 0x800d16b5  A1      : 0x3ffb2210  
13:45:36.214 -> A2      : 0x3ffc2438  A3      : 0x3ffc2544  A4      : 0x00000001  A5      : 0x00000003  
13:45:36.246 -> A6      : 0x3ffb7c80  A7      : 0x00000000  A8      : 0x800d2b08  A9      : 0x3ffb21f0  
13:45:36.278 -> A10     : 0x00000002  A11     : 0x3f400156  A12     : 0x00000013  A13     : 0x0000ff00  
13:45:36.310 -> A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000009  EXCCAUSE: 0x00000000  
13:45:36.310 -> EXCVADDR: 0x00000000  LBEG    : 0x40086819  LEND    : 0x40086829  LCOUNT  : 0xfffffffb  
13:45:36.342 -> 
13:45:36.342 -> 
13:45:36.342 -> Backtrace: 0x400f28e3:0x3ffb2210 0x400d16b2:0x3ffb2230 0x400d1891:0x3ffb2260 0x400d3b0a:0x3ffb2290
13:45:36.386 -> 
13:45:36.386 -> 
13:45:36.386 -> 
13:45:36.386 -> 
13:45:36.386 -> ELF file SHA256: 1f35cc08a98a8586
13:45:36.386 -> 
13:45:36.605 -> Rebooting...
13:45:36.605 -> 
$ "j=|���D�D���!"j�ґ"NE"�Zj�Z�ґ"sZ�*}P)^�TE֩)^�D֩�8�5�(^�"D֕Dh
13:45:36.651 ->

Whether I use EspSoftwareSerial (above), the standard SoftwareSerial, or HardwareSerial, the code throws a Guru Meditation Error at the exact same place every time.

Update:

I followed https://forum.sparkfun.com/viewtopic.ph … 56#p235156 this advice, rolling the ESP32 Board Definition back to 1.0.5 and I no longer get the Guru Meditation Error.

Now, the board simply fails to respond.

Progress!!

I have a Sparkfun ESP32 Thing and used the Expressif ESP32 version 2.0.7. Took example1, selected Serial2 connected the wires, compiled and it all worked in one go. The only aspect is that now in 2.0.7 also an EPC variable is defined for a completely different part of code. To quickly overcome that in the top of the file ‘SparkFun_UHF_RFID_Reader.h’ do an ‘#undef EPC’.

I have tried to use your sketch but the USBSerial / TestSerial & SWAPSERIAL are regularly mixed with each other and did not make sense to me. First, try the sketch below to keep it simple

Wires on the serial FTDI connector :

M6E        Sparkfun ESP32
GND        GND
VCC        VUSB 
RX         TX(17)
           RX(16)---! 
TX --------- 5k6 ---!--- 10K ---  GND  (the output is 5V while the ESP32 pin can handle 3v3, hence the voltage divider)

Sketch used :

/*
  Reading multiple RFID tags, simultaneously!
  By: Nathan Seidle @ SparkFun Electronics
  Date: October 3rd, 2016
  https://github.com/sparkfun/Simultaneous_RFID_Tag_Reader

  Constantly reads and outputs any tags heard

  If using the Simultaneous RFID Tag Reader (SRTR) shield, make sure the serial slide
  switch is in the 'SW-UART' position
*/

#include "SparkFun_UHF_RFID_Reader.h" //Library for controlling the M6E Nano module

// if you plan to use softserial:  initalize that here, else comment it out the 2 lines
//#include <SoftwareSerial.h> //Used for transmitting to the device
//SoftwareSerial softSerial(2, 3); //RX, TX

// define the serial port to use (E.g. softSerial, Serial1 etc)
#define NanoSerial Serial2

/////////////////////////////////////////////////////////////
/* define Region for Nano to operate
 * This will select the correct unlicensed frequency to use
 * in you area. Valid options :
 *
 * REGION_INDIA        REGION_JAPAN     REGION_CHINA
 * REGION_KOREA        REGION_AUSTRALIA REGION_NEWZEALAND
 * REGION_NORTHAMERICA REGION_EUROPE    REGION_OPEN
*////////////////////////////////////////////////////////////
#define NANOREGION REGION_NORTHAMERICA

//***************************************************
//       NO CHANGES NEEDED BEYOND THIS POINT        *
//***************************************************

RFID nano; //Create instance

void setup()
{
  Serial.begin(115200);
  while (!Serial); //Wait for the serial port to come online

  Serial.println(F("Example1: constant read"));

  if (setupNano(38400) == false) //Configure nano to run at 38400bps
  {
    Serial.println(F("Module failed to respond. Please check wiring."));
    while (1); //Freeze!
  }

  nano.setRegion(NANOREGION); //Set to the right region

  nano.setReadPower(500); //5.00 dBm. Higher values may caues USB port to brown out
  //Max Read TX Power is 27.00 dBm and may cause temperature-limit throttling

  Serial.println(F("Press a key to begin scanning for tags."));
  while (!Serial.available()); //Wait for user to send a character
  Serial.read(); //Throw away the user's character

  nano.startReading(); //Begin scanning for tags
}

void loop()
{

  if (nano.check() == true) //Check to see if any new data has come in from module
  {
    byte responseType = nano.parseResponse(); //Break response into tag ID, RSSI, frequency, and timestamp

    if (responseType == RESPONSE_IS_KEEPALIVE)
    {
      Serial.println(F("Scanning"));
    }
    else if (responseType == RESPONSE_IS_TAGFOUND)
    {
      //If we have a full record we can pull out the fun bits
      int rssi = nano.getTagRSSI(); //Get the RSSI for this tag read

      long freq = nano.getTagFreq(); //Get the frequency this tag was detected at

      long timeStamp = nano.getTagTimestamp(); //Get the time this was read, (ms) since last keep-alive message

      byte tagEPCBytes = nano.getTagEPCBytes(); //Get the number of bytes of EPC from response

      Serial.print(F(" rssi["));
      Serial.print(rssi);
      Serial.print(F("]"));

      Serial.print(F(" freq["));
      Serial.print(freq);
      Serial.print(F("]"));

      Serial.print(F(" time["));
      Serial.print(timeStamp);
      Serial.print(F("]"));

      //Print EPC bytes, this is a subsection of bytes from the response/msg array
      Serial.print(F(" epc["));
      for (byte x = 0 ; x < tagEPCBytes ; x++)
      {
        if (nano.msg[31 + x] < 0x10) Serial.print(F("0")); //Pretty print
        Serial.print(nano.msg[31 + x], HEX);
        Serial.print(F(" "));
      }
      Serial.print(F("]"));

      Serial.println();
    }
    else if (responseType == ERROR_CORRUPT_RESPONSE)
    {
      Serial.println("Bad CRC");
    }
    else
    {
      //Unknown response
      Serial.print("Unknown error");
    }
  }
}


//Gracefully handles a reader that is already configured and already reading continuously
//Because Stream does not have a .begin() we have to do this outside the library
boolean setupNano(long baudRate)
{
  nano.begin(NanoSerial); //Tell the library to communicate over serial port

  //Test to see if we are already connected to a module
  //This would be the case if the Arduino has been reprogrammed and the module has stayed powered
  NanoSerial.begin(baudRate); //For this test, assume module is already at our desired baud rate
  while(!NanoSerial); //Wait for port to open

  //About 200ms from power on the module will send its firmware version at 115200. We need to ignore this.
  while(NanoSerial.available()) NanoSerial.read();

  nano.getVersion();

  if (nano.msg[0] == ERROR_WRONG_OPCODE_RESPONSE)
  {
    //This happens if the baud rate is correct but the module is doing a ccontinuous read
    nano.stopReading();

    Serial.println(F("Module continuously reading. Asking it to stop..."));

    delay(1500);
  }

  else if (nano.msg[0] != ALL_GOOD)
  {
    //The module did not respond so assume it's just been powered on and communicating at 115200bps
    NanoSerial.begin(115200); //Start software serial at 115200

    nano.setBaud(baudRate); //Tell the module to go to the chosen baud rate. Ignore the response msg

    NanoSerial.begin(baudRate); //Start the serial port, this time at user's chosen baud rate

    //Test the connection
    nano.getVersion();
    if (nano.msg[0] != ALL_GOOD) return (false); //Something is not right
  }

  //The M6E has these settings no matter what
  nano.setTagProtocol(); //Set protocol to GEN2

  nano.setAntennaPort(); //Set TX/RX antenna ports to 1

  return (true); //We are ready to rock
}

paulvha:
I have a Sparkfun ESP32 Thing and used the Expressif ESP32 version 2.0.7. Took example1, selected Serial2 connected the wires, compiled and it all worked in one go. The only aspect is that now in 2.0.7 also an EPC variable is defined for a completely different part of code. To quickly overcome that in the top of the file ‘SparkFun_UHF_RFID_Reader.h’ do an ‘#undef EPC’.

I have tried to use your sketch but the USBSerial / TestSerial & SWAPSERIAL are regularly mixed with each other and did not make sense to me. First, try the sketch below to keep it simple

Wires on the serial FTDI connector :

M6E        Sparkfun ESP32

GND GND
VCC VUSB
RX TX(17)
RX(16)—!
TX --------- 5k6 —!— 10K — GND (the output is 5V while the ESP32 pin can handle 3v3, hence the voltage divider)




Sketch used :




/*
Reading multiple RFID tags, simultaneously!
By: Nathan Seidle @ SparkFun Electronics
Date: October 3rd, 2016
GitHub - sparkfun/Simultaneous_RFID_Tag_Reader: Evaluation board for the ThingMagic UHF RFID Module for use with 860 to 920MHz RFID Tags

Constantly reads and outputs any tags heard

If using the Simultaneous RFID Tag Reader (SRTR) shield, make sure the serial slide
switch is in the ‘SW-UART’ position
*/

#include “SparkFun_UHF_RFID_Reader.h” //Library for controlling the M6E Nano module

// if you plan to use softserial: initalize that here, else comment it out the 2 lines
//#include <SoftwareSerial.h> //Used for transmitting to the device
//SoftwareSerial softSerial(2, 3); //RX, TX

// define the serial port to use (E.g. softSerial, Serial1 etc)
#define NanoSerial Serial2

/////////////////////////////////////////////////////////////
/* define Region for Nano to operate

  • This will select the correct unlicensed frequency to use
  • in you area. Valid options :
  • REGION_INDIA REGION_JAPAN REGION_CHINA
  • REGION_KOREA REGION_AUSTRALIA REGION_NEWZEALAND
  • REGION_NORTHAMERICA REGION_EUROPE REGION_OPEN
    *////////////////////////////////////////////////////////////
    #define NANOREGION REGION_NORTHAMERICA

//***************************************************
// NO CHANGES NEEDED BEYOND THIS POINT *
//***************************************************

RFID nano; //Create instance

void setup()
{
Serial.begin(115200);
while (!Serial); //Wait for the serial port to come online

Serial.println(F(“Example1: constant read”));

if (setupNano(38400) == false) //Configure nano to run at 38400bps
{
Serial.println(F(“Module failed to respond. Please check wiring.”));
while (1); //Freeze!
}

nano.setRegion(NANOREGION); //Set to the right region

nano.setReadPower(500); //5.00 dBm. Higher values may caues USB port to brown out
//Max Read TX Power is 27.00 dBm and may cause temperature-limit throttling

Serial.println(F(“Press a key to begin scanning for tags.”));
while (!Serial.available()); //Wait for user to send a character
Serial.read(); //Throw away the user’s character

nano.startReading(); //Begin scanning for tags
}

void loop()
{

if (nano.check() == true) //Check to see if any new data has come in from module
{
byte responseType = nano.parseResponse(); //Break response into tag ID, RSSI, frequency, and timestamp

if (responseType == RESPONSE_IS_KEEPALIVE)
{
  Serial.println(F("Scanning"));
}
else if (responseType == RESPONSE_IS_TAGFOUND)
{
  //If we have a full record we can pull out the fun bits
  int rssi = nano.getTagRSSI(); //Get the RSSI for this tag read

  long freq = nano.getTagFreq(); //Get the frequency this tag was detected at

  long timeStamp = nano.getTagTimestamp(); //Get the time this was read, (ms) since last keep-alive message

  byte tagEPCBytes = nano.getTagEPCBytes(); //Get the number of bytes of EPC from response

  Serial.print(F(" rssi["));
  Serial.print(rssi);
  Serial.print(F("]"));

  Serial.print(F(" freq["));
  Serial.print(freq);
  Serial.print(F("]"));

  Serial.print(F(" time["));
  Serial.print(timeStamp);
  Serial.print(F("]"));

  //Print EPC bytes, this is a subsection of bytes from the response/msg array
  Serial.print(F(" epc["));
  for (byte x = 0 ; x < tagEPCBytes ; x++)
  {
    if (nano.msg[31 + x] < 0x10) Serial.print(F("0")); //Pretty print
    Serial.print(nano.msg[31 + x], HEX);
    Serial.print(F(" "));
  }
  Serial.print(F("]"));

  Serial.println();
}
else if (responseType == ERROR_CORRUPT_RESPONSE)
{
  Serial.println("Bad CRC");
}
else
{
  //Unknown response
  Serial.print("Unknown error");
}

}
}

//Gracefully handles a reader that is already configured and already reading continuously
//Because Stream does not have a .begin() we have to do this outside the library
boolean setupNano(long baudRate)
{
nano.begin(NanoSerial); //Tell the library to communicate over serial port

//Test to see if we are already connected to a module
//This would be the case if the Arduino has been reprogrammed and the module has stayed powered
NanoSerial.begin(baudRate); //For this test, assume module is already at our desired baud rate
while(!NanoSerial); //Wait for port to open

//About 200ms from power on the module will send its firmware version at 115200. We need to ignore this.
while(NanoSerial.available()) NanoSerial.read();

nano.getVersion();

if (nano.msg[0] == ERROR_WRONG_OPCODE_RESPONSE)
{
//This happens if the baud rate is correct but the module is doing a ccontinuous read
nano.stopReading();

Serial.println(F("Module continuously reading. Asking it to stop..."));

delay(1500);

}

else if (nano.msg[0] != ALL_GOOD)
{
//The module did not respond so assume it’s just been powered on and communicating at 115200bps
NanoSerial.begin(115200); //Start software serial at 115200

nano.setBaud(baudRate); //Tell the module to go to the chosen baud rate. Ignore the response msg

NanoSerial.begin(baudRate); //Start the serial port, this time at user's chosen baud rate

//Test the connection
nano.getVersion();
if (nano.msg[0] != ALL_GOOD) return (false); //Something is not right

}

//The M6E has these settings no matter what
nano.setTagProtocol(); //Set protocol to GEN2

nano.setAntennaPort(); //Set TX/RX antenna ports to 1

return (true); //We are ready to rock
}

Thanks, I’ll order one of those then. This one right? https://www.amazon.com/SparkFun-PID-139 … 148&sr=8-1

Ok I’ll give that #undef EPC a try as well.

Yes I saw that thread! :slight_smile: You’re incredibly helpful.

I did exactly that, used your Example 1 sketch with the voltage divider from the Nano’s Tx to the ESP’s Rx only I used a 4k7 instead of a 5k6. I’ve give the 5k6 a try now.

The link on Amazon is to the right board. 5k6 or 4K7 does not change a lot… both are good.