Bluetooth iOS Windows - ios

I recently developed an application for a client, an app iOS, Android and windows, the mobile app acts as a controller and launches certain events on the windows application. The Windows application also shares data at random (not known to the mobile app) moments. The communication was done by TCP. And works great.
The client now wants it for bluetooth. Between Android and Windows, it's not been a problem and has been done, and works well. But iOS is sadly not the same story... The use of Bluetooth low energy seems to complicate things.
I've hunted high and low on google to find anything on communication between a .net application and a Swift application, to no avail. This surprises me that no one talks of a bluetooth communication between Windows and iOS.
My question is, very simply. Is it possible? I know very little about bluetooth and I've tried researching devices and all I find is a BeeWi device that's in our office, not my computer (I maybe need to launch something on computer first? The devices are paired)
My computer has a Bluetooth 4.0 dongle and the BLE emulator is present in the Device manager.
If this isn' possible, tell me know and put me out of my misery, otherwise give me hope!
Any additional advice is warmly welcome - Thank you all !
Beau Carrel

Windows has support for being a BLE client. Just Google it and you'll find many examples, such as https://developer.microsoft.com/en-us/windows/iot/Samples/BLEGatt2.
You need to set up iOS to be an advertising peripheral.

Related

Sending text from iPhone to Windows PC via bluetooth

How to send data from an iPhone app to Windows app (or service) in real-time? Ideally over Bluetooth.
Basically as I type on my iPhone app, I want that text to appear on my Windows App (with-in a second or less).
How can I go about achieving this? I'd imagine there is some center-peripheral setup I need to establish. What are the libraries to use on both sides? Have never worked with Bluetooth in the past, so kinda lost. I looked into Apple's Multi peer Connectivity but that looks like iOS-Mac specific.
I have no idea on the Windows side, on iOS you would use Core Bluetooth to configure the app as either a peripheral or a central.

General questions about Bluetooth

I have been fiddling with Bluetooth lately and I feel as if there is some elusive thing I am missing, anyways here are some of my questions. What I want is to have my Bluetooth enabled laptop running Windows, communicate with my iOS and later Android devices.
Is Bluetooth LE compatible with older Bluetooth technologies?
-My believe is that Bluetooth LE is the same as other Bluetooth versions
only that of course, as the name implies, it is low power. My confusion arises from the fact that on the iOS page they refer to some of the schemes as GAT servers , and what I am guessing is another protocol, ATT. Upon reading the article posted Here there is no mention of these two only L2CAP. As well as there is no mention of those in the Bluetooth API for windows Programming with Windows sockets The protocol that this article mentions is RFCOMM
-How is a connection between the two devices started?
I know that there are service ID's which can be published in an internal Service Description server according to the article previously referenced. However there is no concrete mentioning on the iOS bluetooth pages. They mention peripherals advertising bundles of data and the central device connecting to it. No mention of SDP, unsure if the windows docs do. And I' am bit confused about how the process flows, do the two devices connect first and then one device checks what services are available and the other one subscribes? Here by services I mean which applications are running, and by connection I mean as in establishing a connection from say (in iOS) Settings>Bluetooth and then starting the application on your phone, and then it is able to scan, or can the process of enabling Bluetooth and establishing a connection be done in the application itself. Same for windows, do I have to start the Bluetooth device by Settings>Bluetooth or can it be triggered within the Bluetooth enabled application?
-Is it pivotal to assign which device is the central and which is the peripheral?
Since at the end of the day they are able to both exchange data. In my case I want to have my computer running windows communicate with my iOS 7 device. Now as mentioned there are two roles that you could choose from in iOS: Peripheral and Central. It makes sense to me that the phone should be a peripheral since the main application will run on my computer, and I want my computer to enter the listening state before the device, and have the device connect afterwards. But it makes sense to have my computer advertise its services and then letting the iOS application choose the correct one. If someone could give me some pointers on what the best practices are and how to tackle this problem, I'd appreciate it.

Does iOS 8.3 now support Wifi debugging?

I updated iOS on my phone to 8.3 and I saw this message popup on first boot, but I have not seen it since:
I have been searching all day for information and I can't find a single reference to this message or to Xcode supporting wifi debug.
I am using a macbook pro 2009 model, and I have read that this is not compatible with the new continuity features (as well as airdrop etc). I am wondering if this is part of the wifi debug (and also if BTLE is involved at all). Of course it is all speculation since I cannot find any documentation about this.
Has anybody used wifi debug, or can point me to any documentation?
No, the feature was disabled as it causes serious security flows, for example when debugging you can fake location for any app, access confidential data like your number, udid etc. WiFi can be used now only to sync using iTunes.
It's restricted to USB only. You would need to write a bridge between USB and WiFi. You could in theory connect iPhone to Raspberry Pi, use open source crossplatform libMobileDevice. And mirror all USB requests from your XCode to this device USB.

Serial or HID (usb) Communication in iOS (iPhone/iPad)

I want to get data from glucose meter devices by connecting into iPhone or iPad devices. I have different vendors glucose meters some uses simple HID interface for communicate and other uses serial communication.
These are the two possible ways of communication:
USB to 30-Pin connector.
3.5 jack to 30-Pin Connector.
USB or 3.5 jack will be connected to glucose meter and 30 pin connector will be attached with iDevice.
After having hours of research I did not find much help on internet for iOS specific.
I do find ORSSerialPort but I think it is for OS X apps only.
There is RedPark serial Cable but that is for RS232 to 30-Pin communication and secondly that can be only used in internal projects. I want to sell my application on Apple Store.
Someone also was discussing about using IOKit framework. We can communicate with iDevie but that is private framework.
Someone help me with this issue or let me know if that is even possible in iOS application.
Do Apple have any consideration on this type of working?
An iOS device can talk to external devices by following means of communications only:
Wifi
Bluetooth
GPRS &
GSM
USB (Don't exactly know what it is called)
There is no possible way to have RS232 serial port communication with iOS device.
Now What are the options left then?
Get a communication convertor in between your external device & iOS device. It can be
Serial to ethernet adapter
serial to USB adapter etc.
Embedd a wifi/bluetooth module in the external device (If it is being manufactured by you/your firm)
Have something with USB cable & mfi .(Never worked on this, but have seen stuff working with this). By something I meant, register your external device under MFI license & implement USB between devices (Again lack of clarity about USB stuff). Menwhile, I would appreciate edits on my answer by people who might improve it with USB stuff.
Update:
I visited the site of your vendor "glooko". I could not find any clue about them having any libraries for developers. So according to my opinion, they have kept their library private. They don't want you to develop apps based on their communication protocol. If you still need to develop apps for them, contact them here & let them know about your zeal.. M sure they will give you their private code. Anyhow, you don't need to register for any MFI or anything now. What you need is just the code they are using for communication & about that, nobody other than them can help you. So, all the best .. :)
Update 2:
What I understood from your updated question is, you want to create an iOS application that works with various Glucose meters, from different vendors. In a way you can call it as "universal Glucose meter app"
The short and straight answer for this is .."You Can't" . But wait, apple is not responsible for this. Neither it is impossible.
Let me tell you why. When you want your application to talk with a hardware device, there must be a communication channel between you too. You are well aware of those two options available. now, if your app must run on iDevices, the communication channel cables must be registered for mfi. Here that is also not the issue.
What is the issue then?
Different vendons don't generally follow the same communication protocols between their hardware & softwares. What happens if a german commander commands to indian soldier. Obviously, nobody will understand.
So, to achieve your objective, the only way is, you have to include SDK provided by each supported vendors in your app. Let me know if you are not yet clear..:)
There is a device called Lightning Serial Cable, the link is following.Take a look at their SDK.
http://redpark.com/lightning-serial-cable-l2-db9v/
It seems work with your application. I'm also looking for the solution that iOS device can talk to another device via serial port. In PC world, all PC has USB ports, so there is large amount of USB to serial port devices and vendors, such as FTDI and Prolific. I don't know if similar situation happens in iOS world.
Unless you join the Made For iPhone program you can not directly connect anything to an iOS device unless you use Bluetooth or TCP/IP.

Bluetooth Communication between OSX and iOS

I'm working on an application that does does lots of iOS <--> OSX communication. For the most part I have this solved.
I'm using CocoaPort to do the communication. Over Wifi this worked nicely and was plenty fast.
I'm using Bonjour to find my server. This required publishing the service with a modded DNSSDObjects-style net service on iOS. Apparently services published over Bluetooth on OSX cannot be seen by iOS, but the other way round works nicely, except that you need to keep the devices paired and connected.
Now my question is, how can I improve the speed of the Bluetooth connection? I'm getting maybe 100kb/s max and that seems to just stop after about 1 minute even though the connection is still open.
I think I need to use the AMP/HS stuff in Bluetooth 3.0 to get a fast connection. My understanding is this creates an AdHoc wireless network between my devices (MBP retina and iPad3, so should be capable of a decent speed.)
According to Wiki, Bluetooth 4.0 includes the HS spec in Bluetooth 3.0 and according to Bluetooth Explorer, the iPad is 4.0 spec. Is there a way, maybe via IOBluetooth, to request a high speed connection?
According to an engineer # Apple, this is not currently feasible. The best you can do is Bluetooth Classic, which is probably the speed I'm getting.
If you want this feature, consider opening a feature request at bugreporter.apple.com.

Resources