Internet of Things with Bluetooth - Developer Skill Sprint with David I
-
Upload
embarcadero-technologies -
Category
Technology
-
view
667 -
download
2
description
Transcript of Internet of Things with Bluetooth - Developer Skill Sprint with David I
![Page 1: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/1.jpg)
EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES
Internet of Thingswith Bluetooth
David Intersimone “David I”[email protected]
Blog: http://embt.co/SipFromTheFirehoseTwitter: @davidi99
Thursday, 18th of September, 2014
Download a free trial – NOW!http://embt.co/trialdownloads
![Page 2: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/2.jpg)
EMBARCADERO TECHNOLOGIES
This Skill Sprint Works with . . .
• Windows• OS X• Android• iOS• RAD Studio• Appmethod• Object Pascal• C++
• RAD Studio XE7 DocWiki– http://embt.co/latestdocwiki
• Appmethod September 2014 Release DocWiki– http://embt.co/AppmethodTopics
• Appmethod supports the FireMonkey framework on all 4 platforms while RAD Studio, Delphi and C++Builder also supports VCL on Windows. Contact sales with any questions!
![Page 3: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/3.jpg)
EMBARCADERO TECHNOLOGIES
How Skill Sprints Work. - Agenda
• READY– Tips tricks & short URLS
• SET– 20 minutes, 1 topic
• GO– Demo and discussion– Live Q&A
Download a free trial – NOW!http://embt.co/trialdownloads
![Page 4: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/4.jpg)
EMBARCADERO TECHNOLOGIES
Bluetooth support in XE7• RTL new unit: System.Bluetooth, System::Bluetooth• Multi-device API for Classic Bluetooth & Bluetooth LE• TBluetoothLE component• Classic Bluetooth classes– TBluetoothManager– TBluetoothAdapter– TBluetoothDevice
![Page 5: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/5.jpg)
EMBARCADERO TECHNOLOGIES
Bluetooth and App Tethering
• To implement Classic Bluetooth support in your VCL and FMX apps:– Obtain an instance of TBluetoothManager.– Discover remote devices and pair with them.– Connect to the paired devices.– Exchange data with the connected devices.
![Page 6: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/6.jpg)
EMBARCADERO TECHNOLOGIES
BluetoothLE and Devices• Use an instance of TBluetoothLEDevice to:
– Discover services that the remote device provides– Obtain detailed info including the characteristics
• Read and Write a characteristic value• Ask to be notified of changes in a Characteristic value
– SetCharacteristicNotification method– OnCharacteristicRead event handler
• Get the received signal strength indicator (RSSI)
• To obtain an instance of TBluetoothLEDevice– Use the StartDiscovery method or LastDiscoveredDevices property
![Page 7: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/7.jpg)
EMBARCADERO TECHNOLOGIES
TBluetoothLE Component• Discovery
– DiscoverDevices– DiscoverServices
• Working with devices and services– DiscoveredDevices– OnEndDiscoverDevices– OnEndDiscoverServices– SetCharacteristicNotification– OnCharacteristicRead, OnCharacteristicReadRequest– OnCharacteristicWrite, OnCharacteristicWriteRequest– OnReadRSSI
![Page 8: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/8.jpg)
EMBARCADERO TECHNOLOGIES
BluetoothLE GATT-based Profile Hierarchy• Generic Attribute Profile (GATT)
– Services are collections of characteristics and relationships to other services that encapsulate the behavior of part of a device
– https://developer.bluetooth.org/gatt/Pages/GATT-Specification-Documents.aspx
• If device is not GATT– Try using discovery– Contact the device manufacturer
![Page 9: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/9.jpg)
EMBARCADERO TECHNOLOGIES
DEMONSTRATIONSAPP TETHERING, HEART RATE
Bluetooth support in XE7
![Page 10: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/10.jpg)
EMBARCADERO TECHNOLOGIES
Bluetooth Resources
• Bluetooth samples that are included in XE7– C++
• C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\CPP\Mobile Samples\Device Sensors and Services\Bluetooth• C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\CPP\RTL\Tethering
– Object Pascal• C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\Mobile Samples\Device Sensors and Services\Bluetooth• C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\RTL\Tethering
• Bluetooth and App Tethering– http://docwiki.embarcadero.com/RADStudio/XE7/en/Using_Bluetooth– http://docwiki.embarcadero.com/RADStudio/XE7/en/Using_Classic_Bluetooth– http://docwiki.embarcadero.com/RADStudio/XE7/en/Using_App_Tethering
• Bluetooth.org– https://developer.bluetooth.org/– https://developer.bluetooth.org/TechnologyOverview/Pages/BLE.aspx– https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx– https://developer.bluetooth.org/gatt/Pages/GATT-Specification-Documents.aspx
Download a free trial – NOW!http://embt.co/trialdownloads
![Page 11: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/11.jpg)
EMBARCADERO TECHNOLOGIES
Next Time….• Aspect-oriented Programming using DSharp
with Nick Hodges• “Coding in Delphi” - https://leanpub.com/codingindelphi• Tuesday the 23rd of September
– 6AM San Francisco / 9AM New York / 2PM London / 3PM Milan– 11AM San Francisco / 2PM New York / 7PM London / 8PM Milan– 5PM San Francisco / Fri 9AM Tokyo / Fri 10AM Sydney
See the full schedule - http://embt.co/Sprints14 Download your free trial now! - http://embt.co/trialdownloads
![Page 12: Internet of Things with Bluetooth - Developer Skill Sprint with David I](https://reader033.fdocuments.in/reader033/viewer/2022061121/546db58eb4af9f7a2c8b5517/html5/thumbnails/12.jpg)
EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES
Q & A
Download your free trial now! http://embt.co/trialdownloads
@EmbarcaderoTech