问题
I'm trying to connect a Raspberry Pi to an iPhone. I've come a long way but have been hitting the same brick wall for the last couple of days. Perhaps someone here could help me figure out what I'm missing. So far, I have:
- Created an iOS app that broadcasts as a peripheral
- Created an iOS app that acts as a Central
When testing on an iPhone 5 and iPhone 6, both devices can talk to each other.
Created a Java App using the Bluecove library that broadcasts as a peripheral on a Raspberry Pi.
- Created a Java App on a Linux Mint desktop that acts as a Central.
- When testing, both the Raspberry Pi and the Linux Mint machine can connect to each other.
I have a Bluetooth scanning app on my iPhone, and when I use the command line hciconfig hci0 leadv
on the Raspberry Pi, my iPhone app will recognize the broadcast.
But, the key part of all of this is when I run the Java app on the Raspberry Pi, neither the iPhone app that I wrote nor the Bluetooth scanning app can see it (even though the Linux Mint machine can).
It seems to me that I must be missing something basic. Or is there some sort of standard way of advertising that is only for iPhones? Any avenues of pursuit or advice would be greatly appreciated.
Technical Details
- Raspberry Pi 2 : Arm7, Linux kernerl 3.18, Raspbian RPi
- Bluetooth Adapter: Bluetooth 4.0 IOGear GBU521
- Java: jkd1.8.0_33, Bluecove library
- iOS: iPhone 6, iOS 8.1
- XCode: XCode 6.2 running on OSX 10.10 Yosemite, using Swift
All necessary libraries for the Raspberry Pi, including bluez, blueman, and bluetooth utilities are installed. Bluecove linux gpl libraries have been recompiled for ARM processor.
来源:https://stackoverflow.com/questions/29575006/advertising-bluetooth-raspberry-pi-peripheral-and-ios-central