gRPC over Wifi to iOS?

I’m considering diving in to Elk. I’m a very experienced audio developer. The stumbling block with options I’ve looked at always seem to be wireless remote UI from a tablet. I’ve done a significant amount of work using BLE on iOS, that seems a natural solution. I understand that BLE is not yet supported in Elk, it was suggested that I use gRPC over WiFi. I’ve not done any development work with Wifi on iOS.

So, the question is, has anyone got any simple examples of gRPC with Wifi working on iOS? Importantly, is this even possible in a peer to peer configuration (i.e. no need for a local Wifi network running off a Wifi router)?

1 Like

Hi @Jandyman,
for the WiFi access, if I understand correctly what you mean by “peer to peer configuration”, it’s possible to set up the WiFi on the Pi to act as a hotspot through hostapd.

We did this in past projects and it’s not difficult; however, once the users will connect to the Pi Access point, they won’t be able to access the Internet anymore and several people find it annoying to switch between networks.

I’m not a iOS developer but on the mobile side, I guess you can look at this official gRPC SWIFT implementation:

Regarding BLE: we used it extensively in the past but is not part of the open-source release yet. What we had needs to be generalized more and, especially, we would like to have some companion client libraries on mobile (which we don’t have) before opening it up. It will work as a sort of gRPC to BLE bridge, wrapping SUSHI’s gRPC API inside BLE characteristics.

You can try to do something like this on your own using BlueZ periperhal mode. Here a library that could be useful for this purpose:

This one in C++, there are similar peripheral Linux libraries for node.js or Python, too.

Thanks for the info. I think the hotspot solution could work, even with the advertised limitations. I did see grpc-swift, but was a little scared of the mention of it being “experimental”. I really have to limit the number of new technologies I delve into, I’m only one developer and have finite time. That is after all the reason I’m interested in Elk OS.

I’ll think about it, but it seems that maybe the best thing to do is wait for BLE and at least a simple end-to-end example using gRPC for iOS. It sounds like you are headed that direction. I have a related question, but I’ll ask it as a new topic.


Actually what they say on Github’s repository for Swift / gRPC is that the old implementation was experimental but the current branch for Swift NIO is considered “production ready”:

Is there a way I can be notified when the BLE stuff makes it into the open source project?

BTW, once I get my work and iOS app ported over to Elk Audio, after the BLE stuff is ready, I’m happy to share that work open source.

Hi @Jandyman,
since it will be included in a release, just watch out when we’ll post new releases here on the forum, on Github and on our other channels (website & social media).

BLE is not going to arrive sooner than Q3, I’m afraid…

Very happy to hear about you willing to open-source things! Since the mobile client part is where we struggle the most, it could actually be very helpful.