BLE, data transfer,

10 Sep 2017

Hello, I'm trying to make a temp logger with NRF51822, FRAM memory and ADT7410. My goal is to log the data over a day and then send them all via BLE. I figured out logging it on the FRAM but I can't manage to send it with BLE. I found this: https://docs.mbed.com/docs/ble-intros/en/latest/Advanced/HighData/ may be a way to do that, but it's rather a sketch and I got confused in configuring custom gatt and passing the values through. Could somebody help me to make it work?

I assume that the characteristic should be written like follows:

ReadOnlyGattCharacteristic<uint32_t> readFrom(uuid, valuePtr, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);

but if I had for e.g. 100 records in FRAM(it doesn't have to be block-read, so I can read it directly like a normal ram?) how should it be done to pass them through? I guess I have to make some kind of pointer to the memory and then use "ble.updateCharacteristicValue(readFrom,payload,payloadSize);" but I still don't know how to do that.