Peer to peer data transfer via Wifi and/or Bluetooth - ios

I am currently trying to develop an application that uses the device camera to record video. Currently i am using an Apple demo that gets the data incoming from the camera and display it in a layer. In a second phase i started documenting about how to transfer that data via Bluetooth and/or Wifi to an other iPhone (real time local streaming), but i am getting no information about whether this is possible or not. Some posts say that this is limited due to the limited maximum data transfer size over wifi or Bluetooth. Could anyone tell me if this is possible or not ? Could anyone give me an example ? Thanks.

Sure you can at least for WiFi. With Bluetooth there may be some issue with bandwidth. For network library, there is this excellent library with example that you can start with. You will need to learn at your own pace. Good luck!

Related

How can I track and test a modem's network connectivity in iOS? I need to log parameters from the modem and network which might be secure by Apple

My work wants to test their new modems using an iPhone app. We can use a current app or build a brand new one. Third party apps are OK but want to avoid jailbreaking if possible.
We want an app which connects to the network and monitors certain parameters for a set amount of time. We will log attributes from the network and modem. We already know it's possible to test speed, disconnections, reconnection time etc. Some of the parameters we need to track might be more secure or outside Apple's regulations.
These are the responses we are looking for:
Frequency (ie. 2462MHz) 
Channel Bandwidth (ie. 20MHz, 40MHz)
Radio Type (ie. 802.11a,b,g,n,ac) 
802.11 Deauth Reason code
802.11 Association Status code 
How can we track the above attributes using an iOS app?
Are there any apps out there that can track this information? Does iOS have anything for tracking these parameters?
Thanks so much!!

Controlling a device with CoreBluetooth

I was looking at a couple CoreBluetooth tutorials for iOS. Based on the tutorials, it looks like one device is transmitting data and the other device is receiving. Like in this example: http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitor the heart rate monitor is transmitting and the iphone is receiving. Is there a way to just connect to device to control it?
For example, I have a soundbar that is Bluetooth and can I write an app to do the same thing the remote it comes with does (volume up, volume down, input source change, power off)?
Adafruit proposes a lot of tutorials / material to learn how to use BLE (Bluetooth low energy)
tutorial about their BLE module (that could run with an Arduino): https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout
tutorial about their iOS app (to connect to the previous module): https://learn.adafruit.com/bluefruit-le-connect-for-ios
iOS app source code to connect to BLE devices or play with previous module: https://github.com/adafruit/Bluefruit_LE_Connect
If you need one way transmission with the maximun data rate you need to read this article:
http://www.tbideas.com/blog/2013/04/Optimizing-Bluetooth-Low-Energy-Performance/
it talks about CBCharacteristicWriteWithoutResponse
Stackoverflow thread about the same one way communication subject:
iOS. BLE. CBCharacteristicWriteWithoutResponse - How to make it work?
Hope this helps!

is it possible to get signal strength and channels of a wifi?

for Android, several apps exist that show such information, like https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer does it:
I need similar functionality in my iOS app but can't find any information about that. It this forbidden by Apple?
Apple doesn't allow apps to access the hardware like that. A fairly common workaround is to measure network throughput instead. You could take periodic samples of the current network speed, and then display that data over time.
Network Multimeter, for example, is an app that will give you info on your network as you walk around. It does that by sending data across the network and displaying the throughput.

Access 30-Pin connector with code

I am trying to set one pin of the old iPhone 30-Pin Connect from low to high so the best would be from 0V to 3,3V. Is that possible with a simple PodBreakout board like this?
https://www.sparkfun.com/products/8295
If not can you send a constant voltage out of the iPhones audio jack (This could be a good method too, cause now apple used its 9-Pin Lightning Connector).
I already searched the web, some say you have to jailbreak your iDevice, some say you need an authentication Chip, and some say it works flawlessly without an authentication chip, but I cant find any help online.
Thanks
You can't "send a constant voltage" out of the audio jack. There is a series capacitor there that filters out DC and very low frequency signal components.
To get proper help on this you can apply for the MFi program. I think it's free for educational purposes. It's under 100$ for sure. There is an NDA involved.
If you want to avoid the MFi you can always use BLE to communicate with periphery.
Or try to implement software FSK (or DTMF) modem on one side and a hardware one on the other side (using the audio lines).
Since it seems you simply want so see a binary (on/off) signal - you could generate a fixed pitch tone in the app (2kHz for example) and use a narrow-band filter on the hardware side (audio-jack connection).
Or maybe (to make sure your app is present on the other side a 2kHz tone would mean 0 and a 4kHz tone could stand for 1.
The authentication chip (and an MFi license)) you are talking about is needed when you try to communicate with the iOs device:
via BT (excluding BLE)
via USB (30 pin connector or lighting connector)
via UART (30 pin connector or lighting connector)

Realtime Voice chat between iOS devices in same network

I'm working in app where I need to implement a simple voice functionality between two iOS devices in same network.
My doubt is about how to get audio units from master device and send over wifi or bluetooth network directly to slave device in realtime.
Some things about network communication I have done, I can transfer any NSData between devices using TCP.
Is very important to not use GK framework, because I need to connect two clients without any notification. For example, when I use GK to connect two devices, the iOS display a alert with a connection request, I need to avoid this connection request.
Currently I can do this with video, is more simple than audio.
Any ideias about the implementation of this are welcome.
Thanks.
First of all, you need learn how to capture the audio using Audio Queue Services.
Then transmit the audio data it over wifi and bluetooth and play it at the other side.
The most obvious choice for you is to use bonjour.
GameKit framework is built on top of this. You dont have to build too much on top of this for your application though. Yours is a straightforward application of bonjour.
Please refer the code for chatty if needed. Incase you need some background theory, please refer to http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/.
I have used Audio Queue Services for the same sort of project.
For Networking I am using Bonjour and it has really solved the problem of transmitting text and video.
Did a lot of workarounds to make a voice chat in wifi using Audio Queue Services but have not succeeded. I will update once I find the solution other than this.

Resources