Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device-specific instructions for devices from Advantech and Moxa #820

Merged
merged 1 commit into from
Sep 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions doc/get_started/linux-iopac5542-c-c.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
platform: linux
device: iopac5542-c
language: c
---

Run a simple C sample on ioPAC5542-C device running linux
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)
- [Tips](#tips)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect ioPAC5542-C device running linux with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>
# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- [Prepare your development environment][setup-devbox-linux]
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]
- ioPAC5542-C device.
- the ethernet cable and the utility supports ssh

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device
- Please refer the document "ioPAC_RTU_Software_Users_Manual_v1.pdf". It can be downloaded from Moxa offical webwite http://www.moxa.com/

<a name="Build"></a>
# Step 3: Build and Run the sample

<a name="Load"></a>
## 3.1 Build SDK and sample

- Open a PuTTY session and connect to the device.

- Install the prerequisite packages for the Microsoft Azure IoT Device SDK for C by issuing the following commands from the command line on your board:

It's enough to use the toolchain Moxa provided. No need alternative packages

- Download the Microsoft Azure IoT Device SDK for C to the board by issuing the following command on the board::

git clone --recursive https://github.com/Azure/azure-iot-sdks.git

- Edit the following file using any text editor of your choice:

azure-iot-sdks/c/iothub_client/samples/iothub_client_sample_amqp/iothub_client_sample_amqp.c

- Find the following place holder for IoT connection string:

static const char* connectionString = "[device connection string]";

- Replace the above placeholder with device connection string you obtained in [Step 1](#Prerequisites) and save the changes.

- Build the SDK using following command.

sudo ./azure-iot-sdks/c/build_all/linux/build.sh

## 3.2 Send Device Events to IoT Hub:

- Run the sample by issuing following command:

~/azure-iot-sdks/c/cmake/iotsdk_linux/iothub_client/samples/iothub_client_sample_amqp/iothub_client_sample_amqp

- See [Manage IoT Hub][lnk-manage-iot-hub] to learn how to observe the messages IoT Hub receives from the application.

## 3.3 Receive messages from IoT Hub

- See [Manage IoT Hub][lnk-manage-iot-hub] to learn how to send cloud-to-device messages to the application.

<a name="tips"></a>
# Tips

- If you just want to build the serializer samples, run the following commands:

```
cd ./c/serializer/build/linux
make -f makefile.linux all
```

[setup-devbox-linux]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md
[lnk-setup-iot-hub]: ../../setup_iothub.md
[lnk-manage-iot-hub]: ../../manage_iot_hub.md
63 changes: 63 additions & 0 deletions doc/get_started/windows10-aimb-203-csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
platform: windows 10
device: aimb-203
language: csharp
---

Run a simple Csharp sample on AIMB-203 device running Windows 10
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect AIMB-203 device running Windows 10 with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>
# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- [Prepare your development environment][setup-devbox-windows]
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]
- AIMB-203 device.

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Follow the instructions from [device website](http://www.advantech.com/products/1-2jkkgr/aimb-203/mod_a46984f8-caa9-433a-a720-e1815a8c16a3).

<a name="Build"></a>
# Step 3: Build and Run the sample

- Download the [Azure IoT SDK](https://github.com/Azure/azure-iot-sdks) and the sample programs and save them to your local repository.
- Start a new instance of Visual Studio 2015.
- Open the **iothub_csharp_client.sln** solution in the `csharp\device` folder in your local copy of the repository.
- In Visual Studio, from Solution Explorer, navigate to the **samples** folder.
- In the **DeviceClientHttpSample** project, open the ***Program.cs*** file.
- Locate the following code in the file:

private const string DeviceConnectionString = "<replace>";

- Replace `<replace>` with the connection string for your device.
- In **Solution Explorer**, right-click the **DeviceClientHttpSample** project, click **Debug**, and then click **Start new instance** to build and run the sample. The console displays messages as the application sends device-to-cloud messages to IoT Hub.
- Use the **DeviceExplorer** utility to observe the messages IoT Hub receives from the **Device Client AMQP Sample** application.
- Refer "Monitor device-to-cloud events" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) to see the data your device is sending.
- Refer "Send cloud-to-device messages" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) for instructions on sending messages to device.

[setup-devbox-windows]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md
[lnk-setup-iot-hub]: ../../setup_iothub.md
[lnk-manage-iot-hub]: ../../manage_iot_hub.md
63 changes: 63 additions & 0 deletions doc/get_started/windows10-aimb-215-csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
platform: windows 10
device: aimb-215
language: csharp
---

Run a simple Csharp sample on AIMB-215 device running Windows 10
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect AIMB-215 device running Windows 10 with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>
# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- [Prepare your development environment][setup-devbox-windows]
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]
- AIMB-215 device.

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Follow the instructions from [device website](http://www.advantech.com/products/1-2jkkgr/aimb-215-b1/mod_4373ad48-1a60-440d-8785-4bac45ab03ea).

<a name="Build"></a>
# Step 3: Build and Run the sample

- Download the [Azure IoT SDK](https://github.com/Azure/azure-iot-sdks) and the sample programs and save them to your local repository.
- Start a new instance of Visual Studio 2015.
- Open the **iothub_csharp_client.sln** solution in the `csharp\device` folder in your local copy of the repository.
- In Visual Studio, from Solution Explorer, navigate to the **samples** folder.
- In the **DeviceClientHttpSample** project, open the ***Program.cs*** file.
- Locate the following code in the file:

private const string DeviceConnectionString = "<replace>";

- Replace `<replace>` with the connection string for your device.
- In **Solution Explorer**, right-click the **DeviceClientHttpSample** project, click **Debug**, and then click **Start new instance** to build and run the sample. The console displays messages as the application sends device-to-cloud messages to IoT Hub.
- Use the **DeviceExplorer** utility to observe the messages IoT Hub receives from the **Device Client AMQP Sample** application.
- Refer "Monitor device-to-cloud events" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) to see the data your device is sending.
- Refer "Send cloud-to-device messages" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) for instructions on sending messages to device.

[setup-devbox-windows]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md
[lnk-setup-iot-hub]: ../../setup_iothub.md
[lnk-manage-iot-hub]: ../../manage_iot_hub.md
62 changes: 62 additions & 0 deletions doc/get_started/windows10-aimb-501-csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
platform: windows 10
device: aimb-501
language: csharp
---
Run a simple Csharp sample on AIMB-501 device running Windows 10
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect AIMB-501 device running Windows 10 with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>
# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- [Prepare your development environment][setup-devbox-windows]
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]
- AIMB-501 device.

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Follow the instructions from [device website](http://www.advantech.com/products/1-2jkkgc/aimb-501/mod_3ed96dd6-792f-431d-b3e7-c524380b15d6).

<a name="Build"></a>
# Step 3: Build and Run the sample

- Download the [Azure IoT SDK](https://github.com/Azure/azure-iot-sdks) and the sample programs and save them to your local repository.
- Start a new instance of Visual Studio 2015.
- Open the **iothub_csharp_client.sln** solution in the `csharp\device` folder in your local copy of the repository.
- In Visual Studio, from Solution Explorer, navigate to the **samples** folder.
- In the **DeviceClientHttpSample** project, open the ***Program.cs*** file.
- Locate the following code in the file:

private const string DeviceConnectionString = "<replace>";

- Replace `<replace>` with the connection string for your device.
- In **Solution Explorer**, right-click the **DeviceClientHttpSample** project, click **Debug**, and then click **Start new instance** to build and run the sample. The console displays messages as the application sends device-to-cloud messages to IoT Hub.
- Use the **DeviceExplorer** utility to observe the messages IoT Hub receives from the **Device Client AMQP Sample** application.
- Refer "Monitor device-to-cloud events" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) to see the data your device is sending.
- Refer "Send cloud-to-device messages" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) for instructions on sending messages to device.

[setup-devbox-windows]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md
[lnk-setup-iot-hub]: ../../setup_iothub.md
[lnk-manage-iot-hub]: ../../manage_iot_hub.md
62 changes: 62 additions & 0 deletions doc/get_started/windows10-aimb-503-csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
platform: windows 10
device: aimb-503
language: csharp
---
Run a simple Csharp sample on AIMB-503 device running Windows 10
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect AIMB-503 device running Windows 10 with Azure IoT SDK. This multi-step process includes:
- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>
# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- [Prepare your development environment][setup-devbox-windows]
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]
- AIMB-503 device.

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Follow the instructions from [device website](http://www.advantech.com/products/1-2jkkgc/aimb-503/mod_5db22cce-25c7-488d-a5a4-f76a4061161b).

<a name="Build"></a>
# Step 3: Build and Run the sample

- Download the [Azure IoT SDK](https://github.com/Azure/azure-iot-sdks) and the sample programs and save them to your local repository.
- Start a new instance of Visual Studio 2015.
- Open the **iothub_csharp_client.sln** solution in the `csharp\device` folder in your local copy of the repository.
- In Visual Studio, from Solution Explorer, navigate to the **samples** folder.
- In the **DeviceClientHttpSample** project, open the ***Program.cs*** file.
- Locate the following code in the file:

private const string DeviceConnectionString = "<replace>";

- Replace `<replace>` with the connection string for your device.
- In **Solution Explorer**, right-click the **DeviceClientHttpSample** project, click **Debug**, and then click **Start new instance** to build and run the sample. The console displays messages as the application sends device-to-cloud messages to IoT Hub.
- Use the **DeviceExplorer** utility to observe the messages IoT Hub receives from the **Device Client AMQP Sample** application.
- Refer "Monitor device-to-cloud events" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) to see the data your device is sending.
- Refer "Send cloud-to-device messages" in [DeviceExplorer Usage document](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md) for instructions on sending messages to device.

[setup-devbox-windows]: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md
[lnk-setup-iot-hub]: ../../setup_iothub.md
[lnk-manage-iot-hub]: ../../manage_iot_hub.md
Loading