Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Communicating with a BlueSMiRF device from ios

I need to use an iPhone to send data to an arduino, which is hooked up to a BlueSMiRF device. Which iOS libraries should I use to send data over the bluetooth connection? I am new to using bluetooth

like image 984
DarkHorse Avatar asked Nov 30 '15 01:11

DarkHorse


1 Answers

I would recommend you use Apples own CoreBluetooth. If you need any help setting it up feel free to use my sample project in order to setup your own. You can find it Here

In order to use it simply change the following to the properties of your device. If you do not know what the device name, serviceUUID or characteristicUUID are you can use an app like LightBlue to find it. Let me know if you need any help.

//Change these settings let deviceName = "Bluno" let deviceUUID = NSUUID(UUIDString: "DBBD02C8-765D-4340-95DC-35A7C69F420A") let serviceUUID = "DFB0" let characteristicUUID = "DFB1" let message = "5"

As a note for anybody looking to do this in the future. This is not possible since BlueSMiRF is not BLE. You'd have to get special approval from apple which they seem to do more for people trying to produce headphones etc.

like image 151
FredLoh Avatar answered Nov 08 '22 03:11

FredLoh