Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLEwrite Example -> onWrite not working #1168

Open
JanB97 opened this issue Jul 2, 2023 · 4 comments
Open

BLEwrite Example -> onWrite not working #1168

JanB97 opened this issue Jul 2, 2023 · 4 comments

Comments

@JanB97
Copy link

JanB97 commented Jul 2, 2023

So I've been banging my head against a wall and don't understand the problem here.
If been trying the Write and the UART example but on both the onWrite even is not fired after writing something to the characteristic via the nRF_Connect App.
onRead does work on both.

Can someone guide me what I need to change in the examples to make it work?
I am using a Lolin D32.

@JanB97
Copy link
Author

JanB97 commented Jul 2, 2023

This is what I get from the Verbose Debugging on the ESP..
It does recognize if I send something, but the funktion never get's executed.

21:31:12.254 -> [D][BLEDevice.cpp:104] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 4] ... Unknown
21:31:12.287 -> [V][BLEUtils.cpp:1531] dumpGattServerEvent(): GATT ServerEvent: Unknown
21:31:12.287 -> [V][BLEUtils.cpp:1721] dumpGattServerEvent(): dumpGattServerEvent: *** NOT CODED ***
21:31:12.287 -> [D][BLEServer.cpp:153] handleGATTServerEvent(): >> handleGATTServerEvent: Unknown
21:31:12.287 -> [D][BLECharacteristic.cpp:203] handleGATTServerEvent(): >> handleGATTServerEvent: Unknown
21:31:12.287 -> [D][BLEValue.cpp:46] addPart(): >> addPart: length=1
21:31:12.321 -> [D][BLECharacteristic.cpp:292] handleGATTServerEvent(): - Response to write event: New value: handle: 2a, uuid: beb5483e-36e1-4688-b7f5-ea07361b26a8
21:31:12.321 -> [D][BLECharacteristic.cpp:295] handleGATTServerEvent(): - Data: length: 1, data: 25
21:31:12.321 -> [D][BLECharacteristic.cpp:459] handleGATTServerEvent(): << handleGATTServerEvent
21:31:12.321 -> [D][BLEServer.cpp:280] handleGATTServerEvent(): << handleGATTServerEvent
21:31:12.354 -> [D][BLEDevice.cpp:104] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 4] ... Unknown
21:31:12.354 -> [V][BLEUtils.cpp:1531] dumpGattServerEvent(): GATT ServerEvent: Unknown
21:31:12.354 -> [V][BLEUtils.cpp:1721] dumpGattServerEvent(): dumpGattServerEvent: *** NOT CODED ***
21:31:12.354 -> [D][BLEServer.cpp:153] handleGATTServerEvent(): >> handleGATTServerEvent: Unknown
21:31:12.392 -> [D][BLECharacteristic.cpp:203] handleGATTServerEvent(): >> handleGATTServerEvent: Unknown
21:31:12.392 -> [D][BLECharacteristic.cpp:459] handleGATTServerEvent(): << handleGATTServerEvent
21:31:12.392 -> [D][BLEServer.cpp:280] handleGATTServerEvent(): << handleGATTServerEvent

@JanB97
Copy link
Author

JanB97 commented Jul 2, 2023

Okay so I tested it with a new Heltec Lora ESP32 V3.
With this board it works, it has a ESP32S3.
I am still interested why it is not working on the Lolin D32 Board.

@LukaszWiktor
Copy link

I'm struggling with the same issue. The onWrite callback doesn't work on my Seeed Xiao ESP32-C3 board, but it's working fine on Seeed Xiao ESP32-S3.

@evanderkuy
Copy link

I am having a similar issue using a Waveshare ESP32-S3 mini. When I run the BLEwrite Example the onWrite event is never triggered on Platformio (Ubuntu). But when I run it on Arduino IDE (Windows) with the same code it is working fine.

As the Waveshare board is not on the platform I am using lolin_s3_mini with below ini file.

[env:lolin_s3_mini]
; platform = espressif32
platform = [email protected]
board = lolin_s3_mini
board_upload.flash_size = 4MB
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=0
-DARDUINO_RUNNING_CORE=1
framework = arduino
lib_deps =

upload_protocol = esp-prog
upload_port = //dev/ttyUSB2
upload_speed = 921600
debug_tool = esp-prog
monitor_port = //dev/ttyUSB0
monitor_speed = 115200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants