This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

libMiMic(MiMic library for mbed)は、WebService機能を提供するSDKです。 mbedでWebAPIに対応したネットワークデバイスを簡単に作ることが出来ます。

libMiMicはMiMic projectで開発しています。MiMic projectについてはこちらをご覧ください。 http://nyatla.jp/mimic/wp/

構成

libMiMicはmbedRTOS上で動作し、ユーザアプリケーションにAPIを提供します。コアAPIはC言語で記述されていますが、使用頻度の高いものについてはmbed向けのC++APIが準備されています。

/media/uploads/nyatla/libmimic-sdk.png

※libMiMicはmbedの標準イーサネットドライバをしようしていません。

標準イーサネットドライバと同時に使用することはできません。

  • MiMicIP - IPv4スタックです。レテンシとメモリ消費量を抑えたuipベースのライブラリです。
  • ARP/ICMP/UDP/TCP - 基礎的なソケットAPIを提供します。APIは独自です。
  • HTTP/1.1 Server - HTTP/1.1に対応したサーバです。マルチセッション・Chunked・持続性接続に対応しています。
  • HTTP Modules - HTTP/1.1の機能モジュールです。以下のモジュールがあります。
    • ROM file provider - ROMに格納したファイルイメージを公開します。
    • File system provider - mbedファイルシステムを公開します。
    • Onchip configuration - プログラムフラッシュを利用して設定を保存します。
    • MiMicVM processor - RPCリクエスト(MiMicVM)を処理します。
    • FileUpload - ファイルアップロードを受け取ります。
    • URL decoder - HTTPリクエストを解析します。
    • UPnP handler -UPnPメッセージを処理します。
    • WebSocket - Websocketサーバです。
  • mDNS - マルチキャストDNSサービスです。
  • UPnP - UPnP/1.0の機能を提供します。UPnP handlerと協調して動作します。(現在はデバイス探索(SSDP)・デスクリプション(Description)のみ実装してあります。)
  • DHCP/APIPA - ゼロコンフィギュレーション用のモジュールです。
  • HTTP/1.1 Client
  • mbed C++ class library - mbed向けのC++CPIです。C言語のものより簡単です。

対応機種

  • mbed(mbed LPC1768)
  • LPCXpresso1769

プログラム

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

サンプル

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

チュートリアル

English

libMiMic(MiMic library for mbed) is SDK which provides Webservice functions. It can be created networking device easily using mbed.

See more MiMic information, See MiMic project website. http://nyatla.jp/mimic/wp/

Structure

libMiMic run on mbed RTOS and provides networking API to user application. This library has C++ class API for the mbed, and low-level C language API.

/media/uploads/nyatla/libmimic-sdk.png

For WebService general, it can be written in a simple C + + API.

libMiMic does not have the standard Ethernet driver of mbed. It is not possible that will be used with the standard Ethernet driver.

  • MiMicIP - IPv4 protocol stack. This is based uip which is reduced memory and latency.
  • ARP / ICMP / UDP / TCP - Those are provide basic IP protocols.
  • HTTP/1.1 Server - The Http server compatible HTTP/1.1. It supports multi-session, chunked transport, persistent connection.
  • HTTP Modules - There are addon-module for HTTP server. The following modules.
    • ROM file module - Publish the file images in ROM.
    • File system module - Publish thefiles in mbed file system.
    • Onchip configuration module - To save the network settings to the program flash via REST.
    • MiMicVM module - To handle the (MiMicVM) RPC request.
    • FileUpload module - Accept a file via HTTP POST.
    • URL dedoce module - A versatility URL decoder.
    • UPnP handle module - To handle UPnP messages.
    • UPnP - This provides UPnP/1.0 device functions. It works together with UPnP handler.
    • Websocket - websocket (version13) server
  • mDNS Service - DNS-SD protocol server.
  • UPnP - This provides UPnP/1.0 device functions which works with UPnP handler. (You have been implemented (SSDP) ? description only (Description) device search now.) It is a module zero configuration for - DHCP / APIPA. mbed C + + class library - C of mbed for + + is the CPI. It is simple than that of the C language.
  • DHCP/APIPA - It support zero-cpnfigulation.
  • mbed C++ class library. Almost APIs for Web applications are available.
  • HTTP/1.1 Client

Supported target

  • mbed(mbed LPC1768)
  • LPCXpresso1769

Application

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

Sample

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

Tutorial

Changes

RevisionDateWhoCommit message
114:f6aef16d4e60 2016-06-04 nyatla include????????; ??????????? default tip
113:e40058804062 2015-09-15 nyatla ???????ARP????????????????; https://developer.mbed.org/users/nyatla/code/libMiMic/issues/4;
112:1853d747fcdf 2015-06-10 nyatla fix issue; https://developer.mbed.org/users/nyatla/code/libMiMic/issues/3
111:f525c6e5e27b 2015-03-16 nyatla ModLocalfilesystem; ; Add virtual directory option.
110:257739f9b31e 2015-03-15 nyatla 51d1c88c8a56d6295311cfd20aa197a9cd650b2d; ????; NetworkInterface???????
109:18f12ac01097 2014-11-19 nyatla new MiMicIP API;
108:8dae2a2682e7 2014-11-13 nyatla delete debug codes; update mdns announce
107:d4b14febb863 2014-11-12 nyatla update mdns
106:dc0d65dbde48 2014-11-11 nyatla update mDNS module.; Announce?dns_sd???
105:9ed3adccac22 2014-11-10 nyatla update version
104:4f4781ecdc79 2014-11-10 nyatla mDNS; AAAA????????; TTL???
103:853ddf4a1b81 2014-10-30 nyatla bugfix; mDNS
102:41a5e92e0a8e 2014-10-28 nyatla bugfix; AAAA/NSEC???????
101:5022828ace54 2014-10-27 nyatla mDNS????????????
100:8d45dab6dcf6 2014-10-26 nyatla bugfix; M-Search response
99:875f75e7e63e 2014-10-26 nyatla NetConfig?API??
98:6284ce9a0476 2014-10-25 nyatla bugfix; mDNS problem
97:6ca5900a2d68 2014-10-19 nyatla Bugfix LPC4088 driver; Bugfix mDNS TTL;
96:e6a0db86988e 2014-10-09 nyatla fix mdns problem; mbns?TTL????????????????????
95:423d65f8b5ad 2014-10-06 nyatla updare version
94:b5eabbb28ae0 2014-10-04 nyatla FRDM???????
93:6afc7c06037f 2014-10-02 nyatla ???????????K64????????????????????????
92:4f77028cce64 2014-10-01 nyatla ?????????????????; K64F??????????????; LPC?????????????????
91:db8279c869d3 2014-09-27 nyatla NyLPC_TTxBufferHeader???????????????????; ???????????; K64F???????????
90:d35c976570fc 2014-09-06 nyatla delete error.h
89:8b0a010f33a2 2014-08-19 nyatla RpcSerial?binary????????
88:89598b2097fa 2014-07-23 nyatla mbed1768???UPnP????????????; IP???????????????
87:814e89e853a2 2014-07-20 nyatla RpcPortIn/Out?unsignedInt?????; AnalogOut?????
86:a042fb18911b 2014-07-11 nyatla HTTP????????????1024+512???
85:416f8bbbdf54 2014-07-04 nyatla RPC???I2C/Slave/Memory/Serial???; ?????????????RPC????????;
84:a5f5973591d8 2014-07-04 nyatla libMiMic r382???;
83:d46aa580722a 2014-06-29 nyatla MiMicCore-r379??;
82:03c645af0bb1 2014-06-25 nyatla bugfix; hsgw?????WebSocket????????????????????????????????????;
81:e5e4f2264d24 2014-06-24 nyatla ???????????????JsonRPC??????????; LPC4088/LPC1768??????????;
80:b94c3dec9848 2014-06-24 nyatla LocalFileSystem2?NyFileSystems???
79:baa21f8763cf 2014-06-24 nyatla MiMic core r375???
78:8cdb8fc7eda8 2014-06-23 nyatla mbed??????rpc???????????
77:8651d3c19a55 2014-06-20 nyatla MiMicCore??363????; mbed/jsonrpc?????????
76:b375b3d750d8 2014-06-14 nyatla MiMic core r361???; JsonRPC????????
75:2a18df0ef111 2014-06-14 nyatla MiMicCore r360???; mbed???????
74:fc7f46e67229 2014-06-14 nyatla MiMic core 1.5.3; r293???
73:8c7dd6fd462e 2014-06-14 nyatla ModWebsocket?ModJsonRpc?????????
72:c118a7aa37a3 2014-06-13 nyatla mbedAPI???????
71:855020258513 2014-06-10 nyatla MiMic-core ?358???; modJsonRPC???????????;
70:2ed02b798004 2014-05-29 nyatla cMiMicEnv?LPC4088???; uip???????????????
69:8c5f220441f5 2014-05-29 nyatla r354????; LPC4088?????
68:f7def7eb5504 2014-05-22 nyatla MiMic-core ?344???;
67:0a24ad966876 2013-11-12 nyatla marge 66+65
66:ee7866efe5e6 2013-11-12 nyatla delete #pragma in .cpp; fix some warning.
65:38049208ea29 2013-11-03 nyatla fix memory leak Net::stop; maybe corrected.
64:258e84040262 2013-10-23 nyatla fix issue; http://mbed.org/users/nyatla/code/libMiMic/issues/1
63:157ee3202edb 2013-10-18 nyatla update core to t338; bugfix; 1.Ethernet driver setting, descripter setting; 2.TCP socket close sequence; 3.HTTP stream
62:8be8c5924c3e 2013-10-03 nyatla marge Rev61
61:0a6ad5ad7726 2013-10-03 nyatla bugfix; Http client
60:803de2088243 2013-10-03 nyatla fix bug under /mbed; 1.udp socket; ; add function; 1.add canread function to tcpsocket,udp socket
59:cb5c3184c59f 2013-10-02 nyatla update mbed API(TcpSocket)
58:03b89038b21a 2013-09-27 nyatla add classes; checked:modwebsocket; unchecked:tcpsocket,udpsocket,httpclient.;
57:bc4330dfa62f 2013-09-13 nyatla update mimic core r329;
56:d38b6ce8c63b 2013-08-10 nyatla sync MiMic core library r306; fix DHCP problem;
55:5f993fccc09c 2013-08-09 nyatla remove unused class