Use external clickwheel hardware in iOs app - iphone

Intro: I have a Denon S-52 internet radio with an iPod/iPhone dock (the older 12V kind, so charging is not possible with newer devices but audio/control data is passed through). The radio has an external clickwheel-like control that worked beautifully with iPod nano/classic etc. Since the iPhone/iPod touch no longer have any clickwheel functionality, the signals from the Denon clickwheel no longer have any effect while playing (ie no seeking), but can navigate through some menus on iOS, and play/pause works. The few clickwheel apps I've tried obviously ignore the external signals.
Questions: How hard would it be for someone with no iOs programming experience (just C/C++/C#, plus an objective C tutorial from lynda.com) to develop a basic audio player app that would accept signals from the external Denon clickwheel to seek within an audio file (for my own use, at least at first)? I'm assuming this is possible because the signals are sometimes processed (as mentioned above), but I'd be happy to be proven wrong before I waste a lot of time and effort. I also assume a standard $99 iOS developer membership would be enough (since the device itself is already MFi)? Or perhaps an app that has this feature already exists?

How hard would it be for someone with no iOs programming experience (just C/C++/C#, plus an objective C tutorial from lynda.com) to develop a basic audio player app that would accept signals from the external Denon clickwheel to seek within an audio file (for my own use, at least at first)?
Nearly impossible. It's not just the challenge of figuring out how to access the dock connector and interpret the signals of interest. The real problem is that you want to use those signals to control music that's playing, and you're probably thinking of trying to control the iPod application rather than writing your own music player. Communicating between two apps is difficult at best, and probably not possible if the target app (iPod) doesn't provide a mechanism for external control. And the fact that you're new to the platform doesn't make any of this easier.
Your best hope is probably to file a bug with Apple requesting this feature and hope that they'll add it for you.

I was able to do this by jailbreaking my iOS device, which enabled me to access the serial port for iPod Access Protocol communication at /dev/tty.iap. Then I could incorporate something like the functions found in this iPhone Serial Port Tutorial (check archive.org if the link no longer works) to read the incoming signals and respond accordingly.
Update: An even better solution seems to be to write a tweak hooking into the iPodUI private framework and intercept the commands directly, and then message the Music player about what to do (see this post for more details).

Related

Make use of external hardware Music controls in my custom App

I'm looking for a way to detect the buttons pressed of external music control buttons, I have integrated in my car via bluetooth. Is it possible to make use of them in my App for something else that playing and stoping music?
Thanks a lot!
Markus
Those controls are probably talking to your iPhone using the remote control lingo, part of iAP (iPod Accessory Protocol). For documentation on this, you need to join Apple's MFi program, which is a separate account to a normal developer account and quite a bit more difficult to get approved for.
I'm not certain whether it's possible to get your application to talk to those devices, as you need to specifically enable application communication on the device itself and there's an authentication scheme you need to handle.

Sending data via bluetooth on Iphone (iOS 5.x)

I have been searching and searching, but found nothing yet. Is it really true that there isn't a straightforward way to establish a BT connection from my iPhone to another (3rd party) BT device, i.e. an audio receiver. I know this is possible through the OS (I own a Belkin BT music receiver that works this way - it appears in Settings and from there I can connect to it). Note that I am not interested in pairing to iOS-devices, but an iPhone and my custom made hardware.
I've managed to find Google's BTStack at code.google.com, iBlueNova, Celeste and more, which all must be run through Cydia or similar and also I stumbled upon Apple's MFI-program, which seems fairly complicated.
Does anyone have any experience with bluetooth and iOS, if so, how and where do I get started?
If one might be interested, the project I am developing involves a piece of hardware with a BT device attached on it. The app should be able to send simple commands via bluetooth (basically just ASCII characters) to the device, which will react depending on what it receives.
If you are developing accessories that need to connect to iOS devices and want to use your own communication mechanism then your only option is to join the Apple MFi program.

iOS app with hardware integration

I want to develop an iOS app that uses an external hardware plug-in, kind of like Square https://squareup.com. However I was unable to find any references in Apple's documentation. Can someone point me to the right direction?
If you want to use the iPod connector to connect to your hardware, the only option is the External Accessory framework. Be advised that you must be a registered accessory developer (more expensive than the standard developer license).
I believe Square uses the audio input (others may correct me), an ingenious hack that doesn't require use of the iPod connector. If your hardware can operate over (analog) audio in/out, that might be an option to consider.
This book might help you: Building iPhone OS Accessories: Use the iPhone Accessories API to Control and Monitor Devices
In order to develop hardware accessories, you must be a member of Apple's MFi program. Despite what the user above stated, it doesn't cost anything. But it does require a lot more work than becoming an app developer.
Accessories don't necessarily need to go through the MFi process if they are NOT over 30pin connector OR bluetooth (ie, the Square connecter goes through the headphone port, or any WiFi accessories).

What's needed to use the Apple Accessory Protocol?

I'm in the process of planning out a personal project that will be a media player and one of the things I would like to do is be able to dock my iPod touch (or any iPod or iPhone) and control it and play music off it like the speaker docs do that you can buy.
I found some information while searching around online for this but my question is can I make up a cable and use the serial protocol from any device or does Apple have this locked down so only certified/approved devices can communicate this way?
If you are looking to do this for yourself, I would recommend jailbreaking and the following resources on the web. These describe some methods of the Apple Accessory Protocol, and include some parts (at sparkfun) to execute. To get approved for the Apple method you need a corporation (or similar structure) and even legal counsel before you can get approved to even see the agreement you have to agree to in order to join.
http://nuxx.net/wiki/Apple_Accessory_Protocol
http://www.sparkfun.com/categories/101
There are even some great articles out there such as:
http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/awr8_asl45/awr8_asl45/index.html
Good luck!
EDIT:
Since this is a relatively popular post, keep in mind that you can now use Bluetooth 4.0 LE for serial communication without approval from Apple (other than AppStore approval).
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html
Only devices in the Made for iPod program which use Apple's proprietary authentication chip can communicate with the External Accessory framework on the iPhone or iPod touch. Such devices must also expose a protocol that iPhone applications can use.
It is a reasonably involved process to be approved as a Made for iPod vendor of products (similar to the App Store approval process, but for hardware), but it has become a lot easier than it used to be. With iPhone OS 3.0, Apple has opened up the program to many more third parties than just the usual large accessory providers.
In your case, I'd actually wait and use another vendor's iPhone-controllable stereo. Manufacturers are just starting to come out with hardware controllable via iPhone applications, so it's only a matter of time before one of the larger accessory providers creates something like what you want. If they expose a protocol for controlling the device, all you'll have to do is write your application to control the device via that protocol.

Is file transfer possible to iPhone 3.0 via Bluetooth or not?

Is it possible to transfer files of a bluetooth device, lets say a digital pen (e.g. Nokia or Logitech io2) to the iPhone? I am interested if I could do a native application that could somehow get that binary file sent by the digital pen and do something with it.
I am used to rfcomm and obex but I can only find inconclusive results when I search for that and the support in the iPhone SDK... Any ideas?
No, on a normal iPhone you are totally unable to do this.
However, it is totally capable and the functions most likely exist, but Apple doesn't want people using them so you aren't going to find anything in their documentation. An extremely large number of these functions exist. If you wrote an app containing one of these functions, Apple wouldn't let it into the app store.
They're extremely and reasonably concerned about safety. Bluetooth isn't exactly known for being secure in any form.
Look at the EAAccessory reference.
It seems like it should be possible to write a custom app that talks to any bluetooth device - you'd have to implement the file transfer protocol yourself, but now that apps are free to talk to bluetooth devices I don't think the API will prevent you from doing what you stated you want to do.
To my knowledge, no – the iPhone OS does currently not support filetransfers via Bluetooth. I think you will have to jailbreak the software to get enough access to the Bluetooth stack to pull it off.
It is very telling that even if you have Bluetooth turned on in your iPhone, it does not show up on other devices when searching for units to transfer files to. I suppose it's saying something in its Bluetooth signature that tells other devices that it doesn't receive files.