2-way Bluetooth communication between iOS and Ubuntu

I am working on a project for where I need to send messages (`string`) from iOS (client) to an Ubuntu (server). The communication needs to be two-way, i.e. iOS makes a request to the server and the server will respond with some data. The server needs to perform some actions based on the request and hence it may not be able to respond immediately.


It could be argued that this can be accomplished by extending the heart rate monitor example. Total of 3 characteristics needed for any service - 1 on the client and 2 on the server:

  • First, the client can set the value of a Characteristic on the server (which corresponds to initiating a request).
  • Second, once the data processing is done and the data is available on the 2nd Characteristic of the server, the server can set the value of the Characteristic on the client (corresponding to an acknowledgement).
  • Third, the client can then read off the string message one byte at a time till some code corresponding to end of message (say ESC or ASCII 27) is reached.


Is this design suitable? If yes, then can you provide link to writing custom services on iOS and Ubuntu? Any other ways of accomplishing this?

iPhone 5s, iOS 8.4, null

Posted on Aug 13, 2015 2:33 AM

Reply
3 replies

Aug 13, 2015 10:43 PM in response to FoxFifth

Yes, I have seen the list of profiles supported on iOS.


My understanding from the second link is that 2 way communication is not possible with custom profiles. Is that correct? The client can only listen to some data being advertised by the server (like an iBeacon) without the ability to set any other characteristic of the server? Is this interpretation correct?


Is there a way to achieve what I want to achieve?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

2-way Bluetooth communication between iOS and Ubuntu

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.