I'm using react native to create a simple app that essentially allows 2 android phones to communicate. These devices will always be next to each other, and will only communicate with one another. As I was doing some research it seems that bluetooth would be the best approach, connect the 2 phones and have them send messages. However, I haven't found a working react-native library. It seems that classic bluetooth (serial) would be the optimal approach and not BLE. I tried libraries that support classic bluetooth such as react-native-bluetooth-cross-platform, react-native-bluetooth-serial, and react-native-bluetooth-serial-next. However, none seem to work properly (they seem fairly outdated). The devices pair, but don't connect in order to send/read messages. Is there another form of secure communication I can use to have these devices communicate with one another? If bluetooth is the best form, is there any better serial bluetooth libraries out there?
Edit: I was also looking into using wifi p2p, however it seems like overkill since it's only these 2 devices that will communicate to each other and no other device. Also if I do use wifi p2p would it be possible to only have 2 devices communicate (i.e no other device can eavesdrop or send messages to the 2). Also, these devices will be stationary and pretty close, so if there is a way for 2-way communication via a cable, that will also work.
Related
I want to make a file sharing app and for that I need to find nearby devices which are on the same wifi network whether it's android devices or iOS devices.
What is the best way to find nearby devices?
one of simple ways would be to implement Bonjour - https://en.wikipedia.org/wiki/Bonjour_(software).
There is a lot of projects about that https://github.com/search?q=Bonjour
Can we control multiple DSC-QX100 cameras using the Camera Remote API SDK from an iPad OS7?
The objective is to cause multiple cameras to "snap" picture at the exact same time. Perhaps each camera has an address (serial number)...can the software communicate with all cameras at the same time using multiple addresses? Need is limited to still photos and so-called fast, rapid photography. Video not necessary.
If so, how?
Unfortunately you can only control one QX100 lens at a time. This is because the lens connects over WiFi and you are limited to only a single WiFi connection at once on an iPad. It may be possible using a desktop PC with multiple wireless cards installed but that would be the only way.
As the Sony rep said, there's no way to do this with "officially supported" techniques.
The reason for this is that the camera acts as a WiFi Access Point (AP) - so while multiple devices can connect to it, most mobile devices can only connect to it and not anything else (since iOS and Android don't support connection to multiple APs simultaneously). This is also why you can't use other network interfaces when connected to the camera. (I don't know about iOS, but Android always prioritizes WiFi over cell network data, for example.)
Android devices have a feature called "WiFi Direct" that provides more flexibility in terms of peer-to-peer interconnection, but iOS does not support WFD. The QX100 DOES respond to WFD invites, and you can accept a pairing request with (if I remember correctly) a long-press of the shutter button. However, the official app only supports normal WiFi AP connections.
I have not yet attempted to see if using Sony's remote API in combination with the (unsupported but apparently present) WiFi Direct capability works.
More info on Wifi Direct and Android can be found at http://developer.android.com/guide/topics/connectivity/wifip2p.html
Marlin SONY, I disagree, wifi is Ethernet and by definition can handle multiple devices on the same network. If you run a phone or iPad as a hotspot and connect multiple devices, it works.
Multicam Switcher Basic is an example of a free app that supports cutting together multiple camera angles live. Unfortunately the app is still being developed so features like third party camera support isn't included, but it does show what is possible and awaits development.
I think this should be possible. Apps like CollabraCamâ„¢ (Multicam Social Video Production) or RecoLive MultiCam prove that is possible to use mulitple cams simultaneous.
I need someone too to develop an App to be able to use "two" sony dsc-qx for 3D shoots. Please, if You know how or who can do this contact me email#3-d.re
Is there a way how to get list of all devices connected to the Bluetooth peripheral?
I want to connect to iBeacon and check if another iPhone is connected to it.
No, two reasons why not:
iBeacons are not connected to the iOS device, iBeacons are broadcast only and no back communication exist from the phone to the beacon.
Knowing details of other BT 4.0 Centrals connected to a Peripheral are not in line with the the privacy features of Bluetooth 4.0. iOS and other Centrals are are using resolvable private addresses, in order to avoid situation like you are describing.
#barbazoo is correct that you cannot do exactly what you are asking because iBeacons only transmit data -- they have no idea what devices see them.
You can accomplish something similar, however, if you have an app running on each of the iOS devices you mention, and you have a server where you can build a web service. The web service would expose two methods:
reportIBeaconVisible(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor, myPhoneAdvertisingId)
queryVisiblePhones(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor)
The app would report each iBeacon it sees using the first method, passing the iBeacon's identifiers, along with the phone's advertising identifier to the server.
The app could then use the second method to ask the server what other phones have seen the exact same iBeacon, which would return a list of phone advertising identifiers.
You'd have to have logic on the phone to only report data to the server at a reasonable frequency. You'd also need code on the server to automatically delete phone records in the list if the phones haven't reported seeing a beacon in a certain time interval.
I want to create an Application that will send a message or pop up an alert when an people is using a same Iphone Application. And the requirement is , it also need to pop up an alert even it is in background or in sleep mode.
I found an function named UIBackgroundModes and bluetooth-central that will allow to move bluetooth in background.
Somebody help me and i will also be happy if there is sample code.
Not while app is in background mode. For background mode, you will have to fallback to push notification.
Excerpt from Apple Docs:
Peer-to-Peer Connectivity Provides Local Wireless and Bluetooth Networking
Peer-to-peer connectivity allows your game to create an ad-hoc Bluetooth or local wireless network between multiple iOS-based devices. Although designed with games in mind, this network is useful for any type of data exchange among users of your application. For example, an application could use peer-to-peer connectivity to share electronic business cards or other data.
Peer-to-peer connectivity is provided in iOS 3.0 and later.
I just want to know that is it possible to communicate two different apps in different device. Like I have a sample app in device A App name A and in another device B i have a app B I want to share some things between them. I came across to GameKit framework in iOS but I made a app when it is installed in both device they communicate succesfully but what if apps are different and what is the size limit of the data to send it over bluetooth in iOS.
Any idea how to implement this feature?
Two different apps can communicate via Bluetooth using GameKit as long as they both agree on the protocol (i.e. if you wrote both apps, or you know what protocol the other app is using).
There's no limit to the amount of data they can exchange, although there is obviously an upper limit on bandwidth (bytes per second).
Does that help?