amirhosein
amirhosein

Reputation: 921

How to send long data (255 Bytes in one packet ) in ios using BLE

I want to send 255 byte string data in react native with BLE, in android there is no problem but in ios only 185 byte can be sent, I requested for mtu = 255, but no result libraries that i tried: react-native-ble-plx and react-native-ble-manager

Upvotes: 2

Views: 873

Answers (1)

Emil
Emil

Reputation: 18452

iOS has fixed MTU. You need to use the "Write Long Characteristic Values" procedure to write a longer value. This should be done automatically by iOS when you set the write type to be With Response. Just note that the peripheral needs to support prepared writes.

Upvotes: 2

Related Questions