A little hassle with ESP32..!!
I was looking to implement a configuration that looks something as below with ESP32's BLE.
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?
@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. "
Also You can try this protocol with deep sleep mode.
@jacob_jipson Glad to hear that.
@salmanfaris The problem was resolved. Thankyou so much.
Did you replace the NN folder in the lib as we do for XIAO esp32? and for the AI Thinker ESP32-CAM, you don't need to do that.
now, try to delete the library and re-add a new one and compile.
@salmanfarisC:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S: Assembler messages: C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:35: Error: unknown opcode or format name 'ee.vldbc.8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:39: Error: unknown opcode or format name 'ee.zero.q' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:42: Error: unknown opcode or format name 'ee.vld.128.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:43: Error: unknown opcode or format name 'ee.vmax.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:44: Error: unknown opcode or format name 'ee.vmin.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:45: Error: unknown opcode or format name 'ee.vst.128.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:58: Error: unknown opcode or format name 'ee.vld.l.64.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:59: Error: unknown opcode or format name 'ee.vmax.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:60: Error: unknown opcode or format name 'ee.vmin.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:61: Error: unknown opcode or format name 'ee.vst.l.64.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:98: Error: unknown opcode or format name 'ee.zero.q' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:40: Error: invalid empty loop C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:56: Error: invalid empty loop C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:40: Internal error in istack_push_space at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/binutils/gas/config/tc-xtensa.c:12515. Please report this bug. exit status 1 Error compiling for board AI Thinker ESP32-CAM.
exit status 1
Error compiling for board AI Thinker ESP32-CAM.
can you please share the full error log here and pleas share the screenshot of the Arduino IDE tools section.