I'm trying to communicate between an iOS app and Raspberry Pi using Bluetooth. The Raspberry Pi is using a Python script for this purpose.
I was originally using the PyBluez
library, however this does not support Bluetooth LE and thus can't be used with CoreBluetooth
on iOS.
My next solution was to use the private BluetoothManager
framework to communicate with the Pi, but this doesn't work on iOS 7.
I've researched a bit more and have seen suggestions for manually sending/receiving LE packets with PyBluez, but this seems incredibly complex and I really have no idea where to start.
So at the moment, I'm stuck. I need either:
Go to Settings->Bluetooth, and set Bluetooth to “on”. At the bottom of your screen, you'll see the text “Now Discoverable”. If the device you're pairing with isn't discoverable, the Pi isn't going to see it. In the case of the iPhone, it's only discoverable while this screen is active.
Just press the Bluetooth icon, and select your phone Bluetooth. 4. After pairing the Bluetooth, add the python script directly into the Raspbian by typing the nano command and copy/paste the source code, or you can directly copy the run.py file. 6.
You will be able to control the LED on/off on Raspberry Pi board from iPhone/iPad. You will learn how to: Set up the network connection between Raspberry Pi hardware and iPhone/iPad. Configure and run a Simulink model for Raspberry Pi hardware to receive UDP packets from iPhone/iPad.
One option is to buy a USB dongle with a BLE stack in it already.
We have used the Laird BL620-USB, flashed with BL600 firmware to operate as a BLE peripheral.
Having BLE stack in the dongle means it can be communicated with from the Raspberry Pi like a simple USB serial port, without using any linux Bluetooth stack.
BL600 includes the Nordic / Laird proprietary Virtual Serial Port Profile already, so you can achieve the simplicity similar to the classic Bluetooth SPP, even when communicating to an iOS device.
Laird will provide iOS and Android code to use the VSP on the mobile side.
Other BLE module makers probably do the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With