I want to develop application like this :
http://itunes.apple.com/us/app/paypodd/id341546114?mt=8
I am going to develop one application for credit card reader but i have no idea for connect external device to iPhone. right now i am using ExternalAccessory Class for find connected device but i am not getting any event after connect any Accessory to my iPhone
if anyone has developed this kind of application please provide me the flow
i am really confused..
Thanks .!
Do you plan on producing your own credit card reader for the iPhone/iPod? If so, you will probably need to go through Apple's "Made For iPod" (MFi) program. See: http://developer.apple.com/programs/mfi/
If not, your options for connecting the reader to the iOS device are limited. You cannot connect generic USB or Bluetooth devices -- one of the few devices I'm aware of which gets around this is the Square reader, which is a custom hardware device which communicates over the audio jack. Setting this up likely involved a lot of custom audio engineering on Square's part; it is not an easy task, nor is it something that can be done with off-the-shelf parts.
If you have other plans for what type of reader to use, please add details to your question!
Related
I am looking to write application for iPhone which will be able to control radio and CD player in car. Radio and player have Bluetooth connection available.
I started this question in order to obtain all informations I need for this one one place. I have few questions, but if you find anything I didn't ask important for me to start developing this application, please, let me know.
I have read about AVRCP profile and Bluetooth device in car supports AVRCP 1.3, which is good enough for me, having in mind controls which can be performed in that protocol version.
I read a lot about people saying "Apple device can only interact with each other", "Apple device can't be connected via Bluetooth to non-Apple device", "MFi program is obligatory if you want to do that", "MFi is not needed", etc. My first question is:
1)Is it even possible to pair iPhone (4, 4S) with radio and CD player in car via Bluetooth and control radio stations and music with any iPhone version? If yes, what are the limitations for making this kind of successful Bluetooth connection?
There is also very few informations about roles in which iPhone can work. For AVRCP there are two kind of roles: controller and target role. By reading this paper: https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf I didn't find answer to my second question:
2) Can iPhone act as a controller and issue all available commands stated in AVRCP 1.3 to target device (radio and CD player)?
I would also like to know about available frameworks for this particular problem. I know there are several of them, but if anyone recognizes the right one for my problem, I'd like to know:
3) Which framework for interacting with target device should I use?
From developer point of view, I am also interested in available APIs for interacting with connected Bluetooth device. Since I am making my own application and assigning actions to buttons, inside of methods assigned to buttons I need to perform message sending to target device. So my next question is:
4) Does anyone know how if there's a way to send commands to target device (start/stop/pause/forward/backward, etc) as part of some API provided in XCode, or each message which I attend to send via Bluetooth to target device I need to make according to protocol documentation (make entire message (header, body, command part, etc) by myself)?
AVRCP was my thought for accomplishing this application. If I am wrong, please let me know.
Bluetooth has different profiles and when message is sent from one device, as far as I understand, profile itself handles message and interprets it and delivers to target device so target device can understand it. I do not understand how a message sent from iPhone to target Bluetooth device is handled from the moment I send it from my Objective-C (or C) code. That's the main doubt I have and it is related with question 4 - do I need to make raw messages in correct format in order to send AVRCP commands to device or I can use some API which will recognize those messages as AVRCP (or any other kind) and deliver it to target device?
This last question (if I suppose there is any kind of positive answer to all previous) concerns me the most from developer point of view. So, if anyone had maybe experience with this specific problem, I would appreciate any kind of answer or advice.
I am really looking forward to your answers. I hope that constructive and useful discussion will start on this topic and that lots of useful informations will be written.
Best regards.
You can do it using CoreBluetooth if your device (CD Player) is Bluetooth 4.0 LE compliant
Most likely you shall not be able to do it even if your car CD player has BLE 4.0.
With Core Bluetooth devices act as "Central" (client) or "Peripheral" (server), the peripheral "has data" and expose services with characteristics (variables). The central (client) reads data from the peripheral or subscribe for notifications.
Your only chance is to connect to the CD player as peripheral (server) and your iPhone being the central (client). In this case the CD player must expose services that allow you to control it. To be honest I do not know how this can be done, since the central (the iPhone) will read data and receive notifications from the peripheral, not vice versa.
Reversing roles, implementing iPhone as peripheral makes sense, but there is no predefined Bluetooth LE service for remote control, so your car CD player does not know what service to expect from you. It might work using HID service (Human Interface Device), used in general for keyboards and mouse, but according to this post the HID is forbidden by Apple on iOS.
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.
I want to create a one application for communication of card reader with iPhone via dock connector. but problem is there my card reader accessory is not a MFI registered. so i cant get any kind of notification when i connect or disconnect device so please can any one tell me how can i connect or detect Non MFI registered accessory tot iPhone
Thanks.
As you say in your comment, it sounds a little strange(but not impossible) that the reader has the 30-pin-dock interface if it is not "Made for iPhone".
However if you are interested take a look at these refs(only for jailbreak device):
iPhone Serial Port Tutorial and iPhone Serial Communication
Let me know if you want a little more detail, once you figure out what kind of interface you have.
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).
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.