-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop working GPRS #215
Comments
Hello,
The statement about the connector not working with GSM is there because most GSM libraries are not designed to be used with the Server and Client libraries common to the Arduino. That said, if you got it working, then it is likely the GSM library you found is compatible. As to why it stopped working, I would check external issues such as firewalls and access/permissions before attempting modifications to the library. You may also want to make sure whomever hosts your MySQL database hasn’t upgraded recently and is using an Oracle distribution because non-Oracle distributions have been known to fail, especially if they have been upgraded. Hint: check the native password setting.
You can send me your sketch to look over if you’d like but it is more likely there is an external influence/issue at work here.
Dr. Bell
… On Oct 9, 2023, at 8:45 PM, tarcisocallegario ***@***.***> wrote:
Dear Dr ChukBell, I have been using the MySQL_Connector_Arduino library during the month of June/2023 in an IOT product that uses the ESP32 board combined with the SIM800L module. After many attempts I managed to insert data into BD HOSTINGER.com.br. The device sent a record every 5 minutes to the DB. For connection I used the TinyGsmClient.h library. After working for 30 days, the device stopped sending records to the DB. The SIM800L module can no longer connect to the BD. Checking the MySQL_Connector_Arduino documentation I was able to verify, to my surprise, that this library should not work with the GPRS GSM module. Would you recommend any modifications so that the MySQL_Connector_Arduino could establish a connection with the DB using the GSM module?
—
Reply to this email directly, view it on GitHub <#215>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB6SHYDIJYEKRPUXCC3ZXVTX6SLEDAVCNFSM6AAAAAA5ZQZ7GCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTIMBWGY3DEMQ>.
You are receiving this because you are subscribed to this thread.
|
Dear Dr. Charles Bell, I am sending the message recorded in the Error Log file in the Public folder 465 [15-Oct-2023 22:29:57 UTC] PHP Warning: mysqli_real_connect(): (HY000/1045): Access denied for user 'u262515252_Aerogerador'@'141.136.41.220' (using password: YES) in /home/ u262515252/domains/claudia28.hostingerapp.com/public_html/wp-includes/class-wpdb.php on line 2019 |
Dear Dr. Charles Bell, below is the code from the MySQL_Connection.cpp library where I inserted the "lprint" commands to check where the program stopped working: Change History: Version 1.0.0a Created by Dr. Charles A. Bell, April 2012. #define MAX_CONNECT_ATTEMPTS 3 const char CONNECTED[] PROGMEM = "Connected to server version "; /* This method is used to connect to a MySQL server. It will attempt to server[in] IP address of the server as IPAddress type Returns boolean - True = connection succeeded // Retry up to MAX_CONNECT_ATTEMPTS times. Serial.println(server);
} .... |
Below is the result in the serial output during the execution of the script of my program: range2===>>>11
...trying... |
Here's part of the program I'm developing: // TinyGsmClient client(modemGSM); const char server[] = "141.136.41.220"; int program_version = 34; IPAddress server_addr(141 , 136 , 34 , 3) ; // IP of the MySQL server here char INSERT_SQL[] = "INSERT INTO u262515252_Aerogerador.Parametros_Aerogerador ( v_vento , eixo_rpm , versao_firmiware, ponteirodirecao, ultima_acao, intervalo2 ) VALUES ('%f', '%f', '%d', '%d', '%d', '%d')"; // INSTANCIANDO OBJETOS ....
|
Thank you for your helpful help and availability. Att. Tarciso Callegario |
MariaDB Server 10.5.19 |
Hi,
The error message you are getting tells me a few things:
1) The connection is working
2) Either the password was changed or the GRANT statement restricts the host (more later on this)
3) You are using a non-Oracle MySQL installation, which is not guaranteed to work (but appears to be working)
That said, you should check with the MySQL Administrator to double-check the password for that user account and ensure that the mysql_native_password is enabled for that user. Recall that a user account in MySQL is actually two parts: the user id and the host id. GRANT statements can be issued to restrict access to specific hosts/networks, so you need to ask the MySQL administrator to check the ***@***.*** is: 1) still valid, 2) not restricted, 3) has the correct password, and 4) mysql_native_password is enabled for that user+host.
For example, the error log shows Access denied for user 'u262515252_Aerogerador'@‘141.136.41.220’.
Thus, the user u262515252_Aerogerador is actually stored in MySQL as:
User_id = u262515252_Aerogerador
host_id = 141.136.41.220
One way to check permissions for users is with this command:
SHOW GRANTS FOR 'u262515252_Aerogerador'@‘141.136.41.220’;
You should see various grants for the databases and that the mysql_native_password is enabled. If you don’t see any rows, you should consider using wildcards in the host_id (but that is not recommended). See https://dev.mysql.com/doc/refman/8.1/en/account-names.html and “Account Names” at https://dev.mysql.com/doc/refman/8.1/en/grant.html for more details.
Hope this helps,
Dr. Bell
… On Oct 15, 2023, at 10:58 PM, tarcisocallegario ***@***.***> wrote:
MariaDB Server 10.5.19
—
Reply to this email directly, view it on GitHub <#215 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB6SHYDOAIQS7CF2DZ6J6RLX7SPDVANCNFSM6AAAAAA5ZQZ7GA>.
You are receiving this because you commented.
|
Dear Dr ChukBell, I have been using the MySQL_Connector_Arduino library during the month of June/2023 in an IOT product that uses the ESP32 board combined with the SIM800L module. After many attempts I managed to insert data into BD HOSTINGER.com.br. The device sent a record every 5 minutes to the DB. For connection I used the TinyGsmClient.h library. After working for 30 days, the device stopped sending records to the DB. The SIM800L module can no longer connect to the BD. Checking the MySQL_Connector_Arduino documentation I was able to verify, to my surprise, that this library should not work with the GPRS GSM module. Would you recommend any modifications so that the MySQL_Connector_Arduino could establish a connection with the DB using the GSM module?
The text was updated successfully, but these errors were encountered: