WROOM32 BLE: AT Command example code gives error

user-wroom32
Posts: 1
Joined: Sat Jul 20, 2019 12:29 pm

WROOM32 BLE: AT Command example code gives error

Postby user-wroom32 » Sat Jul 20, 2019 2:10 pm

Greetings,

I use two boards with WROOM32 chips to create a BLE connection using the AT command interface through uart, but I get errors when executing BLE example commands. Firmware is about one year old. All commands end with \r\n and are issued after receiving OK reply from previous command.

Server:
AT+BLEINIT=2
AT+BLEGATTSSRVCRE
AT+BLEGATTSRVSTART
AT+BLEADVDATA="HEXADVDATA"
AT+BLEADVSTART
AT+BLEGATTSCHAR?

Everything ok, list of characteristics and descriptors received.

Client:
AT+BLEINIT=1
AT+BLECONN=0,"SRV:MAC:ADDR"
AT+BLEGATTCPRIMSRV=0

Everything ok, connected and list of services received. Next:

Client:
AT+BLEGATTCCHAR=0,3

Returns ERROR (same for index 1 & 2, or for AT+BLEGATTCRD|WR).

Only possible cause I can think of is an issue with permissions. But the attribute permissions of the service are 1, 16 or 17 and using AT+BLESECPARAM=0,3,16,3,3 on both server and client makes no difference. Are these the correct settings to not require encryption for access to the service? If so, why is AT+BLEGATTCCHAR=0,3 failing?

I also tried using an encrypted connection with the same result. But there are so many possible encryption settings that what I tried may have been inadequate anyway.

Who is online

Users browsing this forum: No registered users and 105 guests