Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
This is kind of wide question, I found many information about this topic.
Possible technologies
Bluetooth
GameKit iOS only?
Bluetooth P2P library, with Wi-Fi and GPS?
Wi-Fi
Wifi Direct?
Bonjour zeroconf?
Neither of these does currently have a fully-implemented peer-to-peer library, or I haven't found such.
In fact I'm not interested in any kind of gaming library (and I don't target such issues)
Questions I'd considered
Peer to peer connection in android
Android since API 14 and no support for cross-platform usage
Android Peer-to-Peer technolog
ANI (https://github.com/pocmo/Android-Network-Intents) only network intercepted
DIAL,MOVL only wi-fi
Android Peer-to-Peer Connection
C2DM/GCM requires mobile data
Can Android do peer-to-peer ad-hoc networking?
Direct Wifi only
Peer-to-Peer video from iOS to Android?
Requires network data and server
http://forum.unity3d.com/threads/141469-Wifi-Bluetooth-Multiplayer-on-iOS-and-Android
GameKit is compatible only with other GameKit
https://www.alljoyn.org/docs-and-downloads/documentation/alljoyn-android-environment-setup-guide-rev-d
Bluetooth is not well supported, and requires rooting of device.
I'd like to efficiently communicate between as many devices as possible, without need of using mobile data (3G,HS*PA,LTE) or WIFI AP as intermediate point.
And not connecting people over large distances, really just like a PAN over Bluetooth.
Thus, what features I'd require to have
Totally OFFLINE (not requiring any mobile data services or wifi AP)
Cross-platform compatibility (Android, iOS)
Mobile OS backwards compatibility (Android since 2.3, iOS since 5.1.1)
Features I'd like to have
Route optimization (OSPF, MME, ...)
Not requiring devices to authorize to network (see Android insecure BT RFCOMM)
Possible wrapping up-to tens of users (20-30 max imo, or more if possible)
If needed, network could possibly choose its own leader (server node) ?
Is there currently anything I could use for mentioned features?
I know google just came out with a cross platform api for ios and android devices to communicate with each other. I don't know what you're exactly looking for but this one lets you pass small binary payloads between Android and IOS devices. they don't have to be on the same network at all either or connected to the internet. I'll include the link just check it out.
https://developers.google.com/nearby/messages/overview
Open Garden is developing this sort of technology and implement it in their app, Firechat. Testing the app, we found that Android-to-Android connections worked only over Bluetooth, iPhone-to-iPhone worked with bluetooth or wifi, and Android-to-iPhone only works if the phones are connected to the same network.
Here's a link to their sdk which should be out soonish: https://opengarden.com/sdk
I'd look into WebRTC datachannels which has native support for both iOS and android. You can also include desktop browsers as peers with WebRTC.
Currently only OpenGarden's FireChat is one of the only major players doing this. They do provide a mesh-kit sdk which currently I think you need to Apply for.
There is another project which has been kinda of shakey, but I heard was suppose to have a release coming really soon: The Thali Project
Related
So I'm trying to build an app that uses iOS 7 Multipeer Connectivity framework on the iPhone, but I'm now trying to connect the iPhone to an Android device using the same technology. Is this possible?
Is there something like Apple's multipeer connectivity framework for Android, or is there any way of connecting an iPhone to an Android device without using internet or mobile services, but using Wifi and bluetooth only?
Maybe a bit delayed, but technologies have evolved since so there is certainly new info around.
As iOS has yet to open up an API for WiFi Direct and Multipeer Connectivity is iOS only, I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).
On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).
If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can do cross platform p2p for you, without you needing to build it up from scratch.
For example: p2pkit.io or google nearby
Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.
There is currently no way to connect with android over bluetooth, but you can connect with wifi using the Multipeer framework I believe. I know the developer of spaceteam accomplished this with his game. I'm not sure how exactly but it is possible.
Mutipeer connectivity cannot connect iOS and Android devices. Firechat & Spaceteam are using their own implementation.
More information here:
A couple of weeks after its iOS launch, FireChat made its debut on Android. Since Android doesn’t support Apple’s Multipeer Connectivity Framework, developer Open Garden had to build its own mesh networking technology to enable off-the-grid messaging across Android devices. However, FireChat messaging hasn’t been possible between iOS and Android. That is, until now. Open Garden has just updated FireChat to allow for off-the-grid messaging even between iOS and Android devices. While it declines to reveal the exact details of how it managed to make Apple’s multi-peer framework and its Android mesh network connect with each other, Open Garden has told TechCrunch that its cross-platform capability uses peer-to-peer Wi-Fi and Bluetooth personal area networking.
Source: http://appadvice.com/appnn/2014/06/firechat-now-supports-off-the-grid-messaging-between-ios-and-android
Google Nearby can do it. To cross platform, Google Nearby Message Api can do it.
I've been looking at iOS 7's new P2P networking framework, MultipeerConnectivity, and from the description, it seems to me that it uses a combination of some kind of Wi-Fi Direct technology and Bluetooth PANs.
Is the Wi-Fi Direct technology in this framework compatible with Android's Wi-Fi Direct? Can this framework actually be used for cross-platform P2P networking?
This is what we know:
There's no BTLE/Bluetooth 4.0 advertisement visible on my Texas Instruments Bluetooth Low energy scanner.
No WiFi Direct activity seen by JuJoDi.
Talkkr app can connect while WiFi is off and the connection takes about 10 seconds.
My working theory: the MultiPeer uses Bluetooth Classic, based on the above.
iOS Bluetooth Classic is known to be under the Apple MFA Accessory API's tight control and lockdown, including the MFA authentication challenge-response. Apple controls the MFA encryption keys (either in software or by the accessory authentication chips). It makes it inaccessible to other platforms.
The device is not found by either when advertising or browsing with MultipeerConnectivity. Tried on Galaxy Tab 2:
No, the two are not compatible.
The MultipeerConnectivity documentation you linked to explicitly states (emphasis mine):
The Multipeer Connectivity framework provides support for discovering
services provided by nearby iOS devices
Although you may be able to hack together a workaround akin to the short-lived iMessage app for Android, I wouldn't recommend it.
Based on my experimentation with iOS 7 AirDrop, it doesn't seem to be using WiFi Direct. The transfer rates are very low indicating that it may only be legacy Adhoc WiFi (capped at 11 Mbps). Did you ever read Apple claiming to support Wifi Direct explicitly? Please read my blog post for details.
I am very interested in this subject as well and I came across these rather old links
AllJoyn
AllJoyn® is a collaborative open-source software framework that makes it easy for developers to write applications that can discover nearby devices, and communicate with each other directly regardless of brands, categories, transports, and OSes without the need of the cloud Source: https://allseenalliance.org/developers/learn
OpenPeer SDK
Open Peer is an open P2P signalling protocol Source: http://openpeer.org/open-peer-sdk-for-ios/
I haven't used any of these libraries but I am interested to add them to my simple game for the fun of it.
source
Peer to peer android and iOS with Wifi direct (multipeer connectivity?)
Maybe a bit delayed, but technologies have evolved since so there is certainly new info around.
As iOS has yet to open up an API for WiFi Direct and Multipeer Connectivity is iOS only, I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).
On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).
If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can achieve this for you, without you needing to build it up from scratch.
For example: p2pkit.io or google nearby
Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
So I'm currently developing a multiplayer turn-based card game. I'm done all the core game logic and UI, and just trying to figure out the best method of trying to make it multiplayer, with it connecting thru multiple phones. Right now, it seems my only option is Bluetooth, which from what I've researched is a very poor option, especially due to the fact that there's no support for it in emulators. So I'm wondering if there are any alternatives. The alternatives needs the following:
The ability to have what is essentially a "Game Lobby" where players can join "Rooms" (Similar to the ones of many other multiplayer games such as Call of Duty)
Supports API level 8 and above
Connects up to a maximum of 6 players
Does not require the Internet in order the play (This is the most important one)
Does not require any payment in my part (No servers)
Preferably easy to test on emulators
I've also considered direct-WIFI, but it requires API 14, which makes the game unavailable to over half the Android market.
Also, if there isn't any other option, is there an SDK or tutorial for multiplayer Bluetooth turn-based games? And is it even possible to have the ability to have "Game Lobbies" using bluetooth without the devices being paired?
Using Bluetooth fits your list of requirements, and I don't see any other way short of wifi which you ruled out.
As far as I know the Bluetooth communications must be implemented using a client-server model. For example one player must start the game, he will host your Game Lobby, and the other players can connect to it. The host probably also want to play, so you have to implement it in a way that the main "game engine" can communicate with two kinds of players: remote over Bluetooth, and local (the host himself). This is probably a bit tricky but doable.
I'm not sure if there is a limit on the number of active Bluetooth connections. 3 devices at the same time worked fine for me on a pretty old phone (API version 4). However, battery ran out much faster.
About the pairing... The devices I worked with (not phones) were using Bluetooth in server mode, and I had to pair with all of them to use. By the same logic, I think the players will all have to pair with the server (the phone that starts the game).
Given your requirements, I'd say your options are Bluetooth and Wi-Fi Direct. Neither should be easy/supported by emulators (never tried Wi-Fi Direct).
It should be noted that bluetooth needs a master device, that connects up to 7 remote devices. Wi-Fi direct is to my knowledgeable a more decentralized approach (what if the master decides to leave the game?).
Both approaches allow to retrieve discoverable devices. Might be worth considering a hybrid approach, where all devices with Android 4 use Wi-Fi Direct. Older devices also use Wi-Fi direct by connecting, via Bluetooth, to a newer phone that relays the packets.
This question already has answers here:
Is it possible, in principle, for an Android device to interface with an iPhone over Bluetooth/GameKit?
(7 answers)
Closed 9 years ago.
First of all I am an Android developer, so the question goes to all the iOS developers.
Is it possible to achieve an Android <-> iPhone/iPad direct communication?
Some claim it is not possible, others claim it is.
I guess two possible technologies would be Bluetooth and/or Wi-Fi Direct.
Wi-Fi Direct is not recommended because it is not supported by Gingerbread and as far as I know, it is not supported by iPhone either (maybe iPhone 6, as I have heard from rumors)
It is already known that Bluetooth communication is achieved between iOS devices using GameKit and here is a reference.
I don't understand what is so special when communicating with GameKit??
Are the messages wrapped in some way with extra bytes at the beginning and ending of the message? Fine, we can wrap the messages the same way in Android!
Are the messages encrypted?!! And if so, could we decrypt them when they are received in an Android device?
Any ideas, workarounds, or other hackerish solutions are mostly welcome!
There are three frameworks available in iOS using which you can develop the bluetooth applications:
1. GameKit: This is the publicly available framework . But using this you can only establish and communicate between only two iOS device. So this framework having its own limitations .
2. BluetoothManager: This is private framework .I used this framework to discover the non iOS devices . I have established the connection also . But cant able to do the data exchange. I think it is still under development. For the reference you can refer this link
3. CoreBluetooth: This is also the public framework. This can only discover BLE enabled devices . I have successfully used this to transfer the data between the BLE enabled devices.
iOS does not implement any standard Bluetooth protocols that would allow it to communicate with other OS'es. GameKit is proprietary and if it were easy to hack it then people would have already done so (and Apple would have closed the hole).
Bluetooth LE is only supported by few Android devices (it is not in AOSP yet) so it is not really useful yet, even if it did support peer-to-peer.
I've read that it is possible to do what you are after via Wi-Fi direct, e.g. with this library:
https://www.alljoyn.org/
It says that it supports both Android & iOS - I haven't tried it myself, but it appears to do what you are after.
For devices on the same local network, Bonjour (a.k.a. zeroconf) can be a good way for processes on different machines/devices to discover and interact with each other.
See apple bonjour for android for some pointers to an Android implementation of Bonjour.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Is it required for a mobile phone to have a dedicated Zigbee chip in order to be a Zigbee node (coordinator/router/endnode) ?
If yes, then, I guess there should be a driver module for it as well ?
I don't know about the exact HW structure of mobile phones; in laptop we have a wlan card with its own antenna and driver; how about mobile phone ? there are separate wifi, gps and bluetooth chips with separate driver modules for each, and all sharing the same antenna ?
Thanks
Yes, even though several wireless technologies (WIFI, Bluetooth, ZigBee) can work in the same 2,4 GHz frecuency, you still need a transceiver (transmiter and receiver chip) which supports specifically this technology. In the case of ZigBee, you need an IEEE-802.15.4-compliant transceiver chip.
The idea of including a ZigBee module in one phone is quite interesting. However, I am afraid that you will not find many phones like this. May this change in the future? I have no clue.
Could you give us please more information about your Project? On these kind of projects you usually do not need your phone to be part of the ZigBee network. The coordinator could be connected to one normal PC, and you can provide access to the ZigBee network through an web application. From this application you can serve all data gathered in the network, see the status of the nodes and even send commands.
Another possibility, is to create a network bridge between two technologies, so you can plug a ZigBee chip to your phone through USB, WIFI, Bluetooth, Android port, ... But in this case, unless you find a final product, you will have to assemble some chips and write some code.
At this point in time for ZigBee support the hardware will require a separate IEEE 802.15.4 transceiver chip (802.15.4 is the underlying protocol that ZigBee uses). The most common frequency for operating ZigBee is the 2.4GHz band common to WiFi and Bluetooth, so in theory one chip and antenna could provide unified WiFi + Bluetooth + 802.15.4... but to the best of my knowledge there is nothing on the market (yet). There are however unified Bluetooth+Wifi chips (eg RaLink RT3592BC8). GPS always uses a separate antenna/chip because it operates on a different frequency band.
I've answered a similar question here:
https://stackoverflow.com/a/16985211/1752548
It's about using an SDIO Zigbee card in an android device. I haven't managed to make them work yet, but it looks promising.
Hope it helps