diff --git a/epicardium/ble/epic_att_api.c b/epicardium/ble/epic_att_api.c
index a0da6a219575a44c616679aa3d371d44454cccc8..9dfa44dcde6e3b85ec36c9d635e9c272ee61f1bd 100644
--- a/epicardium/ble/epic_att_api.c
+++ b/epicardium/ble/epic_att_api.c
@@ -265,3 +265,10 @@ int epic_ble_atts_set_buffer(uint16_t value_handle, size_t len, bool append)
 {
 	return AttsDynResize(value_handle, len);
 }
+
+int epic_ble_atts_set_attr(
+	uint16_t handle, const uint8_t *value, uint16_t value_len
+) {
+	uint8_t ret = AttsSetAttr(handle, value_len, (uint8_t *)value);
+	return ret;
+}
diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h
index a63784e4020241ae3923ef94a64359ddb17c69fa..50632e5bf7e1961ee74f7c317e1506df09441606 100644
--- a/epicardium/epicardium.h
+++ b/epicardium/epicardium.h
@@ -2597,7 +2597,7 @@ API(API_BLE_ATTS_DYN_ADD_CHARACTERISTIC, int epic_atts_dyn_add_characteristic(vo
 
 API(API_BLE_ATTS_SEND_SERVICE_CHANGED_IND, int epic_atts_dyn_send_service_changed_ind(void));
 
-API(API_BLE_ATTS_SET_ATTR, uint8_t AttsSetAttr(uint16_t handle, uint16_t valueLen, uint8_t *pValue));
+API(API_BLE_ATTS_SET_ATTR, int epic_ble_atts_set_attr(uint16_t handle, const uint8_t *value, uint16_t value_len));
 API(API_BLE_ATTS_GET_ATTR, uint8_t AttsGetAttr(uint16_t handle, uint16_t *pLen, uint8_t **pValue));
 API(API_BLE_ATTS_HANDLE_VALUE_NTF, int epic_ble_atts_handle_value_ntf(uint8_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue));
 API(API_BLE_ATTS_HANDLE_VALUE_IND, int epic_ble_atts_handle_value_ind(uint8_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue));
diff --git a/pycardium/modules/modbluetooth_card10.c b/pycardium/modules/modbluetooth_card10.c
index 3aa760ff5e43084ea77ab3c54b320e5626aa6a05..25b9e2e4289c558f8b4eca4be0970685206b1992 100644
--- a/pycardium/modules/modbluetooth_card10.c
+++ b/pycardium/modules/modbluetooth_card10.c
@@ -510,7 +510,7 @@ int mp_bluetooth_gatts_write(
 ) {
 	// TODO: which return value to choose?
 	mp_bluetooth_gatts_db_write(GATTS_DB, value_handle, value, value_len);
-	uint8_t ret = AttsSetAttr(value_handle, value_len, (uint8_t *)value);
+	int ret = epic_ble_atts_set_attr(value_handle, value, value_len);
 	return ret;
 }
 // Notify the central that it should do a read.