Hi to all, I'm developing an authentication system that receives inputs from a RFID reader and, if the code is correct, it opens a door.
The problem is that the code is stored in a MySQL database (which is frequently updated) and I can't assume to always have internet connection to send and receive requests from a remote server (with PHP/MySQL and JSON).
The best solution would be to have a local MySQL so Arduino UNO can always access it to authenticate the users in a faster and safer way and periodically receive updates from the remote server when internet is available.
The problem is: is there any way to make Arduino read the local MySQL?
I would like to avoid to install a MySQL Server on a computer and make Arduino communicate with the computer by a serial cable because in this way the computer would be very expensive.
How many RFID do you have in mind with your database? For authentication of a few IDs a DB is overkill, instead the IDs can be stored in RAM, flash or EEPROM and searched sequentially or by hash code. An Arduino with embedded TCP/IP protocol has much RAM available, much more than an Uno has.
Communication with the authentication server can be boiled down to messages of the kind "added/removed ID", which are requested by the Arduino whenever a connection is established. If required the Arduino also can send messages when the door has been opened by which ID, for further processing by the server.
I was thinking about the EEPROM solution, but the problem is that Arduino needs to store the timestamp for each access and create a new record in the database, so I think I cannot just store the value in the memory since I have to write information to the database, too.