BLE-AT- spp - Service uuid 0xA002--> Write Char uuid 0xC304 sending 1 byte only (from nrfconnect)

renyvincent
Posts: 1
Joined: Wed Mar 23, 2022 8:58 am

BLE-AT- spp - Service uuid 0xA002--> Write Char uuid 0xC304 sending 1 byte only (from nrfconnect)

Postby renyvincent » Wed Mar 23, 2022 9:06 am

AT BIN Version

AT+GMR
AT version:2.1.0.0(883f7f2 - Jul 24 2020 11:50:07)
SDK version:v4.0.1-193-ge7ac221
compile time(0ad6331):Jul 28 2020 02:46:20
Bin version:2.1.0(SOLO-1)

I run ESP32 with AT Commands from another Cortex M 32 bit microcontroller

ESP32: Server
nrfConnect App: Client

My requirement is :

I need to Write data from ESP32 to nrfConnect App
I need to Read data in ESP32 (sent from nrfConnect App)
I used the followinf example from esp32 link
https://docs.espressif.com/projects/esp ... rough-mode

I do the following sequence for initialization

ATE1
OK

AT BIN Version
AT+GMR
AT version:2.1.0.0(883f7f2 - Jul 24 2020 11:50:07)
SDK version:v4.0.1-193-ge7ac221
compile time(0ad6331):Jul 28 2020 02:46:20
Bin version:2.1.0(SOLO-1)
OK

BLE INIT
AT+BLEINIT=2
OK

ESP32 Bluetooth LE server creates services
AT+BLEGATTSSRVCRE
OK
WIFI GOT IP

ESP32 Bluetooth LE server starts services
AT+BLEGATTSSRVSTART
OK

ESP32 Bluetooth LE server discovers local Services.
AT+BLEGATTSSRV?
+BLEGATTSSRV:1,1,0xA002,1
+BLEGATTSSRV:2,1,0xA003,1
OK

ESP32 Bluetooth LE server discovers local characteristics.
AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0xC300,0x02
+BLEGATTSCHAR:"desc",1,1,1,0x2901
+BLEGATTSCHAR:"char",1,2,0xC301,0x02
+BLEGATTSCHAR:"desc",1,2,1,0x2901
+BLEGATTSCHAR:"char",1,3,0xC302,0x08
+BLEGATTSCHAR:"desc",1,3,1,0x2901
+BLEGATTSCHAR:"char",1,4,0xC303,0x04
+BLEGATTSCHAR:"desc",1,4,1,0x2901
+BLEGATTSCHAR:"char",1,5,0xC304,0x08
+BLEGATTSCHAR:"char",1,6,0xC305,0x10
+BLEGATTSCHAR:"desc",1,6,1,0x2902
+BLEGATTSCHAR:"char",1,7,0xC306,0x20
+BLEGATTSCHAR:"desc",1,7,1,0x2902
+BLEGATTSCHAR:"char",1,8,0xC307,0x02
+BLEGATTSCHAR:"desc",1,8,1,0x2901
+BLEGATTSCHAR:"char",2,1,0xC400,0x02
+BLEGATTSCHAR:"desc",2,1,1,0x2901
+BLEGATTSCHAR:"char",2,2,0xC401,0x02
+BLEGATTSCHAR:"desc",2,2,1,0x2901
OK

ESP32 Bluetooth LE server gets its MAC address
AT+BLEADDR?
+BLEADDR:"24:a1:60:e7:b8:d6"
OK

Set Bluetooth LE advertising data
AT+BLEADVDATA="0201060A09457370726573736966030302A0"
OK

ESP32 Bluetooth LE server starts advertising.
AT+BLEADVSTART
OK

In nrfconnect App I Scan for the Espressif device and Connection made

ESP32 Bluetooth LE server check for connection status
AT+BLECONN?
+BLECONN:0,"66:eb:8c:ef:2f:5f"
OK

set the parameters of Bluetooth LE connection
AT+BLECONNPARAM=0,12,14,1,500
OK
+BLECONNPARAM:0,12,14,12,1,500

ESP32 Bluetooth LE server configures Bluetooth LE SPP.
AT+BLESPPCFG=1,1,7,1,5
OK

ESP32 Bluetooth LE server enables Bluetooth LE SPP
AT+BLESPP
OK

t

When I try to write a text data "test" in Service 0xA002-->Char uuid 0xC304, I get only the first char 't' written to esp32, and ... remaining 'est' are not written to esp32
WhatsApp Image 2022-03-22 at 2.40.03 PM (1).jpeg
WhatsApp Image 2022-03-22 at 2.40.03 PM (1).jpeg (166.79 KiB) Viewed 7663 times
Please see above image

Is this something to do with Char uuid 0xC304? How do I solve this issue?

I want to write multiple bytes @ char 0xC304 and notify/indicate multiple bytes @ char 0xC306. Please help.

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: BLE-AT- spp - Service uuid 0xA002--> Write Char uuid 0xC304 sending 1 byte only (from nrfconnect)

Postby ESP_Sun » Wed Mar 30, 2022 3:58 am

Maybe you can test it with the latest master version (https://github.com/espressif/esp-at).

Tonino
Posts: 4
Joined: Mon Oct 24, 2022 8:30 am

Re: BLE-AT- spp - Service uuid 0xA002--> Write Char uuid 0xC304 sending 1 byte only (from nrfconnect)

Postby Tonino » Fri Apr 26, 2024 9:17 am

Hi,

I'm experiencing the exact same issue in ESP-AT 3.2.0.0

any tips?

Best Regards!

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: BLE-AT- spp - Service uuid 0xA002--> Write Char uuid 0xC304 sending 1 byte only (from nrfconnect)

Postby ESP_Sun » Mon Jul 01, 2024 7:36 am

This issue has not been reproduced when testing with v3.4.0.0 firmware. You can use firmware version v3.4.0.0 to test it out.

Code: Select all

[15:20:29:762] AT+GMR␍␊
[15:20:29:786] AT version:3.4.0.0-dev(s-be2bd9b - ESP32 - May 17 2024 05:27:31)␍␊
[15:20:29:786] SDK version:v5.0.6-dirty␍␊
[15:20:29:786] compile time(a24d4fb4):May 27 2024 11:25:12␍␊
[15:20:29:786] Bin version:v3.4.0.0-dev(WROOM-32)␍␊
[15:20:29:786] ␍␊
[15:20:29:786] OK␍␊
[15:30:18:834]at+restore␍␊
[15:30:18:934] ␍␊
[15:30:18:934] OK␍␊
[15:30:20:026] ␍␊
[15:30:20:026] ready␍␊
[15:30:22:172] AT+BLEINIT=2␍␊
[15:30:23:269] ␍␊
[15:30:23:269] OK␍␊
[15:30:23:627] AT+BLEGATTSSRVCRE␍␊
[15:30:24:147] ␍␊
[15:30:24:147] OK␍␊
[15:30:25:458] AT+BLEGATTSSRVSTART␍␊
[15:30:25:473] ␍␊
[15:30:25:473] OK␍␊
[15:30:26:632] AT+BLEGATTSSRV?␍␊
[15:30:26:654] +BLEGATTSSRV:1,1,0xA002,1␍␊
[15:30:26:654] +BLEGATTSSRV:2,1,0xA003,1␍␊
[15:30:26:654] ␍␊
[15:30:26:654] OK␍␊
[15:30:27:478] AT+BLEGATTSCHAR?␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,1,0xC300,0x02␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,1,1,0x2901␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,2,0xC301,0x02␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,2,1,0x2901␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,3,0xC302,0x08␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,3,1,0x2901␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,4,0xC303,0x04␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,4,1,0x2901␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,5,0xC304,0x08␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,6,0xC305,0x10␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,6,1,0x2902␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,7,0xC306,0x20␍␊
[15:30:27:519] +BLEGATTSCHAR:"desc",1,7,1,0x2902␍␊
[15:30:27:519] +BLEGATTSCHAR:"char",1,8,0xC307,0x02␍␊
[15:30:27:550] +BLEGATTSCHAR:"desc",1,8,1,0x2901␍␊
[15:30:27:550] +BLEGATTSCHAR:"char",2,1,0xC400,0x02␍␊
[15:30:27:550] +BLEGATTSCHAR:"desc",2,1,1,0x2901␍␊
[15:30:27:550] +BLEGATTSCHAR:"char",2,2,0xC401,0x02␍␊
[15:30:27:550] +BLEGATTSCHAR:"desc",2,2,1,0x2901␍␊
[15:30:27:550] ␍␊
[15:30:27:550] OK␍␊
[15:30:28:966] AT+BLEADDR?␍␊
[15:30:28:972] +BLEADDR:"08:3a:8d:0d:7e:32"␍␊
[15:30:28:972] OK␍␊
[15:30:30:018] AT+BLEADVDATA="0201060A09457370726573736966030302A0"␍␊
[15:30:30:026] ␍␊
[15:30:30:043] OK␍␊
[15:30:30:838] AT+BLEADVSTART␍␊
[15:30:30:841] ␍␊
[15:30:30:841] OK␍␊
[15:30:36:320] +BLECONN:0,"4f:fb:b2:bf:5d:0c"␍␊
[15:30:38:956] +BLECONNPARAM:0,0,0,6,0,500␍␊
[15:30:41:111] AT+BLECONNPARAM=0,12,14,1,500␍␊
[15:30:41:128] ␍␊
[15:30:41:128] OK␍␊
[15:30:41:544] +BLECONNPARAM:0,12,14,14,1,500␍␊
[15:30:43:726] AT+BLESPPCFG=1,1,7,1,5␍␊
[15:30:43:732] ␍␊
[15:30:43:732] OK␍␊
[15:30:46:049] AT+BLESPP␍␊
[15:30:46:049] ␍␊
[15:30:46:049] OK␍␊
[15:30:46:049] ␍␊
[15:30:46:049] >test

Who is online

Users browsing this forum: No registered users and 7 guests