plgd

  • Docs
  • News
  • Community
  • Try LIVE

What's on this Page

  • Requirements
  • Setting up the Raspberry Pi
    • Enable SSH via the Desktop
    • Or enable SSH via raspi-config on the terminal
  • Connect to the Raspberry Pi via SSH
  • Install essential build tools
  • Install IoTivity Cloud Server example
QUICKSTART

Create device

Start your own device and host resources

This guide will walk you through the process of starting your secure OCF Device using IoTivity library on the Raspberry Pi.

Requirements

  • Raspberry Pi board with a microSD card with Raspberry Pi OS
  • Optional: HDMI monitor and cable, USB keyboard and mouse for the Pi
  • Ethernet or Wi-Fi connection between a DHCP-enabled network and the Pi
  • Personal computer(Linux/MacOS recommended) on the same network as the Pi

Setting up the Raspberry Pi

To set up your Raspberry Pi, please follow this step-by-step tutorial.

Enabling SSH is highly recommended as it simplifies access to the device and allows you to make changes quickly. More information available here.

Enable SSH via the Desktop

  1. Launch ‘Raspberry Pi Configuration’ from the ‘Preferences’ menu
  2. Navigate to the ‘Interfaces tab’
  3. Select ‘Enabled’ next to ‘SSH’
  4. Click ‘OK’

Or enable SSH via raspi-config on the terminal

  1. Enter ‘sudo raspi-config’ in a terminal window
  2. Select ‘Interfacing Options’
  3. Navigate to and select ‘SSH’
  4. Choose ‘Yes’
  5. Select ‘Ok’
  6. Choose ‘Finish’

Connect to the Raspberry Pi via SSH

More information how to access Raspberry Pi remotely can be found here.

ssh pi@{raspberryPiIpAddress}

Default login username is pi and password is raspberry if you didn’t change.

Install essential build tools

sudo apt-get update & apt-get install build-essential git curl openssl

Install IoTivity Cloud Server example

  1. Checkout IoTivity-Lite:

    # execute commands on the Raspberry Pi
    git clone https://github.com/iotivity/iotivity-lite.git --recursive
    cd iotivity-lite
    
  2. Build Cloud Server example in the port/linux folder:

    cd port/linux
    make CLOUD=1 SECURE=1 MNT=1 CREATE=1 OICRES_OBSERVABLE=1 OSCORE=0 cloud_server
    
  3. Run Cloud Server example in the port/linux folder:

    ./cloud_server
    

Now, the Cloud Server example running on your Raspberry Pi allows you to discover your device and connect it to the plgd hub.

See Also

  • Create & Delete device resources
  • Contribute
  • Discover & control device locally
  • Control device remotely
  • Create first plgd application
  • Introduction
    • What is plgd
    • Who we are
    • Compare plgd
    • FAQ
  • Quickstart
    • Contribute
    • Create device
    • Discover & control device locally
    • Control device remotely
    • Deploy your own plgd hub
    • Create first plgd application
  • Features
    • Audit Log
    • Pending command
    • Device Provisioning
    • Device Shadow
    • Disaster Recovery
    • JetStream
  • Architecture
    • Domain Overview
    • Component Overview
    • System Overview
  • Configuration
    • CoAP Gateway
    • gRPC Gateway
    • HTTP Gateway
    • Resource Aggregate
    • Resource Directory
    • Identity Store
    • Cloud2Cloud Gateway
    • Cloud2Cloud Connector
    • Certificate Authority
    • [MOCK] OAuth Server
  • Deployment
    • plgd on K8S
  • Device Library
  • Tutorials
    • External OAuth Server with bundle
    • Share devices within user groups
    • Branding dashboard
    • Working with gRPC Client
    • Create & Delete device resources
    • Advanced security
    • Dashboard
    • Testing
    • OCF Conformance Testing
  • Device Provisioning Service
    • Overview
    • Attestation Mechanisms
    • Client Library
“Create device” was last updated: November 24, 2021: fix cloud_server build (87dbaf9)
Improve this page
plgd Logo
  • File an Issue
  • Discuss Source Code
  • Cookie settings
 

© plgd.dev 2018–2022

  • Docs
  • News
  • Community
  • Try LIVE
  • Introduction
  • Quickstart
  • Features
  • Architecture
  • Configuration
  • Deployment
  • Device Library
  • Tutorials
  • Device Provisioning Service