Files
Peter Siegmund 197a1611f5
Some checks failed
ESP-IDF Build / build (esp32, latest) (push) Failing after 40s
ESP-IDF Build / build (esp32, release-v5.4) (push) Failing after 20s
ESP-IDF Build / build (esp32, release-v5.5) (push) Failing after 18s
ESP-IDF Build / build (esp32c3, latest) (push) Failing after 17s
ESP-IDF Build / build (esp32c3, release-v5.4) (push) Failing after 15s
ESP-IDF Build / build (esp32c3, release-v5.5) (push) Failing after 15s
ESP-IDF Build / build (esp32c5, latest) (push) Failing after 16s
ESP-IDF Build / build (esp32c5, release-v5.4) (push) Failing after 17s
ESP-IDF Build / build (esp32c5, release-v5.5) (push) Failing after 17s
ESP-IDF Build / build (esp32c6, latest) (push) Failing after 16s
ESP-IDF Build / build (esp32c6, release-v5.4) (push) Failing after 17s
ESP-IDF Build / build (esp32c6, release-v5.5) (push) Failing after 16s
ESP-IDF Build / build (esp32h2, latest) (push) Failing after 14s
ESP-IDF Build / build (esp32h2, release-v5.4) (push) Failing after 16s
ESP-IDF Build / build (esp32h2, release-v5.5) (push) Failing after 16s
ESP-IDF Build / build (esp32p4, latest) (push) Failing after 17s
ESP-IDF Build / build (esp32p4, release-v5.4) (push) Failing after 16s
ESP-IDF Build / build (esp32p4, release-v5.5) (push) Failing after 16s
ESP-IDF Build / build (esp32s3, latest) (push) Failing after 16s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 16s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 16s
move firmware into subfolder
Signed-off-by: Peter Siegmund <mars3142@users.noreply.github.com>
2025-08-21 00:02:56 +02:00

30 lines
949 B
C

#include "include/device_service.h"
#include "esp_app_desc.h"
#include <stdio.h>
#include <string.h>
int device_model_number_read(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg)
{
char model_number_str[65];
const esp_app_desc_t *app_desc = esp_app_get_description();
if (app_desc->project_name[0] != '\0' && app_desc->version[0] != '\0')
{
snprintf(model_number_str, sizeof(model_number_str), "%s v%s", app_desc->project_name, app_desc->version);
}
else
{
snprintf(model_number_str, sizeof(model_number_str), "undefined");
}
os_mbuf_append(ctxt->om, model_number_str, strlen(model_number_str));
return 0;
}
int device_manufacturer_read(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg)
{
char *manufacturer = "mars3142";
os_mbuf_append(ctxt->om, manufacturer, strlen(manufacturer));
return 0;
}