M7e Hecto with ESP32 - “Module Failed to Respond - Check Wiring”

Hello all,

I’m pretty much having the same issue as another poster. I can’t seem to get past the “Module Failed to Respond” message.
I’m usin the M7E Hecto with an ESP32.

  • I have separate 5v power to the Hecto.
  • The Hecto ground and the ESP32 ground both one the same line as the 5v power ground.
  • The TX and RX are connected to the ESP 32 RX and TX.
  • I have the UART switch to SER.
  • The power light is constantly on.

I’m using the Example1_Constant_Read code.
I’ve updated it to reflect the previous poster with the similar issue, to no avail.

The following is the start of the code I’m using":

// Library for controlling the RFID module

#include "SparkFun_UHF_RFID_Reader.h"




// Create instance of the RFID module

RFID rfidModule;




// By default, this example assumes software serial. If your platform does not

// support software serial, you can use hardware serial by commenting out these

// lines and changing the rfidSerial definition below

//#include <SoftwareSerial.h>

//SoftwareSerial softSerial(2, 3); //RX, TX




// Here you can specify which serial port the RFID module is connected to. This

// will be different on most platforms, so check what is needed for yours and

// adjust the definition as needed. Some examples are provided below

//#define rfidSerial softSerial // Software serial (eg. Arudino Uno or SparkFun RedBoard)

 #define rfidSerial Serial1 // Hardware serial (eg. ESP32 or Teensy)

  #define RXD1 16

  #define TXD1 17

// Here you can select the baud rate for the module. 38400 is recommended if

// using software serial, and 115200 if using hardware serial.

//#define rfidBaud 38400

  #define rfidBaud 115200




// Here you can select which module you are using. This library was originally

// written for the M6E Nano only, and that is the default if the module is not

// specified. Support for the M7E Hecto has since been added, which can be

// selected below

//#define moduleType ThingMagic_M6E_NANO

 #define moduleType ThingMagic_M7E_HECTO




void setup()

{

  //Serial.begin(115200);

 Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);

 while (!Serial1); //Wait for the serial port to come online




  if (setupRfidModule(rfidBaud) == false)

  {

    Serial.println(F("Module failed to respond. Please check wiring."));

    while (1); //Freeze!

  }




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




  rfidModule.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
  rfidModule.startReading(); //Begin scanning for tags

}

Here is the wiring setup, the solder joints, etc.

Any help would be appreciated as I feel like I’ve tried everything.

Note: It works fine with URA and USB connection.

Regards,

Darius

I see the code is adjusted to use 16 & 17 which is good for rx2/tx2 on esp32

What is powering the USB power supply? If it only has a standard 500mA source that’s likely the issue (there’d be some degree of power loss when transforming, so the amps actually being delivered to the m7e would probably be too low as it can sink 600+ at max). If you power if with a different source does it work? (maybe just disconnect the vcc & gnd and try a usb-c wall wart to the usb port on m7e and re-test)

can you share the complete sketch you use. E.g. you commented out Serial.begin() in your example and how have you changed in setRfidModule() the rfidSerial ?

Try to use different pins for Serial ( e.g. RX - pin 25 and TX - pin 26) and / or use Serial2 (which I expect is already defined given the pins states RX2 and TX2)

As TS-Russel points out a strong power supply is important during active working especially with higher dBM. However when making a first connection, and for test, you can use the power from the VIN pin on the ESP32. Try that as well.

The external USB Power supply is conntected to a 2.4amp powered USB Hub. I can try connecting it to a wall wart.

maybe just disconnect the vcc & gnd and try a usb-c wall wart to the usb port on m7e and re-test

Is that possible? I feel like the documentation said that you can’t communicate via serial if you have it plugged in unless you modify the board (which I didn’t want to do).

Thank you for the assistance. I’ll try plugging the power supply into a wall wart and see how that works.

1 Like

Thanks for the response.
To be honest I was trying multiple permutations of the example sketch code. I also tried the code the previous poster was using.
Ultimately I’ve been trying a version of this:

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

// Create instance of the RFID module
RFID rfidModule;

#define rfidSerial Serial2 // Hardware serial (eg. ESP32 or Teensy)

#define rfidBaud 115200

#define moduleType ThingMagic_M7E_HECTO

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

if (setupRfidModule(rfidBaud) == false)
{
Serial.println(F(“Module failed to respond. Please check wiring.”));
while (1); //Freeze!
}

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

rfidModule.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

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

void loop()
{
if (rfidModule.check() == true) //Check to see if any new data has come in from module
{
byte responseType = rfidModule.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 = rfidModule.getTagRSSI(); //Get the RSSI for this tag read

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

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

  byte tagEPCBytes = rfidModule.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 (rfidModule.msg[31 + x] < 0x10) Serial.print(F("0")); //Pretty print
    Serial.print(rfidModule.msg[31 + x], HEX);
    Serial.print(F(" "));
  }
  Serial.print(F("]"));

  Serial.println();
}
else if (responseType == ERROR_CORRUPT_RESPONSE)
{
  Serial.println("Bad CRC");
}
else if (responseType == RESPONSE_IS_HIGHRETURNLOSS)
{
  Serial.println("High return loss, check antenna!");
}
else
{
  //Unknown response
  Serial.println("Unknown error");
}

}
}

boolean setupRfidModule(long baudRate)
{
rfidModule.begin(rfidSerial, moduleType); //Tell the library to communicate over serial port

rfidSerial.begin(baudRate); //For this test, assume module is already at our desired baud rate
delay(100); //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 (rfidSerial.available())
rfidSerial.read();

rfidModule.getVersion();

if (rfidModule.msg[0] == ERROR_WRONG_OPCODE_RESPONSE)
{
//This happens if the baud rate is correct but the module is doing a ccontinuous read
rfidModule.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
rfidSerial.begin(115200); //Start serial at 115200

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

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

delay(250);

}

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

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

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

return true; //We are ready to rock
}

I have the TX plugged into ESP32 RX2 and the RX plugged into ESP32 TX2
I’ve also tried switching them.
I have the power supply running from a wall wart now.
I tried using the Vin pin on the ESP32 and got the same result.

Perhaps I’m missing something?

Edit: apologies for the formatting. I’m not sure why it’s doing that.

Weird..

double check the switch is set to serial (move it back and forwward again)

In the sketch, before all setupRfidModule() in Setup(), can you add: rfidModule.enableDebugging(Serial);

And share the output

This was the output:
Time out 1: No response from module

sendCommand: [FF] [04] [06] [00] [01] [C2] [00] [A4] [60]

sendCommand: [FF] [00] [03] [1D] [0C]

Time out 1: No response from module

Module failed to respond. Please check wiring.

so the library is trying to set the new baudrate: sendCommand: [FF] [04] [06] [00] [01] [C2] [00] [A4] [60]

And tries a getversion () : sendCommand: [FF] [00] [03] [1D] [0C]

BUT NO answer…

The question is : Does the ESP32 really send the requests ? OR does the M7E NOT respond / react?

I have taken your sketch to my ESP32 and RFID, your sketch works. I only added setting Serial2.begin(115200, SERIAL_8N1, RXD1, TXD1) before calling setupRfidModule().

What happens if you connect the RX2 and TX2 pin together and run the test again ? Will it echo / receive the send command ?

I removed the TX and RX wire from the RFID reader and connected them, The output was should be something like:

sendCommand: [FF] [04] [06] [00] [01] [C2] [00] [A4] [60]
Time out 2: Incomplete response 9
sendCommand: [FF] [00] [03] [1D] [0C]
Time out 2: Incomplete response 5

This is what it outputs if I connect the TX2 and RX2 together on the ESP32:

sendCommand: [FF] [00] [03] [1D] [0C]

Time out 2: Incomplete response

sendCommand: [FF] [04] [06] [00] [01] [C2] [00] [A4] [60]

sendCommand: [FF] [00] [03] [1D] [0C]

Time out 2: Incomplete response

Module failed to respond. Please check wiring.

This means.. the ESP32 Serial is working. It must be the M7E on Serial not responding, as the USB connection is working (as you stated earlier).

WEIRD….. the only parts where they are different ;

The switch : Here is where either serial from the USB output OR Serial from the side is selected to the M7E. If it is set to SER.. it “should” work. Double… triple check :slight_smile:

The wires from the ESP32 to the M7E. You can easily check these wires. Just replace the orange or yellow with the grey ground wire. If the power led turns on… the orange or Yellow wire should be OK.

The soldering of the pins : They look good on the pictures. Maybe there is still a loose connection (although I have high doubts).

The power supply of 5V: although I doubt that as well, given you have a red power light and you tried different sources (wall wart, ESP32 VIN, other supply). That said I have seen the RFID chip go in uncontrolled state. Try to remove and re-apply and test again

If you happen to have an ohm meter.. you can check that the wires connection beyond the switch.

Success!.. I took off the power and ground wires and then reconnected them and got this:

sendCommand: [FF] [04] [06] [00] [01] [C2] [00] [A4] [60]

sendCommand: [FF] [00] [03] [1D] [0C]

response: [FF] [14] [03] [00] [00] [23] [01] [06] [00] [38] [00] [02] [01] [20] [24] [09] [13] [02] [01] [06] [08] [00] [00] [00] [10]

sendCommand: [FF] [02] [93] [00] [05] [51] [7D]

response: [FF] [00] [93] [00] [00]

sendCommand: [FF] [02] [91] [01] [01] [70] [3B]

response: [FF] [00] [91] [00] [00]

sendCommand: [FF] [01] [97] [01] [4B] [BC]

response: [FF] [00] [97] [00] [00]

sendCommand: [FF] [02] [92] [01] [F4] [40] [AD]

response: [FF] [00] [92] [00] [00]

Press a key to begin scanning for tags.

Ln 30, Col 3

ESP32 Dev Module

on COM8

I guess that might have been the issue. Thank you so much for your assistance with this!

Have a great weekend!

PS: I’ve seen the heat sinks attached to both the top (with the sticker and antennae) and bottom of the card. I’m assuming it goes on the bottom of the card over the plate with the caution warning under it. Is that correct?

1 Like

Thanks for the good news !!!

The M7E is very sensitive to good power supply. If you apply higher reading/writing power an external supply with a lot capacitors is important as it works in bursts. Most (if not all) wall warts will not do it. Think more about a lab power supply.

I would put the cooling block directly on top off the M7E to maximize the impact. That is what you normally do on CPU’s that needs cooling as well.

1 Like

On top of the card? Isn’t the bottom of the card where most of the heat goes; where the plate is?
Thanks again for the informative replies.

Check out Aluminum Heatsink 23 x 23 x 10mm (Self-Adhesive) - SparkFun Electronics..

I’ll pick one up.

You’re saying it should go on top of the card as opposed to the bottom of the card on the heat plate? I only as because it doesn’t seem like the top of the card gets that hot but the bottom does. Perhaps I haven’t run it long enough.

Maybe it is the bottom side for the M7E. I am used to different heatsync on processors. The Thingmagic PICO (a variant of the M7E) has a user guide. https://www.barcode-uk.com/files/admin/product_groups/20231205_PG_1701805010.pdf. In here at chapter 5.11.3 they show heat sync board. Make sure however to not short circuit any pins.

Our guide says bottom for m7e - though if concerned at all you could always do both! I’ve believed in overdoing stuff ever since

Thank you for clearing that up.

I was looking through the guide and it says that ideally I should use a usb-c to wall adapter to power the Hecto. If I power through USB-C port can I still connect to it via serial and ESP32? Are there jumpers I need to cut? I’ve tried using the Hecto with USB-C power and serial and I couldn’t get it to work. Perhaps I’m missing something.
Thank you in advance!

If using usb for power you’ll need to move the serial switch and use the ‘SERIAL’ area’s connections to communicate (the 4 that are labeled:[ TXO, RXI, VCC, GND], also note the voltage of 3.3v (Introduction - SparkFun Simultaneous RFID Reader - M7E Hookup Guide)

If using USB for comms is easier you can use a 5v mean-well supply (1A required, I recommend getting a 2A) and power the board with the Vin and GND

I’m currently using Serial for communication via the pins and have the UART set to Serial.
I have a 5v 700mA power supply module that I’m using to power the VIN pin. The ground pin is connected to the ESP32 ground.
If I understand you correctly, I can remove the power supply module and disconnect the VIN and can power via the USB-C port on the reader? I don’t have to do anything else?
I’ve tried that and it didn’t work for me.

My reason for wanting to change up the power connections is that I feel like the Reader isn’t getting enough power through the module. It reads tags a bit slower and not nearly as far away as when I plug in the USB-C and read using the Universal Reader Assistant.

There is a link in the guide to a USB-C to wall adapter that it recommends to use. I’d like to try that but when I plug into the USB-C (for power only) the reader stops communicating with the ESP32.

Thanks again for your help.