Quantcast
Channel: SCN : All Content - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3285

Try out HCP IoT Services with iOS Devices and Sensor Tags

$
0
0

What do you need to send data with an iOS device to the IoT Services?

 

 

Optional:

 


How to Send Data with the IoT Sensor App by itelligence AG?


Create a device model via IoT Services Cockpit

 

  1. Open the Internet of Things services Cockpit.
  2. Choose the Device Types tile.
  3. Create a new Device Type by clicking ( + ).
  4. Enter a name, e.g.: "iOSDevice", "TI CC2650" or "OLP 425" (depending on your available hardware).Screen Shot 2016-03-22 at 10.08.40.png
  5. Copy the displayed Device Type ID and Device Registration Token to your Clipboard.Screen Shot 2016-03-22 at 10.09.01.png
  6. Go back to the Internet of Things services Cockpit.
  7. Choose the Message Types tile.
  8. Create a new Message Type by clicking ( + ).
  9. Enter a name, e.g. "iOS Data".
  10. Select the Device Type that was previously created (here: "iOS Device").
  11. Change the Data Type for timestamp to long.
  12. Enter the following fields depending on the device you are targeting (all fields are optional):
    • iOS Device: timestamp (long) / accX (double) / accY (double) / accZ (double) / altitude (double) / locLat (double) / locLong (double) / pressure (double)
    • TI Sensor Tag: timestamp (long) / accX (double) / accY (double) / accZ (double) / rotX (double) / rotY (double) / locking (double) / pressure (double)
    • ublox OLP: timestamp (long) / sensorTemp (double) / sensorGyroX (double) / sensorGyroY (double) / sensorGyroZ (double)Screen Shot 2016-03-22 at 10.15.10.png
  13. Copy the displayed Message Type IDto your Clipboard.


You can now start sending data with a client using the created Device Type and Message Type.


Download and configure IoT Sensor App


  1. Install on your mobile device: IoTSensor on the App Store (iOS only)
  2. Configure the app with by calling the following custom URL on your device:
    • iot-create://&/accountName&/[Account ID]&/name&/[Connection Name]&/dataCenter&/[Data Center]&/deviceName&/[Device Name]&/deviceTypeID&/[Device Type ID]&/deviceReg&/[Device Registration Token]&/messageTypeID&/[Message Type ID]
    • Parameters:
      • [Account ID] => your account ID, e.g., "p1234567trail"
      • [Data Center] => your account data center, e.g., "hanatrial" / "hana" / "hana.us1" / "hana.us2" / "hana.ap1"
      • [Connection Name] => any name for a connection, e.g., "myConnection"
      • [Device Name] => any name for the device, e.g., "iPhone Michael" / "Sensor Tag 1"
      • [Device Type ID] => the Device Type ID you copied previously to your clipboard
      • [Device Registration Token] => the Device Registration Token you copied previously to your clipboard
      • [Message Type ID] => the Message Type ID you copied previously to your clipboard
    • Sample: iot-create://&/accountName&/p000000trial&/name&/myTrialConnection&/dataCenter&/hanatrial&/deviceName&/iPhoneMichael&/deviceTypeID&/f807b43597e44cf1fc4b&/deviceReg&/ce89c5cfe7fdb25b381eff51136b97&/messageTypeID&/9208dd4b8cc54bc1fb1b
  3. Once the custom URL is launched the app starts and account will be configured.
  4. Press on Register.
    Screen Shot 2016-03-22 at 10.34.59.png
  5. The "Device" gets registered and is ready to send Data. Press OK.
    Screen Shot 2016-03-22 at 10.35.28.png
  6. The "Connection" is now coloured red.
    Screen Shot 2016-03-22 at 10.52.44.png

 

Select Device and Send Data


  1. Press on Sensor.
    Screen Shot 2016-03-22 at 10.52.44.png
  2. Select a device (vor BLE device connection press refresh).
    Screen Shot 2016-03-22 at 10.54.08.png
  3. The device is not connect. Go back by pressing Select Source.
  4. Press Back. (Sensor and Connection are coloured red.)
  5. Press Record Button.
    Screen Shot 2016-03-22 at 10.54.23.png
  6. Data is sent according to sending interval (values that are not defined in the message type are ignored.)
    IMG_6740.png

 

How to write you own iOS App?


 

Additional Material?


 

 

Questions and Feedback?

 

We highly appreciate your questions or feedback. Please add your comments below.


Viewing all articles
Browse latest Browse all 3285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>