B4R Question HC-05 not able to communicate with ESP8266

Discussion in 'B4R Questions' started by AndroidMadhu, Jun 25, 2019.

  1. AndroidMadhu

    AndroidMadhu Active Member Licensed User

    I am using HC-05 with ESP8266.
    The Interface is as below:
    ESP8266------> HC-05
    RX------> TX
    TX------> RX
    GND------> GND
    3.3V------> 3.3V

    I am able to connect successfully and Paired HC05 with my android mobile.
    I have downloaded Bluetooth terminal HC05 to communicate with ESP8266.
    But after successful pairing with my mobile I am not able to communicate.
    Below is my code
    Public Serial1 As Serial
    'Private wifi As ESP8266WiFi
        Private Softserial As SoftwareSerial
    Private astream As AsyncStreams
    End Sub

    Private Sub AppStart
    9600,5,4'5 as for RX(D1) and 4 is for TX(D2)
    End Sub

    private Sub astream_NewData(buffer() As Byte)
    End Sub
    Please advice
  2. derez

    derez Expert Licensed User

    If your ESP is from China then the numbers of the pins are incorrect, try the connection with pins 5,6 or 7 as these numbers are the same in all products.
    Also - put an Error sub instead of the Null, maybe this is the reason.
  3. AndroidMadhu

    AndroidMadhu Active Member Licensed User

    I have tested.. but no luck....:(
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. AndroidMadhu

    AndroidMadhu Active Member Licensed User

    @Erel... I checked your example and based on your example, I started to work on HC-05.
    I have used softwareSerial Instead hardware Serial and that's why I am not using Inline C/C++
    The only issue is I am not able to receive any data from Mobile to Serial Monitor.
    As from my previous update... any wrong I am doing? Please advice...
  6. Erel

    Erel Administrator Staff Member Licensed User

    Start with implementing it with a regular Arduino and the B4A program. Once it works switch to the ESP8266.
  7. tigrot

    tigrot Well-Known Member Licensed User

    Sometimes rx/tx pins on periferals are inverted, at least on some rs232/ttl interface.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice