I am trying to communicate to a BT Pulsioxymeter from my board with an Atmel SAML21 and a Quectel MC60 BT.
So far I can connect to the device with its address, I can enumerate its services and I find one characteristic in it, but when I try to write to that characteristic, the AT Command returns an error (AT+QBTGATCWC → +CME ERROR: 3518).
Previously I encountered this same CME ERROR when I had a mistake on other commands e.g. AT+QBTGATCCON with wrong BLE address, but now I can’t find any mistake.
I attach an image of the scanned BLE device.
Here is the log of the AT-Commands:
AT+QBTGATCCON=1,"B001",1681EFC323DB,1
OK
+QBTGATCCON: 1,0,"B001",1681EFC323DB,1
Rx: BLE Device connected
AT+QBTGATCSS="B001",1
OK
+QBTGATCSS: 0,"B001",1,"0018",0,1
+QBTGATCSS: 0,"B001",1,"0118",0,1
+QBTGATCSS: 0,"B001",1,"59FE",0,1
+QBTGATCSS: 0,"B001",1,"0A18",0,1
+QBTGATCSS: 0,"B001",1,"3923CF407316429A5C417E7DC49A8314",0,1
Rx: service 1 discovered: 0018
Rx: service 2 discovered: 0118
Rx: service 3 discovered: 59FE
Rx: service 4 discovered: 0A18
Rx: service 5 discovered: 3923CF407316429A5C417E7DC49A8314
AT+QBTGATCGC="B001",1,"3923CF407316429A5C417E7DC49A8314",0,1
OK
+QBTGATCGC: 0,"B001",1,"3923CF407316429A5C417E7DC49A8314",0,1,"A3E1260AEE9AE9BBB0490BEBE7AC008B",0,4
Rx: characteristic 1 discovered: A3E1260AEE9AE9BBB0490BEBE7AC008B
AT+QBTGATCWC="B001",1,1,"3923CF407316429A5C417E7DC49A8314",0,1,"A3E1260AEE9AE9BBB0490BEBE7AC008B",0,"hola",0
+CME ERROR: 3518
Here an analysis of the AT+QBTGATCWC according to the example and definition in the Quectel_MC60_BLE_AT_Commands_Manual_V1.2.pdf:
AT+QBTGATCWC="B001", 1, 1, "3923CF407316429A5C417E7DC49A8314", 0, 1, "A3E1260AEE9AE9BBB0490BEBE7AC008B", 0, "hola", 0
AT+QBTGATCWC=“B001”, 1, 1, “1234”, 0, 1, “C002”, 0, “2222”, 0
AT+QBTGATCWC=“<gclient_id>”, <conn_id>, <write_type>, “<service_uuid>”, <service_inst>, <service_is_primary>, “<char_uuid>”, <char_inst>, “<value>”, <auth_req>
Thanks in advance,
Bruno