I'm developing an application for iOS which is connecting through TCP sockets to a server aplication run on Android. In order to find the IP of the 2nd device I use a UDP request and receive the IP of the server.
It's working well all the time when I'm connecting them to Wi-Fi network or when I use the Android device as a hotspot to the iPhone. But if I want to make the iOS device a personal hotspot, I can't reach connection between the two devices and the app is useless in this regime. Is it possible to connect the devices then and is the algorithm the problem? I would be glad to hear if someone has ever had a similar problem and knows the solution.
Related
I am currently researching the possibilities of connecting an iPhone app to a windows app via Bluetooth.
The Windows App is written in C# and uses Serial ports to transfer Data. Windows allow me to connect a serial port to Bluetooth. This setup allows communication via Serial over Bluetooth.
I know this setup works because I have managed to communicate with this setup from an Android phone.
I don't seem to be able to do the same with an iPhone 5s (I can't even seem to pair the iPhone to the Windows PC). I haven't been able to test this with a more recent iPhone, but I don't expect it to work either since it's an Apple device with a Windows machine.
I've done some research regarding the possibilities of connecting an iPhone to something else (like a PC) over Bluetooth, and it doesn't seem to be possible.
I have found this SO answer which seems to say that I cannot use Bluetooth Classic to connect an iPhone to a PC.
Since I can't seem to be able to use Bluetooth Classic, I have also tried to use BLE, but I haven't worked out how to simulate the PC as a "peripheral device" to connect to it from the iPhone. I don't even know if that's possible.
So basically my questions are:
1) Is it possible to communicate via Bluetooth between an iPhone and a PC?
2) Would it be possible to use some sort of adapter for the iPhone to connect to the PC (For example, an Arduino with a Bluetooth chip, acting as a BLE peripheral, and sending the data to the PC?)
3) What alternative would I have to this? I know WiFi might work, but I am uncertain if the PC running the app will be network enabled when the project goes live.
You can connect an iPhone with PC over Bluetooth using BLE.
I tried with Linux machine (Ubuntu 16.04 with BLE dongle 4.0) which acts as BLE Peripheral and iPhone 8 with BLE 5.0 as central application. Both could able to successfully communicate using custom GATT service that we developed. The throughput i observed here was 2.5 kiloBytes per sec.
If you are so specific on Windows to act as BLE Peripheral, then i believe there are apps available in Windows store to download which enables Windows PC to act as peripheral. Once peripheral mode is enabled, you can always communicate to this over BLE using iPhone [recommended latest phones]. But you need to try this out.
I´m developing an iOS App using Texas Instruments Launchpad CC3200. But the awesome SmartConfig feature is only working for 2,4Ghz WiFi Network connections.
Users trying to do SmartConfig on hybrid or 5Ghz only WiFi connections are failing.
Does anybody know if it is possible to programmatically determine what type of WiFi connection (2,4Ghz or 5Ghz) an iOS device currently has?
Unfortunately, this is not possible unless your device is jailbroken or if you have access to private headers in the API.
The only thing you can do is tell the difference between cellular and WiFi connection using the Reachability class by Apple. The networking tools are very limited in this case.
I'm developing wireless gadgets to be controlled from different iOS Apps and I'm stuck with the connection and TCP messages part. Can anyone point me in what direction should I go?
To start, the first device is like a Belkin WeMo device. I've already added a network scanner with simple pings, but I don't fully understand the mechanism.
I am currently using GCDAsyncUdpSocket to build a app that can communicate with UDP protocol.
I am testing whether the connection work with this iPhone app "UDP_Test" >> App link
When I send msg from my iOS simulator, the message does appear received on my iPhone "UDP_Test" app. However, when I download my project to the other iPhone and setup the connection with the iPhone that has "UDP_Test" app, the communication does not work.
Then I tried using "UDP_Test" for the two iPhone to communicate, it does not work as well. Same goes to iPad and iPhone. Is there a restriction for both iOS device to communicate with UDP?
Thanks.
I have found a way. We have to go to Network setting and choose your network. Then go to "HTTP Proxy" and choose "Manual" then enter the port that your device going to listen to, then it works.
Your two devices needed to be on the same subnet of the WiFi network.
I am working on a Mac that has an Ethernet connection to a LAN and the Internet. I have an iOS application that I am running in the simulator that needs to connect to a WiFi network in another office. I turned on Airport and connected to the WiFi network I need, but I don't know if the simulator is using the Ethernet or Wifi connection to communicate. I looked for settings in the simulator and couldn't find a way to tell it to use the WiFi connection exclusively.
Thanks for your help.
A coworker answered this question for me today. Apparently, the iOS simulator does not do WiFi. It only knows about a network connection. He said the simulator simply reports that there's a connection, but it's not WiFi.
Hope this helps someone.
I guess iOS Simulator uses whatever network connection is available tot the Computer it is running on. If there are multiple Connections it should scan both IP ranges... I don't exactly know how it handles the case both ip ranges are the same... This is (even if possible) no good solution, because you never exactly know if there are multiple devices with the same IP...