MySQL Forums
Forum List  »  Connector/Arduino

Re: Packet Error
Posted by: Charles Bell
Date: October 14, 2014 02:08PM

I am not sure what exactly is wrong, but there is clearly a problem communicating with your server.

The packet error results when the packet length is invalid as read from the server. So the connector is receiving a badly formed packet back from the server. This has been known to be caused by either a bad Ethernet shield or using the old/wrong password protocol on the MySQL server.

I see you tried connecting via WB but have you tried using the MySQL client? The MySQL client, by default, uses the default protocol. I'd try it.

You can also turn on debug in mysql.h by uncommenting the #define VERBOSE and calling print_packet() when the connection fails. This will print the badly formed packet but it may not help much since the packet is poorly formed.

As for the Ethernet shield, you may want to try one of the Ethernet example sketches to test it. Pinging is a good a sign, but not a complete test.

Lastly, I have heard of at least one account where there was a conflict with the Arduino Ethernet shield and an Arduino clone. The example Ethernet sketches will eliminate that possibility.

Hope this helps.

Options: ReplyQuote

Written By
October 04, 2014 01:53PM
Re: Packet Error
October 14, 2014 02:08PM
November 01, 2014 04:46AM
November 05, 2014 09:03AM
November 07, 2014 12:13PM
November 07, 2014 01:19PM
November 14, 2014 02:08PM
November 19, 2014 01:39PM
November 19, 2014 03:46PM
November 26, 2014 10:14AM

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.