Hi,
Is it possible to send entire array over ble?
Char *data100];
For (I=0, I<100, I++)
{
Data[i] =timestamp_data;
Ble_nus_data_send(&m_nus, &data,size of (data), m_conn_handle);
}
Is this format correct???
Hi,
Is it possible to send entire array over ble?
Char *data100];
For (I=0, I<100, I++)
{
Data[i] =timestamp_data;
Ble_nus_data_send(&m_nus, &data,size of (data), m_conn_handle);
}
Is this format correct???
Yes; I just posted this elsewhere and it might be helpful; note your "size of (data)" is an address of a variable containing the number of bytes - see the Nordic code describing ble_nus_data_send() for more details:
uint32_t StoredPacketTransmit(BlePacketFormat_t *pPacketToTransmit, uint16_t PacketLength)
{
uint32_t err_code = SOMETHING_BAD;
// Define the structure to identify the Nordic UART Service
ble_nus_t * p_m_nus = get_mNUS();
if (pPacketToTransmit && PacketLength && p_m_nus)
{
err_code = ble_nus_data_send(p_m_nus, pPacketToTransmit, &PacketLength);
if (err_code == NRF_SUCCESS)
{
// Packet sent, allow next packet to be built when sufficent SAADC samples available
}
else
{
// Packet not sent, next packet build is disallowed until current packet is sent
mDelayedPacketCount++;
}
}
// Allow caller to see if packet actually went out
return err_code;
}Yes; I just posted this elsewhere and it might be helpful; note your "size of (data)" is an address of a variable containing the number of bytes - see the Nordic code describing ble_nus_data_send() for more details:
uint32_t StoredPacketTransmit(BlePacketFormat_t *pPacketToTransmit, uint16_t PacketLength)
{
uint32_t err_code = SOMETHING_BAD;
// Define the structure to identify the Nordic UART Service
ble_nus_t * p_m_nus = get_mNUS();
if (pPacketToTransmit && PacketLength && p_m_nus)
{
err_code = ble_nus_data_send(p_m_nus, pPacketToTransmit, &PacketLength);
if (err_code == NRF_SUCCESS)
{
// Packet sent, allow next packet to be built when sufficent SAADC samples available
}
else
{
// Packet not sent, next packet build is disallowed until current packet is sent
mDelayedPacketCount++;
}
}
// Allow caller to see if packet actually went out
return err_code;
}i don't understand your code . please explain for my content above code
Try something like this:
Char data[100];
uint16_t Length = Sizeof(data);
For (uint16_t I=0, I<100, I++)
{
Data[i] = timestamp_data;
}
Ble_nus_data_send(&m_nus, &data, &Length, m_conn_handle);
I can't really help further
i tried the same way it doesn't worked