Testing bluetooth from within iOS Simulator - ios

I have followed the instructions on Technical Note TN2295 to enable testing bluetooth within the iOS Simulator, which includes buying a separate Bluetooth 4 dongle. However, within the Simulator when I go to the iOS Bluetooth settings, I can turn bluetooth on, but it never discovers any other bluetooth device (yes, those devices are discoverable).
I have tried the following to narrow things down:
I can pair the MacBook with the bluetooth device (Pebble watch), but it is not clear if I am doing so with the in-built bluetooth, or the bluetooth dongle.
I can plug the dongle into a Windows PC that doesn't have bluetooth, and then pair it to the Pebble watch. This tells me the dongle is working.
Other questions on SO relate to not being able to turn bluetooth on in the Simulator, but I am getting past this point. Can anybody help with the next step?

According to this ReadMe from ExternalAcccessory (non-LE bluetooth) framework's demo, there's no support to connect to real accessories through simulator.
Also, the technical note you mentioned applies only to the CoreBluetooth framework (LE bluetooth).
So you can only connect to Low-energy (Bluetooth 4.0) devices from your iOS simulator.
As far as i know, Pebble watch is using both Bluetooth 2.1 and Bluetooth 4.0 though. In this case, you can try connecting to it using CoreBluetooth framework.

Related

Looking for an Xamarin.Forms bluetooth library for IOS that will pick up already paired devices to my iphone

I've got an existing PCL Xamarin forms app which works great. New requirement is to connect a Biocontrol Hhr3000 scanner via Bluetooth to the .ios version of my project. Workflow is, i first connect and pair the scanner to my iPhone over Bluetooth. I need a non LE (low energy) Bluetooth library which i can use to work with this. All i can find on the internet is all examples of LE Bluetooth so as it stands i cant get the iPhone to pick up the scanner via normal Bluetooth pairing.
Please point me in the right direction. I'm looking for an ios implementation thats simple like this one for android: https://acaliaro.wordpress.com/2017/02/07/connect-a-barcode-reader-to-a-xamarin-forms-app-via-bluetooth/
If the device is Mfi Certified by Apple, then you can use the External Accessory Framework to interact with the bluetooth device. If you can pair it, I have to assume it is Mfi Certified.

iOS 9 an 10, Bluetooth connection with Bluetooth 3 device

I have a request of implementing an iOS application which will be able to communicate with bluetooth device. The chip on that device has Bluetooth 3. The App will be privately distributed, so we don't need AppStore review and we can use anything - the only requirement is, no iPhone jailbreaking. The purpose of the application in reading diagnostic data from the device and sending a few commands to it - like turn left, turn right, setValue - nothing special (it is a special valve, which can be remotely controlled).
Now if a learned correctly the options with using Bluetooth on iOS are:
CoreBluetooth: library for Bluetooth 4.0 LE devices. It cannot be used, because Bluetooth chip is 3.0
ExternalAccessory: the device must be MFI certified, if this option is about to be used. Quite hard that hardware producer will go into the MFI certification, so at the moment not an options.
Bluetooth.framework: private framework which sounded like a good option (I have managed to make it run on iOS9 and iOS10) but the communication with devices on iOS10 does not work anymore. On iOS 9.3.5 on iPhone5 I made it work, but only iOS9 is not an option
BTStack: available via Cydia, but this packages if I have learned correctly require iPhone jailbreaking. Sadly again not an option
The situation clearly does not look good here. I have also read rumors, that it might be possible to use HID bluetooth profile for communication (anyone tried that). is there any C Bluetooth library which could be run on iOS device and work with iOS10?
Thanks for any iadeas.

Can the iOS App communicate with the devices of Bluetooth V2.0 through CoreBluetooth.framework?

I'm developing an App, which is required to communicate with the devices of Bluetooth V2.0, V3.0, or V4.0. The communication is completed through the serial service of Bluetooth. The App is for iPad. We develop it with the Xcode V7.3.1 on the MacBook OS X El Capitan V10.11.4. There are many materials about the Bluetooth development for iOS, but lots of them are for CoreBluetooth.framework. I indeed tried to connect a device in hands through CoreBluetooth.framework, but it does not work. I have some basic questions about the CoreBluetooth and the Bluetooth-communication development.
Suppose the iPad, on which our App runs, has the chip of Bluetooth V4.0 (Smart Ready), can the App establish the Bluetooth connection with the devices of Bluetooth V2.0 or V3.0 through CoreBluetooth.framework? and then communicate with them?
If the answer of the 1st question is "No!", are there any other APIs available for the iOS App to communicate with the Bluetooth devices? If there are, what are they? Of course, we suppose that the Bluetooth devices are the MFi Bluetooth devices.
iOS devices which support Bluetooth Low Energy (v4.0) can connect and accept connections from other BLE compatible devices.
However, in order to connect using older protocols, you would need to become a member of the MFI program.
Hope this helps

Test Bluetooth on iOS

I'd really like to start testing my iOS apps Bluetooth capabilities, but have run into a few problems:
I have a device made with a RN-42 module, but it's not the Apple version and I don't have the Apple authentication module at the moment (I ordered it, but shipping from China can take a while). I know what the messages will look like, but can't send them to my iPhone!
I can use the module with my Macbook, but not in the iOS simulator! Apple has taken down all of the documentation related to getting the iOS < 7.0 to use a separate bluetooth dongle, and my efforts have left my 6.1 simulator endlessly spinning on the bluetooth screen.
I'm new to using Bluetooth, so this may be a dumb question...
Is there a way of getting a bluetooth client device (I have a Mac, another iPhone, and an Android tab) to act as a server module that can send (and receive) Bluetooth data to my iPhone?
Client/Server as per developer.bluetooth.org
Thanks!
Not 100% sure your meaning of "server module". But in CoreBluetooth, you can use CBPeripheralManager to broadcast data to other iOS or Mac apps.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/Reference/CBPeripheralManager.html
If you're using standard Bluetooth (i.e. not Bluetooth LE or Bluetooth Smart or whatever you want to call it), you'll need to enroll in the MFI program or work with an MFI certified device (such as a Redpark cable) and use the External Accessories library provided by Apple. If you're using Bluetooth LE, you can use the Core Bluetooth library provided by Apple. If you fall into neither of those cases, sorry, you can't use Bluetooth on iOS.

Sending data from ios device to windows pc over an Bluetooth HID dongle

Aim
I want to pass data from iOS device to a PC using Bluetooth. The data should look as a keyboard input to the desktop. I have been doing some background research about the same and thought of using any HID keyboard emulator dongle. One can pass the data over using the Bluetooth and the dongle will show it as keyboard input to the PC.
Outcome of some related research:
Initially I tried to pair an ios device with a windows PC directly. I was unsuccessful. After some research and reading many questions, it turns out that an ios device can only be paired with a MFI( Made for ipad/ipod/iphone) compliant device/accessory, i.e those which have signed NDA with Apple and have joined the MFI program. It can also ofcourse be paired with a Mac.
Question:
With the release of Bluetooth 4.0, it seems that this restriction
can be overcome and it can be paired with any device compliant with
BLE 4.0. Is it so?
If one can use a Bluetooth to HID keyboard emulator dongle using BLE 4.0, is it possible to pair an iOS device which support BLE 4.0 with it and how?
Has anyone tried any particular HID keyboard emulator dongle supporting
BLE 4.0? If yes then any preferences. I came across Bluegiga USB Dongle but not sure if it will solve the purpose.
I would be thankful for your input.
Even with a Bluetooth 4.0-compliant device, communication via standard ("high energy") Bluetooth with an iOS device is still only allowed with MFi-compliant devices. Bluetooth Low Energy communication with iOS devices is the part that's now completely open and unrestricted by Apple. If you wish to send data to another computing device (Windows, Mac, Android, etc.), Bluetooth LE is what you're going to need (short of someone reverse-engineering the Bonjour over Bluetooth PAN connections).
As of iOS 6.0, iOS devices can make themselves look like Bluetooth LE peripherals, so desktop computers set up as Bluetooth LE central devices can connect to them. You could put together your own profile for communication, since you'd control the iOS and Windows sides of things, or you could make your iOS device mimic a standard keyboard, heart rate sensor, etc.
As far as compatible dongles, the answers to this question list several Bluetooth LE dongles that are known to work with Core Bluetooth on the Mac. The CSR ones seem to be the most frequently cited there and among other people I've talked to. I can't speak for Windows support, but I'd assume there would be driver support there, and I hear Windows 8.1 expands support for Bluetooth LE.
I do have the BLED112 (the Bluegiga USB dongle), and that shows up as a comm port when its drivers are installed. You might talk to that in a slightly different way than you would one of these other Bluetooth LE dongles. I know Bluegiga uses it on the Windows side to capture a little more data than I think you'd normally get from one of these other dongles. The other dongles might present a more universal interface for interacting with Bluetooth LE on the Windows side.

Resources