Home Forums EasyTransfer Library Support Forum Problems with ET, Ethernet, and MySQL Reply To: Problems with ET, Ethernet, and MySQL

#3164
Anonymous
Inactive

It’s been a few months, and everything was working fine until this week.

I am adding another slave device into my setup, to capture electricity use and the production levels of my solar panels.

That part of the code (at least in testing mode – I haven’t wired it all up to the breaker box yet) is working.

Because of the distance between the units, I wanted to have the new “slave” send the data back to the “master” over a serial (RX,TX) connection, using EasyTransfer (of course).

So, I added a second instance of EasyTransfer (inbound on my master unit, outbound on the slave), and (as I described in another thread), I added a field to the existing (master–> slave) instance, to instruct the slave to send back its data.

Part of it is working, the other part is not. I can successfully get the data back, and process it (I’m displaying it to the serial monitor, and adding it into the main data array that is pushed to the mySQL server).

However, after the master unit receives data, it is no longer able to connect to the mySQL server (using Chuck Bell’s mysql_connector library). I’ve asked Dr. Bell for help from that end, as well.

If I don’t send the “send me data” command, the ETin.receiveData() function still runs, but has nothing new to report. The rest of the program (including the mySQL connection) runs just fine.

Is there anything in the receiveData() function that might be causing this, when there is data being received? Do I need to do something to stop the receiveData() function until I’m ready for it again?

Right now, I don’t have an “if” statement wrapping around the receiveData() function (like I do on the “slave” units). Do I need to add that, perhaps? Do you think it might help if I loop through the receive function a few times (long enough for the slave to respond with the data), and then drop out of it?

Thanks.

–Noam