Go Down

Topic: ESP8266-01 and HC-05 serial communication (Read 317 times) previous topic - next topic

filippodamuzzo

Jul 09, 2017, 08:56 pm Last Edit: Jul 09, 2017, 09:25 pm by filippodamuzzo
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

ElCaron

Have you thought about using the ESP32?

Lennyz1988

#2
Jul 10, 2017, 02:45 pm Last Edit: Jul 10, 2017, 02:46 pm by Lennyz1988
Post your code.

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:

https://github.com/espressif/arduino-esp32/issues/423

filippodamuzzo

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

Go Up