MakerGram Logo

    MakerGram

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups

    A little hassle with ESP32..!!

    ESP32
    2
    11
    350
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kowshik1729
      kowshik1729 last edited by

      Hello guys,

      I was looking to implement a configuration that looks something as below with ESP32's BLE.

      Architecture

      Here the server ESP32 has to perform two-way communication. It has to receive data from phone and send that data over to the client.

      How can I do this with ESP32's BLE.

      1 Reply Last reply Reply Quote 0
      • A
        arunksoman last edited by

        Try to implement espnow protocol in order to communicate with client esp32.

        1 Reply Last reply Reply Quote 1
        • kowshik1729
          kowshik1729 last edited by

          @arunksoman thanks....can you please elaborate...any example implementations are there? so that I can get an idea

          A 1 Reply Last reply Reply Quote 0
          • A
            arunksoman @kowshik1729 last edited by arunksoman

            @kowshik1729 If you are using Arduino include espnow.h. Then you have create a structure in order to store your message. The message should not greater than 250 bytes. Then create a call back function(for knowing the message delivery is success or failure) and send message to client using MAC address. This protocol can send encrypted or non-encrypted message up to 220m. There is a better tutorial available on RandomNerdTutorials. One more thing is if you are using station mode you can connect upto 6 esp32 with your esp32 in master slave configuration. It can send data in both ways. If you are using softAP or station+softAP then it can connect up to 10-20 devices.

            1 Reply Last reply Reply Quote 1
            • kowshik1729
              kowshik1729 last edited by

              @arunksoman I have just seen ESPNOW protocol. It's great, but will it work for connecting the ESP32 to any other devices like mobile phone or it only maintains connections with other ESP32 alone?

              A 1 Reply Last reply Reply Quote 0
              • A
                arunksoman @kowshik1729 last edited by

                @kowshik1729 Yes. I am not asking you to use esp_now for communicate esp32 with mobile phone. I am saying only to use espnow protocol in order to communicate with your client esp32. It might reduce your problem. Also, read this instructables completely 👍

                1 Reply Last reply Reply Quote 0
                • kowshik1729
                  kowshik1729 last edited by

                  @arunksoman When you told me use esp_now to communicate with client but not with mobile you mean to use BLE connection between server and mobile?

                  I'm simply asking you that are you suggesting me this kind of 👇 architecture??

                  Mobile to server - BLE connection

                  Server to client - ESP_NOW

                  Is this what you've meant bro?

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    arunksoman @kowshik1729 last edited by arunksoman

                    @kowshik1729 Yes, now you are absolutely right. That is what I tried to convey. The instructables given above is saying two way communication between client and server BLE is possible with android. But I didn't tried that. But I will try that soon.

                    1 Reply Last reply Reply Quote 0
                    • kowshik1729
                      kowshik1729 last edited by

                      @arunksoman I have read about ESP_NOW protocol from the Espressif page and it is mentioned that ESP_Now makes use of Wifi but without any connections. Which means my power consumption obviously increases. As I am going to use this application in a wearable use case I want some power-efficient solution.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        arunksoman @kowshik1729 last edited by arunksoman

                        @kowshik1729 Did you read Espressif page and datasheet completely?

                        ESP-NOW is yet another protocol developed by Espressif, which enables multiple devices to communicate with one another without using Wi-Fi. The protocol is similar to the low-power 2.4GHz wireless connectivity that is often deployed in wireless mouses. So, the pairing between devices is needed prior to their communication. After the pairing is done, the connection is safe and peer-to-peer, with no handshake being required.
                        Espressif ESP-NOW OVERVIEW

                        "The ESP-Now protocol is connection-less, you don't need to set up a session/get an ip-address to communicate between nodes. This saves time and battery power, exactly what we need. "
                        revspace

                        Also You can try this protocol with deep sleep mode.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Recent Posts

                        • @kowshik1729 said in Error downloading package:

                          The license of the https://dl.espressif.com/dl/package_esp32_index.json might be expired(If this is the reason you can't do anything but just wait until they re-activate the license)

                          e210e762-5609-4f60-9409-3c5df1123744-image.png If the page liecence

                          It's good.

                          • read more
                        • @abdultechguy999 usually https://dl.espressif.com/dl/package_esp32_index.json this works while installing through boards manager. But I faced the same issue some times. it might be due to a couple of reasons.

                          Bad Internet connectivity

                          The license of the https://dl.espressif.com/dl/package_esp32_index.json might be expired(If this is the reason you can't do anything but just wait until they re-activate the license)

                          I remember there is a way to install the board files offline by downloading from some github repos.

                          All the best.

                          • read more
                        • @abdultechguy999 It looks like Arduino IDE having trouble to connect internet, can you try to download any other board from the board manager or library from the library manager!

                          • read more
                        • A

                          @salmanfaris I tried three types which I all found on the net

                          https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json

                          https://dl.espressif.com/dl/package_esp32_index.json

                          All I keep getting is an error message
                          'Error downloading [the link]'

                          • read more
                        • @abdultechguy999 Can you share the Board URL you using? it might be the wrong board URL!

                          • read more
                        By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
                        Copyright © 2021 MakerGram, All rights reserved.
                        Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct