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

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.

Related

How to scan and connect to Bluetooth classic for iOS in Xamarin forms?

I'm trying to implement Bluetooth for my project. I was able to implement BLE but I have to go with Bluetooth classic because of some hardware issue. So for Bluetooth classic implementation I have gone through this post and I used source code from this post. But in that they are trying to connect to already paired device. But my requirement is to scan and connect to available Bluetooth classic device not BLE device. And also there should not be any pairing dialogue appearing while connecting. I even tried to check if there is any Bluetooth classic scanner application in app store for reference but I didn't find any. There are only BLE scanner application in app store. I have no clue how to proceed forward any suggestions?
iOS apps can only connect to MFi enabled Bluetooth classic devices. This is why you can't find any classic BL scanner apps. Unless your hardware contains an MFi chip from Apple you will not be able to use classic Bluetooth profiles, such as SPP, to communicate with it.

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.

Testing bluetooth from within iOS Simulator

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.

iOS - How to integrate bluetooth devices in my app

I'm trying to create some application that connects to blue tooth devices. A simple thing like a bluetooth barcode scanner that scans and sends a number to my app. I want to know which framework or something to be used in my app that can integrate the barcode scanner with my app. Is there any API or examples or tutorials etc that can help me implement such things?
Apple provides an API called the External Accessory framework, which can be used to interact with paired Bluetooth devices or devices connected through wired, Apple Connector at the base of the device.
However, to be able to use a paired device from within your application as you desire, you will have to a device that is designed to be compatible with iOS devices (meaning, the manufacturer must be a member of the Apple MFi program) and the device manufacturer must provide a protocol that you must add to your applications info.plist file.
If you have bought an off-the-shelf, Bluetooth barcode reader, there is a fair chance that you can not do what you are trying to do. If the device states that it can be integrated into custom iOS applications, consult the device manufacturer for further support regarding setting up your application to interact with their hardware.

Resources