Connect with us

Send data to webserver with esp8266 & Arduino Nano

Discussion in 'Microcontrollers, Programming and IoT' started by oliviasmithh900, Mar 8, 2021.

Scroll to continue with content
  1. oliviasmithh900

    oliviasmithh900

    1
    0
    Mar 8, 2021
    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.
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,660
    2,696
    Nov 17, 2011
    No. Use e.g. SSH.
    Afaik not possible using a txt file based protocol. I think you may have to run a web frontend on the server that accepts data and puts it into the database. Unfortunately I wouldn't know how to do this.

    Good luck.
     
  3. bertus

    bertus Moderator

    2,028
    762
    Nov 8, 2019
  4. shumifan50

    shumifan50

    578
    57
    Jan 16, 2014
    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: Apr 15, 2021
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-