ios - If I send data by bluetooth low energy, can I know the status of transferring? -
i'm trying larn more sample provided apple.
this sample can send text ios device one.
there method called:
-(bool)updatevalue:(nsdata *)value forcharacteristic:(cbmutablecharacteristic *)characteristic onsubscribedcentrals:(nsarray *)centrals;
when sample send text method, homecoming bool allow know succes or not.
it's easy , clear.
but have uncertainty :
is provide ble?
or it's because of corebluetooth api?
in other words , if receive info other ble device(not ios device).
could device know i've received data?
in ble, when central device (here ios device, assumed master, , client) wants send info peripheral device (assumed slave , server), has several options it:
(1) write characteristic value
(2) write command characteristic value
the difference (1) has response peripheral device. (2) doesn't have that. advantage of (2) on (1) (2) can send multiple info blindly while (1) has wait until there response previous write before send next data.
similarly, if peripheral device (as server) wants send info ios device, either indicate (with acknowledgement) or notify (without ack).
hope helps.
ios core-bluetooth bluetooth-lowenergy
No comments:
Post a Comment