How to send ble bytes?


Hi Team,

Please help me with below.

I know,ble_write_bytes(“Hello”, 5); #prints hello world.

I want to send 12 bytes of information at a time from arduino, How do i write? please give me an reference example.

B1,B2,B3,B4 = Serial.No;
B5,B6 = Age;
B7,B8,B9= salary;
B10,B11,B12 = time


Hi meghana,
You can put the 12 bytes data into a data[12] and use it with ble_write_bytes(data, 12);


Hi lucian,

String Firstname = “Meghana”;
String UID = “Megh001”;
Age = 24;

How do I send all three at a time using ble_write_bytes ()??


I think you can turn string into char * using c_str() if it can and merge the 3 data into one and transfer it by passing its address.


Hi lucian,

Example please.