Maker Pro
Maker Pro

Send data to webserver with esp8266 & Arduino Nano

oliviasmithh900

Mar 8, 2021
1
Joined
Mar 8, 2021
Messages
1
Hi,

I am working on ESP8266 with Arduino nano and I have successfully uploaded data on webserver, I am uploaing sensors data in txt file using FTP. The file is saved in hosting account. So now my questions are:

1) Is FTP a secure way? I don't think so, what's other ways?
2) I want to save data in MySQL dB so how to save data directly to db instead of hosting account.

Thanks in advance.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700

shumifan50

Jan 16, 2014
579
Joined
Jan 16, 2014
Messages
579
The Espressif microcontrollers have inbuilt SHA encryption. In the arduino workbench you can install the library to use the encryption to encrypt your text messages. All servers have libraries to decrypt the message. This way you have total control over the message content. The ESP32 series also allow encryption of the firmware you write, making reverse engineering almost impossible. Personally I prefer the ESP32 dual core family of processors, as they run the wifi on the second processor, leaving the second core available for the application without risk of de-stabilising the wifi. When using the single core, much care must be taken to avoid functions like delay() and Serial.write...() that effectively holds the processor, possibly causing wifi events to be missed. For most of what you want to do there are examples on the web. Google is your friend.
As an aside: I used to be a big fan of microchip processors, but these Espressif processors are far superior to Microchip and Arduino and on top of it they are VERY affordable as development boards or modules(which include onboard antenna) OR bare chips. Many also have an IPEX connector to connect an external antenna to improve wifi range.
As far as storing the data in MYSQL, I would suggest using PHP as it provides a simple interface to execute SQL statements and do the important error handling. As suggested above a LAMP (Linux, Apache, MYSQL, PHP) server will provide everything you need. I use UBUNTU Linux as it provides a simple install/remove facility fot most software and it is easy to create a LAMP server.
 
Last edited:
Top