Im trying to build a DIS service with identification strings like bsp and
app name from config/id package with conf_get_value
I think Im using the api correctly?
char *val;
int rc;
uint16_t uuid16;
char tmp_buf[32 + 1]; ///hwid is only one that needs some tmp buffer
if(ctxt->op != BLE_GATT_ACCESS_OP_READ_CHR)
{
return BLE_ATT_ERR_UNLIKELY;
}
uuid16 = ble_uuid_u16(ctxt->chr->uuid);
assert(uuid16 != 0);
switch (uuid16) {
case BLE_SVC_DIS_CHR_SYS_ID_UUID16:
val = conf_get_value("id/hwid", tmp_buf, sizeof(tmp_buf));
console_printf("hwid %s\n", val);
rc = os_mbuf_append(ctxt->om, val, strlen(val));
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
But I cant seem to get anything other than a empty string at runtime...
Are there any syscfg configurations that I need, or need to make sure I
dont disable?
.. Oddly enough this works in gdb ???
set $foo = conf_get_value("id/app", (void *)0, 0)
p $foo
$1 = 0x2215f "bleprph"
So Im super lost :)