As moderator said, it is correct. But we have to add only one characteristic, notify or write…
Please check the file attached, you can replace them in our demo Ble_chat. Pay attention to the connection handle, it is just an example.
Osal_MemCpy(&char_uuid.Char_UUID_128, charUuidTX, 16);
ret = aci_gatt_add_char(chatServHandle, UUID_TYPE_128, &char_uuid, 20, CHAR_PROP_NOTIFY, ATTR_PERMISSION_NONE, 0,
16, 1, &TXCharHandle);
if (ret != BLE_STATUS_SUCCESS) goto fail;
/*
Osal_MemCpy(&char_uuid.Char_UUID_128, charUuidRX, 16);
ret = aci_gatt_add_char(chatServHandle, UUID_TYPE_128, &char_uuid, 20, CHAR_PROP_WRITE|CHAR_PROP_WRITE_WITHOUT_RESP, ATTR_PERMISSION_NONE, GATT_NOTIFY_ATTRIBUTE_WRITE,
16, 1, &RXCharHandle);
if (ret != BLE_STATUS_SUCCESS) goto fail;
*/