ESP8266-01 and HC-05 serial communication

Hy everybody,
I am working on a project involving bluetooth and wifi communications. An idea of the scenario is depicted in the attachment.

What I have tot do is:

  • retrieve the sensor value
  • send it from the BT slave module (wired up with the sensor) to the master one (wired up to Arduino)
  • take it and send it, using AT commands, through the WIFI channel (the WIFI module is a ESP8266-01) to a web server.

Initially either the wifi or the bluetooth were wired up to the Arduino and communicate to it using two software serial port.
The problem was that two software serials are not able to receive and send data simultaneously.
So, after many reaserches, I came out in changing the wirings and using hardware serial (Arduino's pins 0 and 1) for the WIFI and a sotware serial (using the AltSoftSerial library) for the BT communication. Now I am able to correctly retrieve values from BT and properly build the http POST request need to send the values to a web server. The problem here is that, since the WIFI is wired up through the harware serial, the AT command used to send ESP8266 instructions from Arduino Uno to the module itself, are simply printed out onto the serial monitor window and NOT effectively interpreted as instruction by the WIFI module, leading to not uploading anything to the web server.

Does anyone have a idea which would be the problem? Does anyone already faced with this problem or a similar one?

Hoping to be as much clear as possible, thanks in advance to anyone would help me.

Filippo

Have you thought about using the ESP32?

Post your code.

ElCaron:
Have you thought about using the ESP32?

The bluetooth for the ESP32 is not yet properly supported in the Arduino IDE. See for reference this:

Solved the problem in a different way!
Thanks anyway guys!!!

How do you solve the problem?