01-22-2026 03:31 PM
I believe I'm doing this right, but I am having trouble getting data out of a pointer. I can't post the code but I'll post what I can:
The following is a structure that i'm trying to get data from. It's 106 bytes.
typedef struct {
char name[64];
char serial[32];
uint64_t address;
int16_t rssi;
} BluetoothDeviceDiscoveryInfo;
My function DiscoverPeripherals expects a pointer to this structure because it returns an array of BluetoothDeviceDiscoveryInfo.
Here is the calling convention:
int BluetoothDiscovery_DiscoverPeripherals(
BluetoothDiscoveryHandle handle, int seconds,
BluetoothDeviceDiscoveryInfo *outBuffer, int maxCount, int *outFoundCount);
I know it's executing because it's returning a value for outFoundCount. But I am trying to get data out of the outBuffer variable without any luck.
Right now the dst array is just a bunch of 0's. So it seems my function is executing successfully but my pointer is either not populated correctly or I'm using moveblock incorrectly (yes i know i need to free my pointer).
Does anything jump out as being obviously incorrect?
Solved! Go to Solution.
01-22-2026 04:18 PM
Disregard...when i looked closer i was getting data back i was just seeing a bunch of the padding on the strings...