Adding REST-based Web Services to IoT Device for IO monitoring

wizwiki-w7500eco3dtop_edit

This project is to make a simple RESTful Web service library for IoT Devices. The library is written with C language code and on WIZwiki-W7500ECO platform board from WIZnet. With it, users can implement a RESTful Web service on IoT devices easily. Monitoring IoT devices can be done by RESTful API based on JSON, as well.

 

* Frozen JSON parser and generator for C/C++ included

* APIs for HTTP POST method will be added

* The post will be update continuously

 

I’ve also posted this at Instructables.

http://www.instructables.com/id/Adding-REST-based-Web-Services-to-IoT-Device-for-I/

 

 

Step 1: Parts

 

eco-net-400

wizwiki-w7500eco_detailpinout

 

WIZnet WIZwiki-W7500ECO Platform board

  • WIZwiki-W7500ECO is a compact platform board based on W7500, which is a SOC chip that integrates an ARM Cortex-M0, 128KB Flash memory and hardwired TCP/IP core.
  • W7500 is the best fit to IoT devices.

 

A computer for using KEIL uVision5 IDE

  • These library is developed and compiled with uVision5 IDE.

 

 

Step 2: Download, Build and RUN

Download the RESTful Web Server & I/O Control by REST API Project on GitHub repository

 

Build and Firmware write to target board: WIZwiki-W7500ECO

  1. Project Build
  2. Firmware Write
    • Writing firmware into WIZwiki-W7500ECO has three ways
      • Using the CMSIS-DAP (Drag and Drop)
      • Using the CMSIS-DAP (through KEIL uVision5)
      • Using the ISP (ISP, In-System Programming)
    • Please refer to WIZnet wiki site; How to write the firmware into WIZwiki-W7500P

 

 

Step 3: REST API Design

REST API Document is under construction.

For more details and new updates, please refer to my GitHub repository for this project.

https://github.com/hkjung/REST-web-server-WIZwiki-W7500eco-uVision5

 

 

[:id]: pre-defined 4-IO pins, ‘a’, ‘b’, ‘c’, ‘d’.

  • ‘a’ : P30 pin (digital input / digital output / analog input)
  • ‘b’ : P29 pin (digital input / digital output / analog input)
  • ‘c’ : P28 pin (digital input / digital output / analog input)
  • ‘d’ : P27 pin (digital input / digital output / analog input)

 

URI: HTTP GET method: Get the device info and IO status /

 

URI: HTTP POST method: Enable the assigned IO

 

URI: HTTP PUT method* : Set the IO status (digital output only) and IO configuration

*(in development)

 

URI: HTTP DELETE method: Disable the assigned IO

 

Step 4: Testing

Serial Debug messages

serial_printout

 

Connect your board to your network and REST API Testing with test tool. These library has been tested on Postman Builder. For more details about Postman, please refer to Postman Chrome webstore.

 

HTTP Get Method:

get_index-1

 

get_netinfo_

 

get_uptime

 

get_userio

 

get_userio_a_analog

 

get_userio_c_digital

 

get_userio_info

 

HTTP POST / DELETE Method:

delete_userio

 

post_userio_a

 

HTTP Errors:

error_conflict

 

error_method_not_allowed

 

error_notfound

 

Advertisements

Adding REST-based Web Services to IoT Device for IO monitoring”에 대한 1개의 생각

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Twitter 사진

Twitter의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Google+ photo

Google+의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

%s에 연결하는 중