Mbed Ble Can't Write/Send data more than 4

hi i need to send data over ble repeatedly but end up with only 4 data updates, how to i send data repeatedly via BLE in proper way ? currently I using for to send data repeatedly but only 4 data can send over BLE

here my code

for(int i=0; i<(index_scan_data_array-1); i++) {
_object_service.write_characteristic(scan_array[i]);
}

scan_array is uint8_t with 14 length

Which MBED OS version are you using.

Search for “write” on this page (for latest OS 6.2) - it will show you that you can send more than 1 byte at a time:
https://os.mbed.com/docs/mbed-os/v6.2/mbed-os-api-doxy/classble_1_1_gatt_server.html#details

Similar for (OS 5.15): GattServer - APIs | Mbed OS 5 Documentation

thank you for replying me, currently I using MBED OS 6.2

not sending more than 1 byte at a time but sending more 1 byte data repeatedly, in my case i can only send 1 byte data 4 time

Sending 1 byte at a time is not a good idea for reliable BLE operation.

If you use the “write without response” option then risk losing a byte and if you use the “write” option then internally it’s waiting for the client device to respond to say “yes I’ve receive that byte”.