MySQL Forums :: Connector/Arduino :: Reconnecting to mysql connector


Advanced Search

Re: Reconnecting to mysql connector
Posted by: Noam Parness ()
Date: December 18, 2013 01:48PM

I just started playing with this library, on an Arduno Mega 2560 (clone).
It is receiving data over the serial port (at first using SoftwareSerial, but now using the Serial1 port), and then sending that to a MySQL database on the local network. I have it connected using an ENC28J60 ethernet adapter, and using the UIPEthernet library (which allows use of the same commands from the Ethernet library with the ENC28J60).

The Mega receives a stream of data approximately ever 10 seconds, and then is supposed to turn around and do a MySQL INSERT query to put the data into the database.
It works fine for a little while, but it usually breaks within 30 minutes or so (sometimes much faster). It gets to the point of sending the query, but it hangs at that point. I have to press the reset button on the Mega to get it going again.

I installed WireShark on the PC, but I didn't see anything unusual right before it hung.

Is there a way I can implement a "timeout," on the MySQL statemt, so it will jsut continue on if something doesn't work properly?

Thanks.

Options: ReplyQuote


Subject Views Written By Posted
Reconnecting to mysql connector 7857 Chris Watters 11/01/2013 01:10AM
Re: Reconnecting to mysql connector 2351 Darlington Adibe 11/01/2013 10:22PM
Re: Reconnecting to mysql connector 2138 Charles Bell 11/06/2013 06:48AM
Re: Reconnecting to mysql connector 1876 Milan Rotovnik 11/06/2013 09:35AM
Re: Reconnecting to mysql connector 2001 Charles Bell 11/07/2013 08:47AM
Re: Reconnecting to mysql connector 1714 Milan Rotovnik 11/11/2013 02:03PM
Re: Reconnecting to mysql connector 2154 Noam Parness 12/18/2013 01:48PM
Re: Reconnecting to mysql connector 1770 Charles Bell 12/18/2013 03:48PM
Re: Reconnecting to mysql connector 1748 Noam Parness 12/29/2013 09:48AM
Re: Reconnecting to mysql connector 1449 Noam Parness 12/30/2013 03:15PM
Re: Reconnecting to mysql connector 1471 Noam Parness 12/31/2013 11:50AM
Re: Reconnecting to mysql connector 1677 Noam Parness 01/06/2014 01:59PM
Re: Reconnecting to mysql connector 1461 Charles Bell 02/04/2014 03:45PM
Re: Reconnecting to mysql connector 1398 Noam Parness 02/04/2014 04:20PM
Re: Reconnecting to mysql connector 1444 Charles Bell 02/05/2014 01:15PM
Re: Reconnecting to mysql connector 1589 Noam Parness 02/05/2014 02:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.