Hi,
I have a few questions on how to receive data (from an iPhone app) as a a peripheral device on nrf8001 (with RedBearLab BLE shield).
Basically I am trying to receive data on an Rx pipe. From my understanding, the api receives data through the 'ACI_EVT_DATA_RECEIVED' event. When data comes from the iPhone in question, it would be stored in 'params.data_received.rx_data.aci_data' array and the array size is stored in 'len' field. From the nRF8001 documentation v 1.2, I see that the maximum data size is 20 bytes. On the other hand from the app developer I was told that (at least in iOS BLE library) when central sends data to peripheral there is no limit on data payload per packet...so I'd like to ask:
-
is it true that per data received event on nRF8001, only 20 bytes of data can be received?
-
if 1) is true, if the data to be received is larger than 20 bytes (say 200 bytes), how should I manage receiving with the nRF8001 SDK? iPhone would send data at undetermined intervals to nRF8001, and I would preferably receive the entire data, and upon knowing that I have received the entire data move on to process it. So in other words, if the 'data received event' only takes in 20 bytes of data each time, how can I know that this current data received event is the last of this sequence?
Thank you for taking a look at this post!