tag:blogger.com,1999:blog-2959317805805542041.post5501071256275502427..comments2024-03-26T21:47:37.919-07:00Comments on Chuck's Blog: New! MySQL Connector/Arduino release-1.0.4 GA and DocumentationChuckhttp://www.blogger.com/profile/02410977284521913938noreply@blogger.comBlogger46125tag:blogger.com,1999:blog-2959317805805542041.post-70911795591101595602016-05-17T14:14:38.845-07:002016-05-17T14:14:38.845-07:00You must use dtostrf(). See the example sketches. ...You must use dtostrf(). See the example sketches. For an array, you will need to loop through the values.<br /><br />Please use the latest version of the connector as described above.Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-21305745915936875342016-05-17T13:50:04.981-07:002016-05-17T13:50:04.981-07:00Hello Chuck,
is it possible to sent an array of fl...Hello Chuck,<br />is it possible to sent an array of float to mysql? <br />In former time i do this with a php script, now i wanna test it with direct acces to mysq.<br /><br />I've got an array of 16 temperatures code like this:<br /><br />float TempSensoren[16];<br />...<br />char INSERT_DATA[] = "INSERT INTO mysql.temperaturen (temp1,temp2) VALUES (TempSensoren[0],TempSensoren[1])";<br />....<br />if (my_conn.mysql_connect(server, 3306, user, passwort)) // Verbindung zum mysql-Server aufbauen<br /> {<br /> Serial.println("Verbunden, Sende Daten...");<br /> my_conn.cmd_query(INSERT_DATA);<br /> Serial.println("Daten an MYSQL.temperaturen uebertragen.");<br /><br />...<br />but this doesn't work.<br />I think the problem is the dynamic variable(array) in the insert_DATA[] perhaps ther will be an other way to push an array at once to the mysql..<br /><br />Anonymoushttps://www.blogger.com/profile/13386673279247530934noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-64987928188960792402016-05-16T05:54:38.376-07:002016-05-16T05:54:38.376-07:00Posts to this blog are now closed. Please see my b...Posts to this blog are now closed. Please see my blog of the latest release of the connector at http://drcharlesbell.blogspot.com/2016/01/new-release-mysql-connectorarduino-110a.html.<br /><br />You can download the connector via the Arduino IDE Library Manager! Just search for "MySQL".Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-10153037102964941282016-05-16T05:49:12.670-07:002016-05-16T05:49:12.670-07:00Sorry for the delay. I had some trouble with my Go...Sorry for the delay. I had some trouble with my Google account. Fixed now.<br /><br />Yes, you can. See the example sketches. Also, please start using the latest version of the connector, 1.1.1a available for download via the Library Manager in Arduino IDE. Just search for MySQL. Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-47214312899541220792016-05-16T04:36:37.914-07:002016-05-16T04:36:37.914-07:00Yes, of course you can. Look at "Complex sele...Yes, of course you can. Look at "Complex select" example..Anonymoushttps://www.blogger.com/profile/09872488235868779487noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-75491305198576466172016-05-12T21:47:53.718-07:002016-05-12T21:47:53.718-07:00Hi Chuck! Can I pass a char parameter to my SQL co...Hi Chuck! Can I pass a char parameter to my SQL command? Like this: SELECT mytable.id FROM mydb WHERE myCol = %s;<br />In this case, I'll use char myChar[] for parameter to my SQL command.SOS Infohttps://www.blogger.com/profile/06596966897925863379noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-48972299152799700732016-05-12T21:46:02.440-07:002016-05-12T21:46:02.440-07:00This comment has been removed by the author.SOS Infohttps://www.blogger.com/profile/06596966897925863379noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-9731866503409722992016-05-11T12:23:04.045-07:002016-05-11T12:23:04.045-07:00Ok. Done!Ok. Done!Anonymoushttps://www.blogger.com/profile/09872488235868779487noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-9723160897285611532016-05-11T10:13:26.628-07:002016-05-11T10:13:26.628-07:00Sorry. Wrong email. try this:
d r c h a r l e s b...Sorry. Wrong email. try this:<br /><br />d r c h a r l e s b e l l at g m a i l dot c o mChuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-6974030432555038422016-05-11T07:29:00.713-07:002016-05-11T07:29:00.713-07:00I sent you a mail! ThanksI sent you a mail! ThanksAnonymoushttps://www.blogger.com/profile/09872488235868779487noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-59966275233368966322016-05-11T06:10:06.597-07:002016-05-11T06:10:06.597-07:00Hello. I would have to see your entire sketch. Can...Hello. I would have to see your entire sketch. Can you send it to me?<br /><br />d r c h a r l e s at g m a i l dot c o mChuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-19848101852172942482016-05-11T04:45:37.069-07:002016-05-11T04:45:37.069-07:00Hi Chuck. Thanks for your great job!
I´m using:
-...Hi Chuck. Thanks for your great job!<br /><br />I´m using:<br />- Arduino Uno with standard Ethernet shield.<br />- Mariadb 5.5.5-10.1.13<br />- Running example Complex select<br />- My select is a “CALL procedure();”<br /><br />It hangs on the second loop. If i run the same sketch with a big big SELECT query runs ok.<br /><br />Using the same Complex select sketch with CALL procedure and using show_results() works fine.<br /><br />Seems It can’t get into the for of colum_names after the first loop.<br /><br />Any idea? Will continue doing tests.<br /><br />Thanks.<br /><br /><br />———<br />Serial output:<br /><br />Connecting...<br />Connected to server version 5.5.5-10.1.13-MariaDB<br />> Running SELECT with dynamically supplied parameter<br />RESULTADO<br />1<br />> Running SELECT with dynamically supplied parameter<br /><br /><br />> Running SELECT with dynamically supplied parameter<br />Bad mojo. EOF found reading column header.<br /><br />ERROR: You must read the columns first!<br />Anonymoushttps://www.blogger.com/profile/09872488235868779487noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-2960721873370828732016-05-01T12:39:05.604-07:002016-05-01T12:39:05.604-07:00Hello again Dr.
finally take the decision to upgra...Hello again Dr.<br />finally take the decision to upgrade the wifi shield and the problem was solved, thanks for your help and attention.<br />Ibai.Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-39069342704924720642016-04-22T02:20:13.520-07:002016-04-22T02:20:13.520-07:00i send you an email to d r c h a r l e s b e l l
i...i send you an email to d r c h a r l e s b e l l<br />i´s ok?Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-29855550050292235832016-04-22T02:19:28.825-07:002016-04-22T02:19:28.825-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-3923769166497189782016-04-22T00:54:36.733-07:002016-04-22T00:54:36.733-07:00drcharles? gmail.com?drcharles? gmail.com?Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-58244159873366075772016-04-21T12:58:43.377-07:002016-04-21T12:58:43.377-07:00Sorry, I haven't received your email.Sorry, I haven't received your email. Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-40969011777884985372016-04-21T12:00:15.635-07:002016-04-21T12:00:15.635-07:00I've sent you an emailI've sent you an emailAnonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-83121975506412386162016-04-20T05:44:50.966-07:002016-04-20T05:44:50.966-07:00Ok, are you sure? I must point out that the sketch...Ok, are you sure? I must point out that the sketch you posted will not work with the newer connector (version 1.1.1a). In fact, it is a sample sketch from version 1.0.4. <br /><br />Is it possible you have both installed and your sketch for the Ethernet test uses 1.1.1a but the WiFi sketch uses 1.0.4? I suspect that may be the case.<br /><br />Also, in the new connector (1.1.1a), you do not have to modify any files or uncomment out anything to use WiFi.<br /><br />https://github.com/ChuckBell/MySQL_Connector_Arduino/blob/master/extras/MySQL_Connector_Arduino_Reference_Manual.pdf <br /><br />Finally - assuming you do have 1.1.1a installed - if Ethernet is working but WiFi not, it is likely a problem with the WiFi network. The output from the Serial Monitor will show whether the WiFi shield connected to your WiFi network. Keep in mind if the WiFi network is a different subnet, you could have networking (and possibly permissions) issues that can cause problems. You can also check your WiFi shield by running one of the WiFi example sketches (the one that connects to google for example). If that sketch fails, it's your WiFi shield - which are prone to failing (sadly - guess how I know).<br /><br />If you are still having problems, let's continue this conversation via email. You can send me your sketch and the output of the Serial Monitor to:<br /><br />d r c h a r l e s at g m a i l dot c o mChuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-53001098127631829812016-04-20T03:45:45.507-07:002016-04-20T03:45:45.507-07:00I'm testing with the new connector, but the pr...I'm testing with the new connector, but the problem is the same. I opened all ports on my firewall, on the router, but can not connect with the server. <br />but i try whith the ethernet shield and the new connector and i get connected successfully with the mysql server, so I think it's no permissions problem.<br />i tried it whith arduino uno R2 and mega 2560, the wifi shield is the original and the firmware version is 1.0.0.<br /><br />I'm using MySQL WorkBench 6.2 CE<br />Thanks.Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-1572332773648615422016-04-19T07:12:39.800-07:002016-04-19T07:12:39.800-07:00Finally, if you still have trouble, it is helpful ...Finally, if you still have trouble, it is helpful to mention the Arduino board you are using, the WiFi shield (and version), and what version of MySQL you are using.Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-1627758056048141872016-04-19T07:10:57.822-07:002016-04-19T07:10:57.822-07:00Hi.
First, there is a newer version of the connec...Hi.<br /><br />First, there is a newer version of the connector that is much easier to use WRT WiFi. See https://github.com/ChuckBell/MySQL_Connector_Arduino.<br /><br />Please read the manual that's on the site for how to install the new connector. Hint: it's available for download directly from the Arduino IDE!<br /><br />Second, your sample sketch still has the junk SSID and password - perhaps that was intentional. Otherwise, unless there are permissions problems it should work.<br /><br />But again, try the new connector and the new wifi example sketch. <br /><br />If you still cannot connect, check the troubleshooting section in the manual as there are a number of things that can go wrong that are not related to the connector. Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-19910147165615365572016-04-19T02:50:16.046-07:002016-04-19T02:50:16.046-07:00Hi Chuck,
I have many problems when connecting wit...Hi Chuck,<br />I have many problems when connecting with the shield wifi. I connect to wireless router but not connect to the mysql server.<br />I unncoment 2 lines as you indicate in the manual, but I do not connect.<br />the code I use is that you include in the manual in the section baby steps Listing 2.<br />/**<br />* Example: Hello, MySQL!<br />*<br />* This code module demonstrates how to create a simple <br />* database-enabled sketch. With WiFi!<br />*/<br /><br />#include "SPI.h"<br />#include "Ethernet.h"<br />#include "sha1.h"<br />#include "WiFi.h"<br />#include "mysql.h"<br /><br />/* Setup for Ethernet Library */<br />byte mac_addr[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br />IPAddress server_addr(10, 0, 1, 10);<br /><br />/* Setup for the Connector/Arduino */<br />Connector my_conn; // The Connector/Arduino reference<br /><br />char user[] = "bob"; <br />char password[] = "secret";<br /><br />// WiFi card example<br />char ssid[] = "my_lonely_ssid";<br />char pass[] = "horse_no_name"; <br /><br />void setup() {<br /> Serial.begin(115200);<br /> while (!Serial);<br /> delay(1000);<br /> Serial.println("Looking for WiFi");<br /> // WiFi section<br /> int status = WiFi.begin(ssid, pass);<br /> // if you're not connected, stop here:<br /> if ( status != WL_CONNECTED) {<br /> Serial.println("Couldn't get a wifi connection");<br /> while(true);<br /> }<br /> // if you are connected, print out info about the connection:<br /> else {<br /> Serial.println("Connected to network");<br /> IPAddress ip = WiFi.localIP();<br /> Serial.print("My IP address is: ");<br /> Serial.println(ip);<br /> }<br /> delay(1000);<br /> Serial.println("Connecting...");<br /> if (my_conn.mysql_connect(server_addr, 3306, user, password)){<br /> Serial.println("Success!"); <br /> } else {<br /> Serial.println("Connection failed.");<br /> }<br />}<br /><br />void loop() {<br />}<br /><br /><br /><br /><br />Thanks.Anonymoushttps://www.blogger.com/profile/15970334463314925622noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-125903955539476652016-01-07T06:06:41.764-08:002016-01-07T06:06:41.764-08:00As long as the sha1 functions return the correct s...As long as the sha1 functions return the correct scrambled password, you can use any sha1 library with MySQL.<br /><br />I am not sure what you're trying to achieve, however I wish you success.<br /><br />If you need specific help with the Connector, please feel free to contact me.<br /><br />I might suggest you read the online MySQL internals document. It will answer all of your questions about how the connector works.Chuckhttps://www.blogger.com/profile/02410977284521913938noreply@blogger.comtag:blogger.com,1999:blog-2959317805805542041.post-1491739895314210912016-01-06T19:33:41.757-08:002016-01-06T19:33:41.757-08:00Thank you Chuck
I got one more question
In scram...Thank you Chuck<br /><br />I got one more question <br />In scramble_password, I am using functions from sha1.c (from http://oauth.googlecode.com/svn/code/c/liboauth/src/sha1.c) is it ok to use it?<br /><br />since I am using similar logic provided by you for arduino board to my evalution-kit(uses rtos,sdk all in c). I am creating socket on eval-kit and connecting to remote MySQL server. I am using same algorithmic flow as provided by you in C++.<br />If this flow work on my eval-kit(will be written in c) will this code going to work for any board(platform independent).<br />Anonymoushttps://www.blogger.com/profile/03377826298125543437noreply@blogger.com