I need help making an app that works over bluetooth/wifi. I prefer using bluetooth since there won't be no lags.
Basically, what I want the app to do is stream audio from one device to another device. It has to be accurate.
Any help?(I am willing to pay for the man that helps me).
Thanks in advance!
All of the above is just the beginning. The API allows your iPhone to
stream data from the service once it is discovered and connected to,
etc. Just like the older Bluetooth spec, but simpler. In the spec’s
simplicity lies its power.
for details please have a look at LINK here.
Related
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.
I'd like to stream video from the camera on an iOS device to a receiver via wifi, in effect turning the device into a wireless webcam. Is there a way to build a small app that captures video input on an iOS app and sends it via an RTSP stream or similar?
As this is an ad hoc experiment, I'm not concerned about App Store guidelines and can jailbreak if necessary.
If I interpret your question correctly you more or less need to solve four problems:
Get the camera feed.
Convert/encode this to the right format.
Stream the data.
Prevent the phone from locking itself and going into deep sleep.
The first one is fairly simple and Apple has as always provided good documentation and examples -> API link. Make sure you check out their example in the end as you will get a CMSampleBufferRef data object back.
For the second and third part, you should check out the CFNetwork framework and specially CFFTPStream for streaming using FTP.
If your are only building this for yourself then you can always turn off the Auto-Lock feature in the settings. If you on the other hand would like to distribute this to other users you could use a trick to play a mute sound every 10 seconds. This is more or less how all the alarm clocks work in the App Store. Here's a tutorial. =)
I hope I helped a little bit at least.
Good luck and best regards!
I'm 70% of the way to doing the same thing. Here's how I did it:
Capture content from video input
Chop video into files for use in HTML Live Streaming.
Spin up a web server on the iPhone and make the video files available.
Connect to the IP address of the phone and viola! you've got live streaming video.
Last time I touched the code I was trying to debug my Live Streaming not working. I'll try and get my source code posted on github this weekend, if you'd like to take a look.
I'm developing a custom electronic device - think of it as a special kind of data logger, and I need to connect a computer to it to configure it and to extract the data.
I know I can do this without too much trouble on a PC, but I'd like to use an iOS device to do this.
Two questions:
Can I do this with a regular dock connector / USB cable? Will the EA framework let me do all the communicating?
Once I have extracted the data, what's the best way to get that out of the iPad? Make an email with it, save to a dropbox or something?
Thanks!
Afaik, you need to join the MFi program to make USB accessories for iPad/iPhone. That will give you all the technical resources needed.
As for data transfer there are only "opinions", I say the more options of sending, the better. Just don't force the user to choose more than once, then make it changeable in settings.
If you're doing very light communication, you might be able to get away with using the headphone jack.
Apps communicate to the headphone port through the various audio frameworks on iOS. AVFoundation is a high-level abstract framework to do various audio operations, but for fine-tuning the communication to a device over this interface, you will likely be using the C-language callback-based Audio Queue Services framework to do audio I/O.
This is nice because your device can be cross-platform (iOS, Android, Mac/PC) as long as you write the corresponding software, and because you don't need to go through Apple's MFi approval program. Think like the Square credit card scanner.
You will have to write the communication stack between the device and your iOS device but yes, you can.
there's very few docs about using the EA.framework. All the juicy parts are in the Mfi program but Apple is very strict about giving access to it.
So if you succeed, sharing a tuto will make you a EA hero ;)
About sharing your data, imho, email + CSV is a winning combo.
If you want to plug something into the dock connector, you want to have a look at https://developer.apple.com/programs/mfi/
I would like to develop an (personal) iphone app to use the iPhone as a controller for a small device such as a fan or for example a light bulb. Does anyone know if there is some kind of controllable iphone-dock to use for something like this. And are there some kind of methods to use with such a dock? For example the fan just needs a variable voltage for different rpm.
Thanks in advance,
EAAccessory requires that you become a Apple hardware partner, which is very expensive and not easy (this is why you only see large companies releasing hardware accessories for iOS devices).
There's a few ways around this. The easiest way is to have your app send OSC signals over WIFI to an OSC server. I've set this up before using TouchOSC on the iPhone and an Arduino connected to my desktop via USB. It's not hard at all, but it requires that you have an Arduino connected to a computer; it's not ideal.
Alternatively you can use audio output to send commands over the line output in the iPhone's dock connector, effectively turning the iPhone into a software modem.
Good luck and if you get this figured out, post the code on github. :-D
EAAccessory framework might not be what you want because of the requirement for you to have the license and hardware. You could better implement some sort of small webserver that runs an arduino or something similar. check this out for an example of that. on the arduino, you could just have a 5v relay to control the switch of whatever device and have the other pins of the relay connected to a hot (or cold depending on the relay state) standard 120v plug so you can plug anything into it. here is a good project for arduino controlled relay
for direct serial control, you could do something like this but it would require being jailbroken. i think for a personal app, doing it via wifi would be the best way unless you jailbreak and install the full bluetooth stack where you do not need EAAccessory stuff
Check out EAAccessory Framework. Used to handle external devices.
You could try using an ultrasound detector attached to your device, and playing an audio file at the appropriate frequency etc. on the iPhone.
I've just started working at a biomedical company and we need to communicate data from a device we are making to an iPhone. Obviously using the made for iPhone program would suffice, but for prototyping and for a simpler solution I was wondering if we could use an existing bluetooth audio transmitter, such as (http://www.buy.com/prod/bluetooth-a2dp-audio-hifi-dongle-adapter-transmitter-for-iphone-3g-ipod/q/loc/111/211900047.html?adid=17662) but instead of streaming audio, program it to stream data. I'm not so good with the hardware side, and wouldn't be designing the hardware on our end, only the software, so just wondering if with the current SDK, we can send data through an audio streaming device?
Any help is greatly appreciated :)
I've been looking into it, and found FSK a suitable solution.
I have a few links you could check out (most involve the Arduino, but you can ignore that).
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274970878 (blog post on arduino forums that is helpful)
http://translate.google.com/translate?hl=en&sl=ja&tl=en&u=http%3A%2F%2Fjp.blog.reinforce-lab.com%2F (japanese description of FSK from iPhone to Arduino)
http://code.google.com/p/arms22/downloads/list (software libraries)
http://sree.cc/electronics/arduino-as-an-fsk-modem
http://www.perceptdev.com/labs/iphonehacks (old iphone hack that creates a FSK modem with the iPhone)
http://www.progical.com/ (company that sells such dongles, but wouldn't reply to me)
http://eecs.umich.edu/%7Eprabal/projects/hijack/ (awesome project)
If you really want a realiable solution, look into serial data (jailbreaking might be required, but awesome for prototyping):
http://www.ohscope.com/2009/02/24/serial-port-on-iphone-with-minicom/
http://hcgilje.wordpress.com/2010/02/15/iphone-serial-communication/
UPDATE:
Thinking outside of the box, if you want a really reliable solution; I bought this recently.
http://redpark.com/c2db9.html