简体   繁体   中英

CoreBluetooth peripheral using Arduino

If I want to connect my peripheral (Arduino) to my central (Iphone) do I have to structure the data in the arduino as a services and characteristics? I have seen some projects where an iphone is connected to an arduino but iphones scan for UUID's and services so I am not sure how they implemented the code on the arduino side?

As a BLE peripheral, your Arduino will advertise one or more services (with characteristics) that you specify.

You mention in a comment that you are using a RedBearLabs BLE shield. You can use the RedBearLab library (download from http://redbearlab.com/bleshield/ ) to set up your service in your Arduino sketch. For an example, see Getting Going With iOS and Arduino Using Bluetooth LE .

Every hardware provide have there own specification . Some provider will give you in built service and characteristic (readable and writable) . If it is BLE dongle then there may be some services implemented to in . Better you can use core ble application like LightBlue and try to explore services and characteristic in that dongle . Other wise you can contact their customer service , they will let you know about that dongle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM