RFID1356MIFARE - Scan Interval not working properly and resets when changing mod

Started by GeorgeFlorian, April 05, 2021, 04:44:56 PM

Previous topic - Next topic

GeorgeFlorian

I am using the MOD-RFID1356MIFARE with an ESP32.

I've connected the board to the PC using the USB-CDC mode, I've set mt5000 and I've testes and it seemed to work.
Afterwards, I've changed to UART mode, I've connected the board to the ESP and I can read cards faster than 5000 ms.
I've sent the mt command on the serial to be sure:
     Serial1.print("mt5000\r"); // set read interval
      command = false;
      delay(500);
      if (Serial1.available() > 10)
      {
        String str = Serial1.readStringUntil((char)'>');
        Serial.println(str);
      }
I received OK from this, yet I can scan cards faster. The interval is around 2-3 seconds.

I've went back to USB-CDC mode, the set interval resets automatically (I don't know if it's supposed to do that because it is documented), I set it to 5000 again and I try to read different cards and it sometimes reads faster than 5000 ms.

The "trick" to reproduce this is to bring the card to the reader, then move it away from it(out of the read zone) and then bring it back close to the reader.

If you keep the card near the reader then the interval works on both ESP32 and PC, but if you move the card away and then bring it back it stops working properly.

Is this how it's supposed to work ?

LubOlimex

This is supposed to happen. The command doesn't change the scan interval, only the results repeat interval. This command is introduced to reduce clutter of multiple repeats of the ID of the same card.

There is no command to change the scan interval.
Technical support and documentation manager at Olimex

GeorgeFlorian

Quote from: LubOlimex on April 06, 2021, 08:12:57 AMThis is supposed to happen. The command doesn't change the scan interval, only the results repeat interval. This command is introduced to reduce clutter of multiple repeats of the ID of the same card.

There is no command to change the scan interval.

Ok. Got it.
Thanks.

GeorgeFlorian

Also, what exactly does the mku commands does ? It says it resets keys to ka=000000000000 and kb=FFFFFFFFFFFF. But what keys are we talking about ?

GeorgeFlorian

I've noticed that when the reader is connected through UART to the ESP the time it takes the reader to start sending data to serial is random.

I place the card near the reader and sometimes it sends data instantly, sometimes I have to wait more.

I am exclusively talking about the STARTING time of sending the data. The start time isn't affected by the code from the ESP32, because the only code found in void loop() is to read data sent on Serial.

Brian

Quote from: GeorgeFlorian on April 08, 2021, 04:32:03 PMAlso, what exactly does the mku commands does ? It says it resets keys to ka=000000000000 and kb=FFFFFFFFFFFF. But what keys are we talking about ?
The keys used by firmware to access cards.

Quote from: GeorgeFlorian on April 08, 2021, 05:23:31 PMI've noticed that when the reader is connected through UART to the ESP the time it takes the reader to start sending data to serial is random.
........

This interval depends on negotiation time between reader and card, not on software.