I am working on a project in which I should connect an iPhone to an accessory via WIFI.
Some blogs spoke about ExternalAccessory.framework but this one is used for establishing connection via Bluetooth.
What library should I use to achieve this ? Could any one please point me to the right direction ? Thanks.
(Assuming that you don't know the ip address of the device you want to connect to)
From an iOS standpoint you want to use NSNetService to discover devices on the network which you can connect to.
This requires that your other device can use mdnsresponder to publish its details onto the network such that it can be found and connected to.
If you do know the ip address (or, once you do know it) then you can use NSURLConnection / NSStream to connect to the device (depending on what capabilities it offers).
Related
I have an iOS application with a tableview which I would like to send text strings via USB to my Windows computer indicating which cell was selected by the user.Anyone have experience with this type of interface?
I've written a blog post detailing how to achieve this here.
http://thecodewash.blogspot.com/2017/05/communicating-with-your-ios-app-over.html
To answer your question (so this answer isn't just a link), yes it definitely is possible to achieve this utilizing the USB Multiplexing Daemon (usbmuxd) program that is usually installed as part of iTunes. This program can create a socket connection to your iOS device through the USB cable, and allow you to communicate via that socket connection like you would any other socket. The link goes into much more detail.
Hope this helps!
(In short) Yes, you can communicate with ios application via normal socket communication by using ITunes which acts like proxy. In this model your ios app acts like server listening for connection. Windows app must connect to iTunes on port 27015 and estabilish connection to specific port (used by ios app) on connected via usb device. This is done by using a special MUX protocol described here
I am building an app which will communicate with an external accessory capable of establishing a wi-fi bridge.
I am not able to defer the situation that how do I establish connection with this external accessory and then the device should be shown connected in my app.
After connection, there are certain actions I need to perform on the device. So a two way communication is also a requirement. How do I initiate a connection and then communicate over it.
Is any Apple framework available for it. As I am not able to find anything.
If possible, please provide a sample code on how to achieve this feat.
Thanks in advance.
I was exploring regarding Wi-Fi Direct and came accross with conclusion that WiFi -certified devices can connect one-to-one or one-to-many and not all connected products need to be Wi-Fi Direct-certified. One Wi-Fi Direct enabled device can connect to legacy Wi-Fi certified devices.So by this we can conclude like if one device is having WiFi direct and other device is having Wifi one can easily connect to it.
I have following queries please help me to resolve.
1.This Wifi Direct is there in Android ICS onwards.So i am trying to connect WiFi Direct of my Samsung Note 2 having Jelly Bean with another Samsung Mobile Galaxy Y duos having Ginger Bread that only has WiFi but i am unable to detect? Can anyone help me in finding reason for this?
2.Another thing i studied is Wifi Direct device will become as access point means it will create an Ad-hoc network ? So why another Wifi devices are not detecting it?
To find a wifi direct device in access point list of a normal wifi u need to create a wifi direct group. For this you need to first connect two wifi direct devices out of which one will act as a group owner and other as client. Once a group is created group owner act as a normal access point for legacy devices(Wifi devices).
Thus you need to create a Wifi Direct group first
I need to run an application in my ipad which has to talk wirelessly to a controller. The controller communicates on serial as well as RS485 port. It doesn't have a wifi adapter.
What are the options for me to do this ?
One thought is, I have to buy a wifi to RS485 adapter which I will attach to my controller and then my ipad can connect to the controller through the wifi adapter. Is this feasible? My doubts are because, I am not sure whether Ipad has the capability to open a raw socket connection to the remote wifi adapter (on the controller).
If not, then what are the other options which are available for me ?
If you are comfortable with fairly straight forward electronics and programming, this is how I would do it.
I would forget about having them talk directly and instead use the internet, you can get cheap controller called an Electric Imp that you can create code for using their online portal to connect your device to the internet, the device itself connects up using wifi and its own secure VPN.
Once you have it connected up you can create you own webpage or app to talk to their cloud, this has the added advantage you can now control your device wherever you can get an internet connection and your device can continue to interact to the internet even when your ipad is off.
http://electricimp.com
I have ip addresses of two different iOS Devices which are connected to Internet. Now, I want to establish a peer-to-peer connection between them.
I had done this locally with Wifi and it worked properly. But I dont know how to establish this connection with an IP address. I want that I can connect them from anywhere, so I need to connect via Ip address. Also, is this possible without developing any server? Please help. Thanks.
I couldn't find any exact solution for this problem but one approach could be you can have two ios devices connected with a network having same public IP.
So indirectly both ios devices will be connected to the same network.
What you had done with wifi is probably an Ad-Hoc connection. Ad-Hoc is when you connect 2 wifi devices without any Access Point in the between.
You do not have to do that on the Internet, your devices are already connected to a network. What you need to do is to find out what their IP addresses are and provide them to eachother.
In case your iOS devices are NATed behind a router, you must forward the port which you want to use from the router to the iOS device.
Here are guides for port forwarding for all the existing routers: http://portforward.com/