Help with MFRC 522 RFID project intergating to local Mysql

Hello and Good Day

I wanna stary off by saying that I would say that Im relatively new to Arduino, ive done a couple of projects using the basic sensors and some coding. Now im suddenly doing a project outside of my range and Im really seeking any help I can get. My project involves me using an MFRC 522 reader to read a card tag and determine if it is authorized or not and Im using Arduino Uno which everything is working fine. Its goal is to scan the card for a book and determine if it is in the right shelf(the scanner is planned to be installed in a bookshelf) or not.

What I need to do is to have a confirmation database where in an Mysql is connected through arduino only using USb cable, I have heard of etherner and wifi shields however I do not have any router nor internet connection(no provider, literally has no isp) I am using windows10. I have also read some articles regarding posting data and reading etc, but in my case I want the database as a sort of just getting data and confirmation

for example we have book 1 and book 2 both with their respective tags, if I scan book 1, it will confirm and display the data columns like title, author and proper location from the row from the database table

will appreciate any help , sorry for my bad wording. Thank you

I dont think you are grasping your needs here.

If you have NO internet connection... where is this MySQL database located?

Locally?
LAN?
WAN?

I'm also not aware of HOW you plan on communicating with this MySQL DB (wherever it is located)

I have several posts around here using MySQL/PHP to communicate (some even using a finger print scanner in the equation... which is the same as RFID [in my mind.... more or less] as far as code structure goes)

Maybe it will help give you some background on this sort of things is done.

Sorry, yes im not entirely sure I grasp my needs and how to do it.

I am using xampp, phpmyadmin as my database so I would guess locally? sorry i dont have much experience and background on these and just rely on tutorials and example and codes. I have created some basic php websites before and has some experience connecting it to the database. One of my big problems is first how to connect my arduino to the phpmyadmin, and second the code and communication for the rfid reader and database.

I will definetely check your posts, thank you very much for helping.

xl97:
I dont think you are grasping your needs here.

If you have NO internet connection... where is this MySQL database located?

Locally?
LAN?
WAN?

I'm also not aware of HOW you plan on communicating with this MySQL DB (wherever it is located)

I have several posts around here using MySQL/PHP to communicate (some even using a finger print scanner in the equation... which is the same as RFID [in my mind.... more or less] as far as code structure goes)

Maybe it will help give you some background on this sort of things is done.

Thanks for the help

My project is now at the point where it needs to connect the ethernet shield to my laptop using ethernet cable, i am unable to use use router and we do not have internet access as well(home internet/wifi).

I am using

  • Local Apache / XAMPP / phpmyadmin

What im trying to see is whether is it possible to connect the ethernet shield locally through the rj45 port of my laptop and start from there. If not, can a mobile hotspot work as a "router" if not possible. Thank you for assisting this newbie.

nat2xtreme21:
What im trying to see is whether is it possible to connect the ethernet shield locally through the rj45 port of my laptop and start from there. If not, can a mobile hotspot work as a "router" if not possible. Thank you for assisting this newbie.

You should be able to connect your laptop & ethernet shield. You'll need a crossover cable though - a normal ethernet cable will not work.

wildbill:
You should be able to connect your laptop & ethernet shield. You'll need a crossover cable though - a normal ethernet cable will not work.

Definitely will check it out thanks, my concern is will it be able to work with a mobile hotspot(as I dont have a router nor wifi).

An update is I tried to connect it via normal ethernet cable and yes I think it has some errors, im not getting and Dhcp ip from it (im connected through my mobile hotspot). Sometimes it prints out an IP sometimes it doesn't, and in some instances when it does print out it changes from time to time(I refresh re click the serial monitor)

What im at now is I cant print out the DHCP IP from my arduino, im trying out these posts:
primarily this one : Ethernet Shield–Connecting with Laptop instead of direct Router | alselectro

these as well

http://forum.arduino.cc/index.php?topic=427571.0

  • Why would you think you would have any DHCP anywhere? My understanding is that is comes from a router? (but you dont have one)

What are you trying to get the IP of? the laptop? the Arduino/Ethernet shield?

Your WAMP install should run off 127.0.0.1 (locally)

Does that work? Is your web page being served up correctly? (locally)

Apperently not consistently as im using my mobile hotspot(thinking it can work the same as a wifi connection?)

I get the IP adress from the ethernet adapter Ethernet (comes from the connection from the rj45 slot of shield to laptop). This one I use for the codes where IP of computer is needed.

And for the DHCP for the codes that require IP of arduino which I cannot generate consistently, due to me test using my mobile hotspot(thinking it can be an alternative for a wifi generated by a router?)

Im just still testing the waters on the posts I saw and testing out their codes but none specifically cater to my situation. Yes I use "localhost" or the "127.0.0.1" when needed to, but its still not clear to me for the other parts.

What are my options on connecting my project without the router? Im seeking more of a LAN connection locally. I tried searching for similar project but none cater to my situation(no router no wifi, just plain connectivity over xampp).Any ideas would be much appreciated.

Maybe its just me lacking the exact tools needed for seamless project (like having a router and having wifi), to connect it locally to XAMPP

I dont have any experience attempting this locally without any sort of router (whether it be wifi or LAN)

Your Arduino should use the IP of your computer/laptop.. (you can assign it a static IP I believe)

Normally.. you would use the IP of your laptop (or whatever has your WAMP install)... and it will server up the 'localhost' content..

Thank you for the ideas. How do I assign this static IP over the arduino?

Also what options can be opened up to me (including the posts and tutorials I have searched) If I were to get my hands on a router module. My friend can lend me his "Linksys WRT54GH -Wireless-G Home Router with SpeedBurstRouter", which he is not using, and can it help me accomplish my target goal? Thank you a lot.

I would think that having a router would help, then you would have to fiddle with any IP assigning or what not..

On the Arduino.. you assign it a static IP in the code

On your laptop/PC you assign a static IP by doing the following:

  • Open Control Panel.
  • Click on Network and Internet.
  • Click on Network and Sharing Center.
  • On the left pane, click the Change adapter settings link. ...
  • Right-click the network adapter and select Properties.
  • Select the Internet Protocol Version 4 (TCP/IPv4) option.

but is that even needed using a crossover cable though?

have you tried just using 127.0.0.1 as the IP from the Arduino to connect to?

(curious)

So I managed to get my hands on the cisco router(it was wireless capabilities),no internet and now Im exploring the two options Im seeing:

  1. Connect Ethernet shield directly to laptop's rj45 and share "wifi"(since the router still generates I can connect to it while not having internet connection);
    Problems
    -Identifying the IP addresses, I get the default 192.168.137.1 IP for the ethernet adapter ethernet, and an autogenerated dhcp from the router. What im having trouble is the IP address shield is constantly changing everytime I do a serial monitor, and sometimes it remains static until I reset or disconnect from the connection.

2.Connect ethernet shield to the router and laptop connects to the router
Problems.

  • I get a reliable static IP address for the Ethernet shield and set manually a static IP adress for the router connection however I cant still manage to get a connection. And it still connects even though the IP address for arduino is incorrect as long as its not the same with the laptop ip. My guess is that the router-db connection is through but not the arduino?

ex.
IPAddress ip(192,168,1,103); //IP address for your arduino. this one is inconsistent in the shield to laptop connection, and for the router connection still connects even though ip is incorrect as long not the same as laptop ip

char server[] = ("192.168.1.109"); //IP address of your computer.