I have turned my mac book pro into iBeacon using the project https://github.com/mttrb/BeaconOSX but unable to list the Mac device in iPhone using PheripheralManager / CBCentralManager after scan.
Could you please help me understand why the Mac Book is not listed?
Edit: I am using MacBook Pro with 10.9.1 Mac OS, my bluetooth version listed under system preference is LMP Version is 0x6
Thanks.
I would try known working programs on both the iOS and OSX Mavericks sides. On the iOS side, try our free Locate for iBeacon app as #sage444 suggests. If that does not detect your transmitter, try our MacBeacon app. It is $10, but we guarantee it will work with a BLE capable Mavericks computer or we will give you a refund.
One final thought, make sure you have the proper ProximityUUID from the BeaconOSX program in your region in your iOS program, or you will not see the beacon.
I think you should run Mavericks and have fresh mac book with BLE support, then get proper app to iPhone - search in app store for iBeacon
Related
I am working on Bluetooth LE using CoreBluetooth on macOS. The app (master) will listen to a characteristic notification from Bluetooth device (slave). And I see that, the macOS only receives 2 packets per second, while the same processing code running on iOS receives about 30 packets per second! I did use other tools for logging and get the same result.
– On iOS, I use the LightBlue Explorer:
– On macOS, I use the Hardware IO tools for Xcode:
My testing devices are:
iOS: iPad Air running iOS 10.2.1
macOS: Macbook pro 2015 running
macOS 10.12.3
So, the bluetooth on macOS is much much slower than iOS, is that true?
Thank you,
Minh
Edited on April 7, 2017:
I think I know where the problem comes from. I tried with Apple Magic Mouse 2 and the bluetooth throughput is about 2KB/s. Then, I configured my slave device with HID services. Now, my MBP can pair with the device and the bluetooth throughput is high. So I think that the unpaired bluetooth signal was filtered by the macOS. Please check this link for the supported profiles.
I'm working on an idea which requires my Mac to send some data to my iOS device. I know CoreBluetooth framework is not there for Mac OS and only for iOS, so is there any way that I can get my Mac to pose a peripheral ?
I've done some Googling around - haven't got a straight answer :(
The CoreBluetooth.Framework is there for OSX. It's embedded inside of the IOBluetooth.framework. Download the sample mac apps from the Apple Dev Site. The one difference is that the OSX version of the CoreBluetooth.Framework does not contain the CBPeripheralManager class. You should just have your iOS device act as the peripheral and the Mac as the central. The iOS device can act as both at the same time and data can be sent both ways.
If you are comfortable with writing JavaScript, you can use bleno. It is a node.js module for implementing BLE (Bluetooth Low Energy) peripherals, and it support Mac OS X 10.9 or later, Linux and Windows.
You can find an example for implementing a Battery Service in peripheral mode in their github repository:
https://github.com/sandeepmistry/bleno/tree/master/examples/battery-service
My objective here is to create a connection between a device running iOS to a device running Mac OS X, via bluetooth. I know that I might be able to use CoreBluetooth for this but I don't understand how since I don't see a method to setup a service on the iOS device and broadcast it as an available service for a device running Mac OS X. In other words, I simply want to setup a connection to get the iOS device to send data to the Mac OS X device. Also, how would I go about to specify how to setup properties of the service. I've tried researching this stuff but most of the documentation makes little sense to me. The data transfer is small so bluetooth is good enough for the job. I'm trying to avoid Bonjour for this, and the Game center framework for P2P since OS X can't handle that (I think).
In iOS6 the iPhone 4S, 5 and New iPad can work both as Peripheral and as Central in Bluetooth Smart / Low Energy mode.
Try downloading "LightBlue" APP from APP Store. It let's you put the iPhone4S or 5 into Peripheral mode with random Services which you can then read from the Mac (if you have a newer one with BT Low Energy, I use the Retina for that but also the new iMac and Mac Mini got BT Low Energy).
You are correct that Core Bluetooth only give access to Bluetooth Low Energy which doesn't allow for the MFI chip.
Just ran across this today... and just wanted to give another answer to anyone needing to communicate to a non-Bluetooth LE device from your Mac.
The way to go is with IOBluetooth, and IOBluetoothUI.
They are both frameworks for the Mac, and they allow you to communicate with both old bluetooth, and Bluetooth LE 4.0, I believe. Also, I'm pretty positive you can act as a Central and Peripheral Device using this framework.
I'm using GKSession (part of Game Kit) to connect multiple iOS devices together (over bluetooth and/or wifi), send data, etc which all works fine and I'm happy with it.
I was thinking though, it would be cool to have a Mac OS X app that could connect to the iOS devices as well, share data and so on.
GKSession sadly doesn't seem to be part of Game Kit for Mac OS X (10.8+ obviously). I was wondering is anybody knows of a way to do this or has any ideas.
Thanks again.
GameKit for Mac OSX uses game center over wifi to connect Macs, iPod Touches, iPads, and iPhones to each other through apple's game center servers.
Consult the GameKit Framework reference for Mac OSX for more on how to implement the classes
I'm trying to figure out why my BTLE TI CC2540 keyfob is working with my iPad 3 but not with the iOS Simulator equipped with a new GBU521 IOGEAR adapter on Mountain Lion.
I've been able to successfully connect the iOS 5 Simulator Bluetooth in the general settings (it says on, now) to my BT adapter, and to be considered as 'powered on' in my proof of concept app. I'm using a GBU521 IOGEAR adapter, which only worked after upgrading to Mountain Lion (tried Lion with some hack modifying some .kext files-- don't do that. Upgrading to Mountain Lion was impossible until I reverted that .kext). I then ran the Apple suggested nvram setting, rebooted, and it was able to recognize the BT adapter.
I'm able to communicate with my iPad 3 successfully (registering the button pushes, accelerometer, etc), but when I try to run it on the simulator, it just doesn't discover the device. It's telling me the BT state is CBCentralManagerStatePoweredOn, but then when I tell it to discover peripherals, it comes up with nothing.
How can I establish Bluetooth LE communication between the iOS Simulator and an LE-enabled iOS device?
(modified from my answer in other iOS Simulator Bluetooth thread here: Bluetooth Dongle and iOS Simulator)
Throw away the IOGEAR and pick up a Cirago BTA8000.
I'm not sure why you were able to turn Bluetooth on in the iOS Simulator (possibly related to your kext editing, which I tried too), but I suspect it's not actually on. I bought the IOGEAR you mention, in addition to the Cirago BTA8000, and the MediaLink 4.0 adapter. Turns out that anything based on the Broadcom chip won't work despite my MacBook having the exact same one built in, which means the MediaLink and IOGEAR don't work. My Cirago shipment just arrived this morning, and the Bluetooth slider in the iOS Simulator flicks to "ON" in less than a second.
If you want to experiment, I'd love to hear if other non-Broadcom chips work too.
Does your keyfob didn't came with a dongle? I'm planning to buy one :S
Update: I've just found this(But probably you have arleady seen this, it explains why you are using a separate adapter): http://developer.apple.com/library/ios/#technotes/tn2295/_index.html
Also the reviews on amazon of your adapter doesn't look very good. have you tried it with antoher device? http://www.amazon.com/IOGEAR-Bluetooth-Micro-Adapter-GBU521/dp/B007GFX0PY/ref=sr_1_1?ie=UTF8&qid=1344560021&sr=8-1&keywords=GBU521+IOGEAR