iOS Core Bluetooth Serial Port - ios

Given I have a bluetooth device which returns some serial data - how do I read it using CoreBluetooth?
There is no Characteristics or Services. Just some binary data in known (actually obd ii) format.

I think iOS blocks the access to the serial port over bluetooth.
You might need to buy extra hardware, use WiFi, or jailbreak it.
RS232 for iOS device

Try using roqyOBD if you manage to jailbreak your iPhone. I believe that it creates a TCP server that you can use FuzzyLuke's OBD2Kit and thus read the PID's that are sent from the OBD-II interface to the iPhone.
Let me know how it goes! I myself am tinkering OBD-II with iPhone and am learning just like you.

You probably have a Bluetooth 2.0 or 3.0 device which is not BTLE compliant. CoreBluetooth is an implementation of BTLE, hence you can't use said device on (non-jailbroken) iOS. There are a lot of BTLE compliant devices these days, so better get one of those, if you want to interface with iOS.

Related

UUID when using Bluetooth with IOS and Arduino

I'm attempting to send data between an iPad and Arduino via Bluetooth.
I read several online tutorials but I'm confused about the UUIDs used in them.
How do I find the UUIDs used by services and characteristics for the specific Bluetooth module connected to the Arduino?
Is there an AT command for this? Can they be set? Are they a constant?
This a pretty simple app and I have the Bluetooth communicating with the Arduino via the Terminal program on my Mac. The iOS app just needs to transmit and receive a few bytes of data. Do I really need all the code involved with Core Bluetooth or is there an easier way? What's the simplest, fastest way to implement 2 way communication of a few bytes via Bluetooth?
It appears that a HC-06 Bluetooth module in not BLE and is not compatable with iOS devices. I have succeeded connecting it to my Mac and have written a test app using ORSSerialPort

iOS - Bluetooth to serial device - Will it work?

I've been playing around with a bluetooth to serial device for a while now trying to get it to work with Android. I've got it communicating properly with Android and every thing seems to be working fine there.
Now I need to get it to work with iOS. It seems Apple is being all Apple like as always and only supporting certain interfaces. According to this document, only UART, USB, SPI, PCM, SPDIF, and SPP are supported with the device that I'm using. More information on the device can be found here.
I'm not really sure what any of those are other than USB and SPP, but I believe SPP doesn't work with iOS.
So my question is will this device work with iOS for bluetooth to serial communication?
Also, if this device won't work (which I'm assuming it won't), what are some good bluetooth to serial options? According to some of my research, I need an MFi certified device?
Upon further research it looks like Bluetooth LE is an option using devices like these with connectBlue Low Energy Serial Port Service:
http://www.u-blox.com/en/bluetooth-wifi-multiradio-modules/bluetooth-low-energy/ols425-olp425-modules.html
http://www.spezial.cz/pdf/RBS421-Product-Brief.pdf
I was able to get Bluetooth to serial working on iOS by using a Bluetooth Low Energy to serial device which uses the TruConnect service. I followed this guide to get everything working:
https://truconnect.ack.me/1.5/apps/communicating_via_ble#reading_from_a_truconnect_device_serial_interface
This is the device I ended up using:
https://serialio.com/product/bluetooth-serial-adapter/bluesnap-smart-bluetooth-40-rs232-adapter
We have been following this issue for some time and you are correct: the only way to get serial data from a device to your application is via an MFi certified device.
Previously answered here.

Does iOS Multipeer connectivity work with non-smartphone devices?

Our guys in the field use equipment that have wifi and Bluetooth connectivity. One of our users has been using a non-iPhone (I guess Android) to transfer files between his phone and the equipment through Bluetooth. However, in switching our users to iPhones to use other enterprise apps we have discovered what some of you already know: iOS's Bluetooth connectivity is severely limited (i.e. no SPP protocol).
The equipment also communicates via wifi, so I was wondering if it's possible to create an app using iOS Multipeer connectivity to solve the Bluetooth problem. All I am finding about this, though, doesn't show anything but phone-to-phone multipeer connections, and not phone-to-machine multipeer connections.
At this point I know nothing about how the field equipment works; that's something I'll have to learn if we decide to pursue this. But assuming that it is capable of discovering wifi networks, would it be able to see the iPhone's network without needing any special software?
Or would I be wasting my time trying to figure this out?
Thanks!
If the equipment is using Bluetooth SPP then unless it is MFi certified you can pretty much forget about connecting to it from iOS. Multipeer connectivity won't do it, that's for sure.
WiFi may be a possibility - you need to get the iPhone and the equipment on the same WiFi network - you can't do this via an app though - you would need to use the WiFi settings in iOS - You will need to learn more about the equipment to see if that is possible.
Short answer: no. Only iOS 7.0+ or MacOS Yosemite+
MultipeerConnectivity is a framework for iOS and Mac OS. To send data using it, you need both devices to have iOS or MacOS with MultipeerConnectivity. You don't have any network-related parameters like "I prefer using bluetooth or wi-fi", it was designed to "just work out of box with simple goal - discover and connect other devices with MultipeerConnectivity.
It means that you can't send data from iPhone with MC to Android or Symbian or old iPhone with iOS <7 etc.
Before iOS7 you could use GameKit, but the logic is the same: both peers need to use GameKit.
If your custom equipment does not have iOS - you need to use lower-level API, and your options include generic Bonjour (NSNetService on iOS device and something Bonjour-compatible on custom device) or CoreBluetooth (obviously bluetooth-only, no wi-fi peer-to-peer) on the lowest level, using sockets and so on.

How to send file from iPhone to mac over bluetooth

I have created universal device application to transfer any kind of files via bluetooth using GameKit Framework.
My question is how to create on Desktop Application with same process or there any Framework? That can communicate also on the device. Can i have any sample please or tips how to do it.
There is Core Bluetooth that used low energy protocol. But i don't know how?
Anyone please give some idea or anything that i can use it.
Thank you
The Bluetooth functionality of the GameKit framework is iOS-only (see GKSession), so you won’t be able to use that on a Mac.
The CoreBluetooth framework on the other hand is available on both Mac and iOS devices supporting Bluetooth LE, with the one difference that the CBPeripheralManager is not available on Mac, so you can’t advertise a service on Mac. However you can have your iOS device act as a peripheral and connect from the Mac acting as a central. Data transfer should still work both ways.
The BTLE Central Peripheral Transfer sample code should be a good starting point.

RS232 for iOS device

Is it possible to pair an iDevice to an rs232-bluetooth adapter for the purpose of sending serial commands like it would through an iDevice dock connector to rs232 (just like the Redpark Serial Cable does)? I ask because the company I work for is thinking of having an iDevice control one of our systems for demo. I know it doesn't relate to anything specific but any information would be greatly appreciated.
(See also iPhone to RS-232 via Bluetooth)
Bluetooth modules exists that support MFi (Made For iPhone) such as this one from connectBlue http://www.connectblue.com/products/bluetooth-products/bluetooth-modules/bluetooth-iphone-ios-accessory-module-obs414/ So the standard iPhone Bluetooth stack can make a SPP/RFCOMM connection to that device. That device could be added to a board along with RS232 level-conversion etc... And thus success.
I don't know whether someone sells such a device. The RS232 device that connectBlue sells seems not to support MFi, http://www.connectblue.com/products/bluetooth-products/bluetooth-devices/bluetooth-rugged-serial-port-adapter-rbs433/
Not really. The GameKit is one way to access bluetooth in iOS, but it is very limited in what that API allows you to do.
Depending on what you are building, you might be able to use the Apple Made for iPod program, but it's probably a long shot.
http://developer.apple.com/programs/mfi/
The best way to go is probably to design a device that connects via WiFi. I've gone this route, and it worked out well. If you must interface with something with an RS-232 interface, you might design an intermediary "adapter" that connects via WiFi to the iOS device, and via RS-232 to the other device.
If you don't have a need to distribute your app via the App Store, you can use Redpark's iOS serial cable: http://redpark.com/c2db9.html. (Disclaimer, I've never tried one, but according to someone at Redpark, jailbreaking is not required, you just can't distribute your app on the app store.)
You could design a small dongle that attaches via the dock connector, and broadcasts over bluetooth to your other device.
Or you could use WiFi instead of bluetooth... perhaps communicating over WiFi to something that's physically plugged into whatever you want to control.
I worked on a jailbroken app which used BTStack to communicate with a serial device. You might be able to use this for your demo.
If you're still looking to use bluetooth, this helped me out alot to facilitate the standard serial connection for prototyping without jailbreaking:
http://www.seeedstudio.com/depot/bleshield-based-on-bluegigas-ble112-module-p-1367.html
It works on the Bluetooth 4.0 enabled iOS devices and all of the schematic, boardfiles, firmware sources and the iOS App sources are available here:
https://github.com/michaelkroll/BLE-Shield

Resources