I realize this is probably a bit of a longshot but I am working on getting this MySQL Arduino Connector library, see here: ~chuck-bell/mysql-arduino/trunk : changes
So far I have gotten pretty much 90% of the way there (after fighting with it for the last couple days), it connects to the MySQL server, auths to the DB and writes records! The problem comes in after it writes (exactly) 4 records and then throws a socket error ("No Socket available"). This would appear to be just me running out of open sockets, seems like a fairly straightforward fix, close the connection when I am done writing right?
Since it is using the built in (it was written for the ethernet shield, not the wifi shield) libraries to establish a connection (client.connect()) I would think that client.stop(); would work. It doesn't...
I can however connect to the server using just the MySQL port (client.connect(server, 3306)) and then do a client.stop(); and that disconnects properly and free's up the socket properly without issue; So the problem would seem to have something to do with the way that the MySQL library handles the connection, more specifically it seems like it just doesn't have a proper "cleanup" routine.
This post doesn't seem to end in a question, I suppose I am just trying to get this to work so I am just laying out what I have done thus far and seeing if anyone out there has any input that could lead to a solution to the problem. I have attached the updated MySQL libraries (the ones I have updated), and the Sha Library (MySQL lib needs it), and a working Arduino example file. I just recently updated the firmware on the Wifi shield also, using the firmware from the latest IDE (1.0.5).
Thanks for any help!
J
mysql.rar (24.7 KB)