Thank you for always reading my questions. This time, I'd like to ask some specific questions to gain a deeper understanding of iOS CoreBluetooth.
In the previous question, we learned that although iOS can perform BLE scanning in the background, it is not suitable for use as a data logger.
I was also taught that when using it as a data logger, the iOS app should use GATT communication, and that instead of reading data from the device one by one, it is recommended to store large amounts of data on the device and connect at an appropriate time (such as when the iOS app enters the foreground) to retrieve the data all at once.
My requirements are the same as last time.
-
I want to send data from a device equipped with some kind of sensor via BLE and display it in a graph in the iOS app.
-
Data should be acquired every few to tens of seconds and reflected immediately in the graph.
-
Measurements may take up to 24 hours at most.
-
I would like to avoid making any major changes to the device. Also, it is unclear whether there will be enough memory for the data logger for 24 hours. Therefore, I am first looking for an appropriate communication method for the iOS app.
-
iOS is smart and convenient, so I think users will check the measurement status every time they use this iOS app.Therefore, I want to be able to check the changes from the start of measurement to the present in a graph as soon as the app is launched.
-
I would like to measure data from multiple devices (e.g. 5 devices) at the same time.
I have a question based on the above requirements.
-
When thinking about the best way to avoid making changes to the device, the only way I could come up with, as someone with insufficient iOS technology, is to keep the connection open via GATT communication and continue to obtain data. However, does iOS GATT communication have any limitations in this regard? Will the OS automatically disconnect GATT communication at a certain time? Also, if that happens, is there a way to automatically reconnect and obtain the data?
-
Is it possible to smoothly obtain data using iOS GATT communication without any particular restrictions even in the background? Are any other permissions required?
-
Regarding the sixth requirement. Until last time, with BLE scanning, even if there were multiple devices, the iOS app could measure the data for as many devices as it wanted, but this time, how many devices can be read? In the case of GATT communication with iOS CoreBluetooth, can multiple devices maintain a long connection? Or is it basically better to have one device per connection when creating such an app for iOS? I would like to know if there are any restrictions or points to be careful of when using GATT communication with multiple devices.
-
I'm sorry for broadening my question, but if neither question 1 nor question 2 works, it will put a burden on the design of the device. If data is stored on the device, is it possible to automatically and periodically connect to the device at a set time interval (for example, once an hour, allowing for some margin of error) when the iOS app is in the background, and obtain log data from the device?
If you can think of any other best methods, please feel free to let me know. Also, I'd be happy if you could reply with any reference materials or URLs. Please note that our response may be delayed.