A little hassle with ESP32..!!



  • 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.



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



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



  • @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.



  • @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?



  • @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 👍



  • @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?



  • @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.



  • @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.



  • @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.


Log in to reply
 

Recent Posts

  • What are objects?

    Jeff Goodell: Would you explain, in simple terms, exactly what object-oriented software is?

    Steve Jobs: Objects are like people. They’re living, breathing things that have knowledge inside them about how to do things and have memory inside them so they can remember things. And rather than interacting with them at a very low level, you interact with them at a very high level of abstraction, like we’re doing right here.

    Here’s an example: If I’m your laundry object, you can give me your dirty clothes and send me a message that says, “Can you get my clothes laundered, please.” I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your clean clothes and say, “Here are your clean clothes.”

    You have no idea how I did that. You have no knowledge of the laundry place. Maybe you speak French, and you can’t even hail a taxi. You can’t pay for one, you don’t have dollars in your pocket. Yet I knew how to do all of that. And you didn’t have to know any of it. All that complexity was hidden inside of me, and we were able to interact at a very high level of abstraction. That’s what objects are. They encapsulate complexity, and the interfaces to that complexity are high level.

    read more
  • This webinar is focussing on learning Git VCS, a distributed version control system for tracking changes during practical software development.

    We will be exploring the usage of various git commands, plugins/extensions and branching-models based on real-world contexts.

    The session is targetting absolute beginners with minimum or no experience with git, But a mindset to optimize and improve work efficiency and productivity by learning and exploring new tool-chains and strategies is a must!

    Join MakerChat.

    Maker: Muhammad Swalah
    Place: Zoom
    Date: 16th Aug 2020
    Time: 8:00 PM

    Registration: bit.ly/makerchat8

    Join MakerGram: bit.ly/join-mg

    photo_2020-08-06_16-46-33.jpg

    read more
  • 3D PRINTING@300x.png

    read more
  • MakerGram is Live Now!

    MakerChat 0x07: How to Learn Machine Learning (for Humans) by @GKS

    Watch LIVE @ https://www.facebook.com/makergram/videos/736833737153967/

    #MakerGramLearnings #MGLive #AI #ArtificialIntelligence #MachineLearning #Humans #MachineIntellegence #MakerChat

    read more
  • @anuradhasingh426 Please check your mailbox.

    read more