dingo35 / SmartEVSE-3.5

Smart Electric Vehicle Charging Station (EVSE)
MIT License
38 stars 13 forks source link

Feature request: RFID.txt cannot contain more than 19 rfid's #77

Closed fluppie closed 1 month ago

fluppie commented 1 month ago

Describe the bug When you upload a rfid.txt file with more than 19 lines, the RFID's after line 19 don't work. "invalid rfid"

To Reproduce create a rfid.txt file with 19 entries. First upload with your test badge on line 19 and then after confirming this works, add another rfid and then put your testbadge in line 20. You will see the "invalid rfid" message.

Expected behavior Be able to use more than 19 rfid's :). I also tried increasing the memory in Onewire.cpp from 120 to 240 bytes, but that doesn't help me to work around the problem.

dingo35 commented 1 month ago

How many do you need? Where does it end ?

fluppie commented 1 month ago

I think around 100 RFID tags should be enough. Only 600 bytes :-). On the other hand, I think we have 4MB available? So shouldn't be an issue to have space for 1000 tags?

dingo35 commented 1 month ago

No its stored on the NVS partition that is 20k

fluppie commented 1 month ago

Do you know how much is used of this 20k? And what amount we can safely allocate to RFID tags? Another option (but probably more work, more testing etc) is LittleFS? https://github.com/espressif/arduino-esp32/tree/master/libraries/LittleFS

dingo35 commented 1 month ago

Could you test this for me: f959a7dce.zip

fluppie commented 1 month ago

With a 28 line tag list, this works. I'll try to generate some more fake tag numbers en put my tag as last.

fluppie commented 1 month ago

Tested a 49 line rfid.txt and looks to be working. Tested 4 badges spread through the file, L19, L29, L39 and L49. So I think whatever you have changed can be committed.

dingo35 commented 1 month ago

Ok thx for testing!