As for now, I'm using multi peer connectivity between iOS devices communication in same network. Facing major problem in connectivity, its getting disconnected often. So would like to move different approach.
Someone pls suggest me to achieve this in some other concepts.
You can solve your problem programmatically by detecting dropped connections and attempting to reconnect whenever a connection is unexpectedly lost. Some other considerations are:
Multipeer connectivity will not work when the app is running in the background
Multipeer connectivity tends to become unreliable if you are trying to maintain a connection between 6+ devices
If you are determined to find a replacement for Multipeer Connectivity, then we'd need to know more about what you're trying to accomplish. If you're trying to make a game, for example, I might suggest Google Play Game Services. You could also look into WebRTC.
Related
I have created an iOS VOIP app. The reason behind creating a VOIP app was to make my application run in background. Well that is working fine. I am also connected to a host through TCP/IP.
The problem here is when the OS is restarting the wifi radio automatically at some interval, which results in a disconnection. Then I have to reconnect.
Can anyone help me to understand what exactly is causing this behaviour?
There are a few things this could be. Firstly, are you running iOS 8? there have been some reported wifi issues with it. Just google iOS 8 wifi issues to see how many people are having similar issues.
Secondly, it's not too irregular for your wifi network to shuffle you around, so it could be either your wifi router itself, or the iPhone. I would probably try using manual ip allocation instead of DHCP on your router as a test.
Thirdly, your software obviously needs to be set up to handle dropouts etc - dropouts and package less etc are fairly common parts of any networking.
I just started coding Multipeer connectivity with objective c in xcode. I have a few questions about the basics.
What is the range with Multipeer Connectivity? So if I make a chat program, will the two devices only be able to communicate if they are on the wifi network, or will they still be able to communicate if they are across the globe?
Will the program work with an ios device and a non ios device, so they can send each other messages? If yes, are there any extra methods or code that I need to add?
Thanks
As far as I understand MPC works over bluetooth and wifi- so if you are on a home wifi network, or a University campus network, your peers should be able to see one another. MPCis not for using across the globe that I know of...
This is an iOS technology only, iBeacon works across multiple platforms (iOS, android).
But, depending on what you want, you could make your app use internet to go across the globe, and you might be able to use straight bluetooth to connecto to a non-iOS device, then hook into MPC.
I would like to add to Keith's answer above that MPC supports peer-to-peer Wifi as well. This means that the devices involved don't need to be connected to an access point to talk to each other.
Also, the framework protects the developer (and end user) from the underlying technology (bluetooth, WIFI, P2P WIFI) used. In a given "session" between any number of devices (currently only up to 8 supported), each device could be using a different technology to talk to the others.
I am having an issue concerning Bluetooth Low Energy. I am using an iPhone (iOS 6.1) and an Nordic board using the nRF51822 chip.
I am currently developing a system where the iPhone and the nRF51822 connect using certain services, then disconnect and reconnect again. However, on the second connection, the nRF51822 uses different services from the first connection.
The problem is that on the second connection, the iPhone discovers the former services of the first connection. I have tested with a TI CC2540 development board and it discovers the new services well. The only solution I have found is to put the central manager to nil and allocate it again to make it work. Nevertheless, it seems kind of a dirty solution, is there a standard (clean) way to deal with this kind of situation?
If you don't do any bonding, but only pairing, then you would not have this issue.
If you do require bonding, then the best way to solve this problem is to use the Bond-manager that is in the SDK. If you are not using the bond manager, you could try to use the Service Changed functionallity and set the start handle to 0x000C, and end handle to 0xFFFF. This would most likely trigger a rediscovery from the iOS, thus finding your new services and characteristics. The iOS would always look for service changed, and enable this in the peripheral.
If you have any Nordic related question, then you could post them at the Q&A forum located at https://devzone.nordicsemi.com/
BR
Pål
Services and characteristics are cached on the iOS side when you initiate a pairing request with a ble device and discover services/characteristics. Don't do the pairing request if you're concerned about that. Then just pass in the array of services you actually want to discover (not nil).
(Side note: The whole thing of having the ble device controlling which services are seen to the iOS device seems really muddled..you should control that on the iOS side.)
I've been at this for a few days now, and can't seem to find a solution. I want to create a peer to peer network over wifi on iOS. All open source code seems to be supporting running a server or being a client, but there's no code built to support being both - a peer. Is anybody aware of a way I can do this?
iOS 7 adds the Multipeer Connectivity Framework for exactly this purpose.
Have you thought of using Apple's GameKit framework? I've used it in the past for some simple communication between devices. It's really simple and can get you out of the gate quickly. This looks like a good tutorial.
I think Open Peer is the right solution. It provides real direct peer-to-peer connection between devices without the need of a centralised server. Check out this introductory video.
You cannot create a wi-fi network programmatically in iOS using current APIs. GameKit offers some APIs to do so over bluetooth however.
If you wish to implement a custom solution using CocoaHTTPServer, be aware that you will still not be able to create a direct wi-fi connection, you will simply be able to connect devices on the same (pre-existing) wi-fi network.
Ad-hoc peer to peer Wi-Fi (such as 802.11s) in iOS is still a few years off. Maybe iOSX ;)
iOS supports the Multipeer Connectivity framework which enables iOS devices to talk to each other over Bluetooth, infrastructure (with a router) WiFi, or P2P.
It does not, however, provide a way to explicitly use P2P. There is a layer of abstraction away from how any of a device's peers (other iOS devices) are connected, and it does not currently allow for non-iOS devices to be connected.
I'm working on an application that does does lots of iOS <--> OSX communication. For the most part I have this solved.
I'm using CocoaPort to do the communication. Over Wifi this worked nicely and was plenty fast.
I'm using Bonjour to find my server. This required publishing the service with a modded DNSSDObjects-style net service on iOS. Apparently services published over Bluetooth on OSX cannot be seen by iOS, but the other way round works nicely, except that you need to keep the devices paired and connected.
Now my question is, how can I improve the speed of the Bluetooth connection? I'm getting maybe 100kb/s max and that seems to just stop after about 1 minute even though the connection is still open.
I think I need to use the AMP/HS stuff in Bluetooth 3.0 to get a fast connection. My understanding is this creates an AdHoc wireless network between my devices (MBP retina and iPad3, so should be capable of a decent speed.)
According to Wiki, Bluetooth 4.0 includes the HS spec in Bluetooth 3.0 and according to Bluetooth Explorer, the iPad is 4.0 spec. Is there a way, maybe via IOBluetooth, to request a high speed connection?
According to an engineer # Apple, this is not currently feasible. The best you can do is Bluetooth Classic, which is probably the speed I'm getting.
If you want this feature, consider opening a feature request at bugreporter.apple.com.