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

  • @Suhailjr But I think since it's not a plug and plug play system and it will laying on the PCB for the long term, it might be fine. for me, it's similar to the Intel Edison and the PICO-IMX7 System-on-Module

    dade502a-71f6-4da0-bd7d-0e9a0b602cb0-image.png

    a4b8898f-90d4-4a34-ba5d-81ab76fda904-image.png

    read more
  • @salmanfaris at last they update their design. T
    What you think on the updated connector. I felt like its more fragile and high chance for corottion issue due to humidity for long term use.

    read more
  • Built on the same 64-bit quad-core BCM2711 application processor as Raspberry Pi 4, Compute Module 4 delivers a step-change in performance over its predecessors: faster CPU cores, better multimedia, more interfacing capabilities, and, for the first time, a choice of RAM densities and a wireless connectivity option.

    3094f292-3301-4364-a444-d828f6e77ff8-image.png

    You can find detailed specs here,

    1.5GHz quad-core 64-bit ARM Cortex-A72 CPU VideoCore VI graphics, supporting OpenGL ES 3.x 4Kp60 hardware decode of H.265 (HEVC) video 1080p60 hardware decode, and 1080p30 hardware encode of H.264 (AVC) video Dual HDMI interfaces, at resolutions up to 4K Single-lane PCI Express 2.0 interface Dual MIPI DSI display, and dual MIPI CSI-2 camera interfaces 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM Optional 8GB, 16GB or 32GB eMMC Flash storage Optional 2.4GHz and 5GHz IEEE 802.11b/g/n/ac wireless LAN and Bluetooth 5.0 Gigabit Ethernet PHY with IEEE 1588 support 28 GPIO pins, with up to 6 × UART, 6 × I2C and 5 × SPI

    31354fad-6332-40e8-b324-53e0aa5dbace-image.png

    Compute Module 4 IO Board
    89a3b68b-bb74-4002-9c2b-d32c2e1450b3-image.png

    The IO board provides:

    Two full-size HDMI ports Gigabit Ethernet jack Two USB 2.0 ports MicroSD card socket (only for use with Lite, no-eMMC Compute Module 4 variants) PCI Express Gen 2 x1 socket HAT footprint with 40-pin GPIO connector and PoE header 12V input via barrel jack (supports up to 26V if PCIe unused) Camera and display FPC connectors Real-time clock with battery backup

    More details:
    https://www.raspberrypi.org/products/compute-module-4/?variant=raspberry-pi-cm4001000, https://www.raspberrypi.org/blog/raspberry-pi-compute-module-4/

    read more
  • 28e1870e-33fe-4791-bc74-05c9d58098da-image.png

    Seeed is currently counting down for the 10 year anniversary of the debut of Grove 🎉. In the past 10 years, we have seen many wonderful projects created by Grove from our user and community. We want to invite you to join us to celebrate the 10 year anniversary of Grove 🤩.

    In the Grove 10 Years Celebration, we’d like to collect the stories of “Grove with You”, which we want to invite our users to share their stories they have with Grove products.

    => What project you’ve made out of Grove?
    => What is your favourite Grove?
    => which one was the first Grove you’ve purchased?

    Seeed encourages you to post and share photos, videos, stories of Grove in the Seeeed Forum, or any other platforms below that you’d like to use.

    The following ways to find us, and tag #grove10 to share the project with us!

    Twitter (@seeedstudio) Instagram (@seeedstudio) or simply email your project to grove10@seeed.cc

    Feel free to be creative in documenting your projects–we will be selecting top 10 most “Grovy” winning entries from the submissions, and the winners will receive a $100 Grove Surprise Pack 😋 as a special gift.

    Looking forward to seeing your projects! 🥳

    read more
  • @kowshik1729 I think that might not get since the platform is not opensource! but they provided everything you need to develop a system with that.

    read more