How to connect iOS app to a hardware over wifi? Is it possible

favorite
I have this situation and I hope that anybody will be able to help me with. So we have some hardware devices that needs to be controlled by an iOS app (either all together or one at a time which ever possible to be implemented) and in return the hardware returns values to the app! Possible scenarios:

The iPad acts like a hotspot and the devices connects to it then the app control the hardware and read data from it. In this way no need for a router.
The hardwares connects to a local network where the iPad also connected then the app controls the hardware and can read data from (I think this can be done as if was a printer and an app communicate with the printer over wifi).

Now, I have no information how to do that or if this is even possible. I searched online but couldn’t find that much of info about it.

Can we use sockets? If yes how!

This a big topic that I didnt find enough info about it. If you have worked on this have created your own calss manager etc… and would share the code that will be great.

I appreciate all the help on this.

Thanks

This is called Peer to Peer WiFi, it’s technically supported by iOS but AFAIK it’s only exposed to us developers via the MultipeerConnectivity framework however you are only able to communicate between iOS devices using this.

You might be able to access some additional APIs using the MFI (Made for iPhone) program however you have to obtain a special license to access any of these resources and unfortunatly I don’t know anything else about it :confused:

This however might be possible… You would be able to use web sockets here, or even spin up a HTTP server in your app that other devices can communicate via.

You would probably want to use something like Bonjour to handle network discovery for this (see Bonjour, NSNetService, Zeroconf for more)

Your question is pretty vague so unfortunatly i can’t really help out with specifics but hopefully the above might help to get you started. Please let me know if you have any other questions :slight_smile: good luck!

This topic was automatically closed after 166 days. New replies are no longer allowed.