I am new with BluetoothLE in iPhone. I want to send string via bluetooth from IOS device to other non IOS device. I refer the BTLETransfer Example from the sample code in the developer portal it shows how to transmit data between two iOS devices. I also refer this link How to tranfer the call from one bluetooth device to other bluetooth device from iPhone?
but did not find the solution.
Can any one help me?
By using BTLETransfer Example from the sample code we can send String for iOS devices but In case of other non OS devices you have to create own advertiser packet containing you string like mentioned in sample code and other non OS devices must be able to read that packet and Other OS device must support BTLE.
In my case other OS device is Android and Android device able to catch packets advertise by iOS device by using BTLETransfer Example sample.
you can check this sample code will help you lot :
https://github.com/KhaosT/CBPeripheralManager-Demo/tree/master/PeripheralModeTest/PeripheralModeTest
Note : Use same CBUUID for other OS devices.
Related
I would like to build an IPhone app that should check the identity of a BT device, by name or MAC.
If the device is not part of the MFI programme what profiles should the device support in order for an IPhone app to connect to it and validate its MAC or name ?
Cheers,
Ionut
I'm not sure you need to connect to something to get a MAC address or a name. My coworker's iphone seems to see all other bluetooth devices in our work area and displays the names, it just won't connect to them. And I'm sure it gets the MAC before it gets the name, but avoids displaying it to the user because names are a lot more friendly.
I do know that with android and blackberry, you actually use MAC addreses as your basic internal identifier, and only pull out the name when you want to identify your remote devices to the user.
If you really do need to make a connection from iOS to non MFi bluetooth radio, the advanced audio distribution profile (A2DP) would do what you want. There's a product out there I've seen that is a bluetooth controlled power board, and it used audio pulses being transmitted over A2DP to get around MFi requirements. Though you should reconsider this approach because it's problematic for a non audio device to advertise an audio profile. And this fake audio device will get seen by by a lot more than your application.
If you're happy to only work with iphone 4s and above, I've also heard rumours that bluetooth LE(4.0?) devices are not required to have the apple verification chip... but haven't really looked into it
I really searched on this topic for a while now. Especially when iOS 3 was the latest software version on the iPhone.
I wonder if there is a possibility to connect the iPhone to an external device via Bluetooth using the SDK and retrieve measured data?
Thanks for your help!
Greeting!
mary
If the Bluetooth device can masquerade as a Bluetooth keyboard, then it can send data to an iOS device encoded as keystrokes.
If the Bluetooth device is or can masquerade as a headset, then it might be able to send data encoded by an audio modulation scheme, such as FSK. A matching modem/codec will need to be running in the iOS app.
For the newest iOS devices (4S) you can use the new Bluetooth LE protocol to send data (older Bluetooth data communication protocols are not available to apps unless you are in Apple's NDA MFi program).
You have to look into the MFi Program by apple since you want your devices communicating. It provides support on using an external accessory with your iPhone, though you have to register/pay for it.
After searching on Google, I found that people say it's only possible to connect an iOS device with a non iOS device with the 'MFi program'. Is that true?
My project is mainly focused on sending and receiving information with the Arduino device via Bluetooth directly.
Is communication between iOS and non iOS devices without jailbreak possible? If yes, is there a reference?
(I viewed Stack Overflow question How can an iPhone access another non-iPhone device over wireless or Bluetooth?.)
As I stated in the above-linked question, general Bluetooth communication to external devices on non-jailbroken iOS devices is restricted to MFi-compliant Bluetooth hardware.
However, newer iOS devices (iPhone 4S, new iPad) are capable of Bluetooth 4.0 LE communication with external devices without the need for those devices to be MFi-compliant. This interaction is done through the new Core Bluetooth framework, which lets you send and receive arbitrary data to and from Bluetooth LE devices. This only works with those listed newer iOS devices, though.
Tim points out an interesting hack that you might be able to get away with in making your device appear like a Bluetooth HID keyboard. Devices like this barcode scanner have special modes to appear as HID devices to iOS. You might be able to pull something together based on this, but all data transfer will be one-way from your device, and it looks like this will require entering that data into text fields as if you had a keyboard connected.
Alasdair Alan's "iOS Sensor Apps with Arduino" is a good resource to look at. I've used Wifi with another microprocessor (mbed) but not sure about bluetooth. Alasdair is active on Twitter and he usually is kind enough to answer questions.
I need to know the Bluetooth MAC address of an iOS device, is there any way this data is accessible?
The purpose would be to identify when any user gets near that Bluetooth device.
In case this isn't possible in any way, what alternatives should I take into account?
No this is not possible with iOS public APIs
I was wondering if it was possible to make GameKit broadcast data so that an Android device can get the information. I plan on sending XML data, (a Plist, nothing complex) if this is possible. I don't need any confirmation on the iOS device, I just want to send the information.
In theory, Android should be able to receive the raw encoded bytes (or bits) and then the decoding them on Android, becomes my problem, but I can't imaging GameKit broadcasting information until it has a "peer" to send to.
Is it possible to send information from an iOS device to an Android device through bluetooth?
It is not possible,
GameKit requires iOS devices or MFi complaint devices, so it will not even connect with a standard Android or any other device unless it is MFi complaint and thus will not be able to send any data to it.
It IS possiple (by Bluetooth), but you have to be jailbroken and download a package (AirBlue Sharing) from bigboss repo (or *cough*a cracked version*cough*)that allows you to transfer files between that idevice and other non-apple devices via Bluetooth. Here is a link to an article about it:
JailBreak
There is also another similar package called celeste, but I haven't looked at it so don't ask me about it.