{"id":5219,"date":"2017-09-29T16:19:34","date_gmt":"2017-09-29T07:19:34","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=5219"},"modified":"2025-03-12T11:26:29","modified_gmt":"2025-03-12T02:26:29","slug":"mongoose-os%e3%82%92esp32%e3%81%a7%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2017\/09\/29\/mongoose-os%e3%82%92esp32%e3%81%a7%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f\/","title":{"rendered":"Mongoose OS\u3092ESP32\u3067\u4f7f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p>ESP32\u958b\u767a\u30dc\u30fc\u30c9\u3092\u8cfc\u5165\u3057\u3001Mongoose OS\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\nESP32\u30b7\u30ea\u30fc\u30ba\u306f\u3001Wi-Fi\u3068Bluetooth\u3092\u5185\u8535\u3059\u308b\u4f4e\u30b3\u30b9\u30c8\u3001\u4f4e\u6d88\u8cbb\u96fb\u529b\u306aSoC\u306e\u30de\u30a4\u30af\u30ed\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3059\u3002<br \/>\nMongoose OS\u306f\u3001\u4f4e\u6d88\u8cbb\u96fb\u529b\u306a\u30de\u30a4\u30af\u30ed\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u7528\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eOS\u3067\u3059\u3002IoT\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u304c\u5145\u5b9f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>ESP32\u304a\u3088\u3073ESP32\u958b\u767a\u30dc\u30fc\u30c9\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u30d9\u30f3\u30c0\u30fc\u304c\u51fa\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u8cfc\u5165\u3057\u305f\u306e\u306f\u3001\u300cHiLetgo ESP32 ESP-32S NodeMCU\u958b\u767a\u30dc\u30fc\u30c9\u300d\u3068\u3044\u3046\u4e00\u756a\u5b89\u304b\u3063\u305f\u3082\u306e\u3002<br \/>\n\u4e2d\u56fd\u304b\u3089\u56fd\u969b\u66f8\u7559\u3067\u9001\u3089\u308c\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u5230\u7740\u3059\u308b\u306e\u306b\uff11\uff10\u65e5\u304b\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3061\u3083\u3093\u3068\u6280\u8853\u57fa\u6e96\u9069\u5408\u30de\u30fc\u30af\u3064\u3044\u3066\u307e\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<h2>Mongoose OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/mongoose-os.com\/docs\/quickstart\/setup.html\" rel=\"noopener\" target=\"_blank\">https:\/\/mongoose-os.com\/docs\/quickstart\/setup.html<\/a><\/p>\n<p>\u958b\u767a\u74b0\u5883\u306fMacOS\u3067\u3059\u3002<br \/>\n\u958b\u767a\u74b0\u5883\u306bmos\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ curl -fsSL https:\/\/mongoose-os.com\/downloads\/mos\/install.sh | \/bin\/bash\n$ ~\/.mos\/bin\/mos --help\n<\/code><\/pre>\n<p>USB-\u30b7\u30ea\u30a2\u30eb\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\">https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers<\/a><\/p>\n<p>\u6b21\u306bESP32\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u306b\u3001Mongoose OS\u306edefault\u306e\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<br \/>\nESP32\u958b\u767a\u30dc\u30fc\u30c9\u3068\u7aef\u672b\u3092USB\u3067\u63a5\u7d9a\u3057\u3001\u4ee5\u4e0b\u3092\u5b9f\u884c\u3059\u308b\u3068\u30d6\u30e9\u30a6\u30b6\u3067WEB UI IDE\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ ~\/.mos\/bin\/mos\n<\/code><\/pre>\n<p><a href=\"http:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2017\/09\/mongoose_os_device.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-5227\" src=\"http:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2017\/09\/mongoose_os_device-400x345.png\" alt=\"\" width=\"400\" height=\"345\" srcset=\"https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2017\/09\/mongoose_os_device-400x345.png 400w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2017\/09\/mongoose_os_device-602x519.png 602w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2017\/09\/mongoose_os_device.png 682w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>\u30b9\u30c6\u30c3\u30d7\uff11\u3067\u300c\/dev\/cu.SLAB_USBtoUART\u300d\u3092\u9078\u629e\u3057\u300cSelect\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002\u3082\u3057\u3001\u300c\/dev\/cu.SLAB_USBtoUART\u300d\u304c\u306a\u3044\u5834\u5408\u3001USB-\u30b7\u30ea\u30a2\u30eb\u30c9\u30e9\u30a4\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u307e\u305b\u3093\u3002<br \/>\n\u6b21\u306b\u3001\u300cSelect firmware, click Flash\u300d\u3067\u3001\u300cmos-esp32-1.17\u300d\u3092\u9078\u629e\u3057\u300cFlash\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u308f\u3051\u3067\u3059\u304c\u3001\u306a\u305c\u304b\u3069\u3046\u3057\u3066\u3082\u30d5\u30e9\u30c3\u30b7\u30e5\u66f8\u304d\u8fbc\u307f\u304c\u51fa\u6765\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u3088\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u304c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3060\u3068\u30d5\u30e9\u30c3\u30b7\u30e5\u66f8\u304d\u8fbc\u307f\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre><code>$ ~\/.mos\/bin\/mos flash mos-esp32-1.17 --port \/dev\/cu.SLAB_USBtoUART\n<\/code><\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u66f8\u304d\u8fbc\u307f\u5f8c\u3001\u518d\u5ea6WEB UI IDE\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001\u300cMongoose OS is installed on this device:\u300d\u3068\u8868\u793a\u3055\u308c\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3078\u9032\u3081\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u3057\u304b\u3057\u3053\u3053\u3067\u3001\u5225\u306e\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4eca\u307e\u3067\u3001Arduino IDE\uff08arduino-esp32\uff09\u3084ESP-IDF\u306eesptool.py\u3067\u30d5\u30e9\u30c3\u30b7\u30e5\u66f8\u304d\u8fbc\u307f\u304c\u51fa\u6765\u3066\u307e\u3057\u305f\u304c\u3001Mongoose OS\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u66f8\u304d\u8fbc\u307f\u5f8c\u3001\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n\u306a\u304a\u3001mos flash\u30b3\u30de\u30f3\u30c9\u3060\u3068\u305d\u306e\u5f8c\u3082\u3001\u6642\u3005\u5931\u6557\u3057\u307e\u3059\u304c\u66f8\u304d\u8fbc\u307f\u3067\u304d\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u30b9\u30c6\u30c3\u30d7\uff13\u3067WIFI\u306eSSID\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<h2>\u958b\u767a<\/h2>\n<p>WEB UI IDE\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u958b\u767a\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<ul>\n<li> mos init &#8211;arch esp32\u3000\u3000\u3000\/\/ \u30b9\u30b1\u30eb\u30c8\u30f3\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\n\u3042\u308b\u3044\u306f\u3001<a href=\"https:\/\/mongoose-os.com\/apps.html\" rel=\"noopener\" target=\"_blank\">\u3053\u3053<\/a>\u304b\u3089\u9069\u5f53\u306a\u3082\u306e\u3092git clone\n<\/li>\n<li> \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0<\/li>\n<li> mos build &#8211;arch esp32  &#8211;local\u3000\u3000\/\/ \u30d3\u30eb\u30c9<\/li>\n<li> mos flash\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\/\/ \u30d5\u30e9\u30c3\u30b7\u30e5\u66f8\u304d\u8fbc\u307f<\/li>\n<li> mos console\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \/\/ \u30ed\u30b0\u51fa\u529b<\/li>\n<\/ul>\n<h3>\u30d3\u30eb\u30c9<\/h3>\n<p>\u30af\u30e9\u30a6\u30c9\uff08http:\/\/mongoose.cloud\/\uff09\u307e\u305f\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30af\u30e9\u30a6\u30c9\u3067\u3059\u3002\u30ed\u30fc\u30ab\u30eb\u306e\u5834\u5408\u300c&#8211;local\u300d\u3092\u3064\u3051\u3066\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u30af\u30e9\u30a6\u30c9\u306e\u65b9\u304c\u901f\u3044\u3067\u3059\u3002\u30d3\u30eb\u30c9\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5168\u90e8\u3001\u3069\u3053\u304b\u306b\u9001\u3089\u308c\u3066\u3044\u308b\u3068\u601d\u3046\u3068\u5acc\u3067\u3059\u304c\u3002<br \/>\n\u30ed\u30fc\u30ab\u30eb\u306e\u30d3\u30eb\u30c9\u3067\u306f\u30c7\u30d0\u30a4\u30b9\u306e\u74b0\u5883\u4f9d\u5b58\u5438\u53ce\u306e\u305f\u3081Docker\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>mjs\u306b\u3064\u3044\u3066<\/h3>\n<p>Mongoose OS\u306f\u3001Javascript\uff08mjs\uff09\u307e\u305f\u306fC\/C++\u3067\u958b\u767a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>ESP32\u306fpartition tables\u304c\u3042\u308a\u3001\u30d5\u30e9\u30c3\u30b7\u30e5\u4e0a\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u914d\u7f6e\u3067\u304d\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<br \/>\nMongoose OS\u306f\u3001\u30d5\u30e9\u30c3\u30b7\u30e5\u4e0a\u306b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u6301\u3063\u3066\u3044\u3066\u3001<br \/>\nmjs\u306e\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4e0a\u306b\u66f4\u65b0\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u518d\u8d77\u52d5\u3059\u308b\u3060\u3051\u3067\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3082\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u66f4\u65b0\u3057\u306a\u304f\u3066\u3082\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f4\u65b0\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>AWS-IoT\u306e\u30c6\u30b9\u30c8<\/h2>\n<p>\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/mongoose-os.com\/blog\/secure-remote-device-management-with-mongoose-os-and-aws-iot-for-esp32-esp8266-ti-cc3200-stm32\/\" rel=\"noopener\" target=\"_blank\">https:\/\/mongoose-os.com\/blog\/secure-remote-device-management-with-mongoose-os-and-aws-iot-for-esp32-esp8266-ti-cc3200-stm32\/<\/a><\/p>\n<h3>\u8a2d\u5b9a<\/h3>\n<p>\u4e8b\u524d\u306bAWS CLI\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057IAM\u7b49\u306e\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre><code>$ mos aws-iot-setup --aws-iot-policy=mos-default\n<\/code><\/pre>\n<p>\u3053\u308c\u3060\u3051\u3067\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9375\u3092\u751f\u6210\u3057\u3001AWS\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30e2\u30ce(Thing)\u767b\u9332\u304a\u3088\u3073ESP32\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306eMQTT Settings\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h3>\u691c\u8a3c<\/h3>\n<p>WEB UI\u306e\u5834\u5408\u3001\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b<a href=\"https:\/\/github.com\/mongoose-os-apps\/default\" rel=\"noopener\" target=\"_blank\">default<\/a>\u30a2\u30d7\u30ea\u306einit.js\u306b\u3001\u65e2\u306b\u30c7\u30d0\u30a4\u30b9\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3057\u305f\u3089MQTT\u306epubllish\u3092\u884c\u3046\u30ed\u30b8\u30c3\u30af\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code><br \/>\n\/\/ Publish to MQTT topic on a button press. Button is wired to GPIO pin 0<br \/>\nGPIO.set_button_handler(button, GPIO.PULL_UP, GPIO.INT_EDGE_NEG, 200, function() {<br \/>\n  let message = getInfo();<br \/>\n  let ok = MQTT.pub(topic, message, 1);<br \/>\n  print('Published:', ok, topic, '->', message);<br \/>\n}, null);<br \/>\n<\/code><\/p>\n<p>AWS\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u3067AWS IoT\u3092\u958b\u304d\u3001<br \/>\n\u300c\u30c6\u30b9\u30c8\u300d\uff1e \u300c\u30c8\u30d4\u30c3\u30af\u3078\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6\u3059\u308b\u300d\u3067\u3001\u30c8\u30d4\u30c3\u30af\u3092\u5165\u529b\u3057\u3001\u300c\u30c8\u30d4\u30c3\u30af\u3078\u306e\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002\u3002<br \/>\n\u5165\u529b\u4f8b\u3000\/devices\/esp32_21B54C\/events\u3000\u3000\/\/ &#8216;\/devices\/&#8217; + Cfg.get(&#8216;device.id&#8217;) + &#8216;\/events&#8217;<\/p>\n<p>ESP32\u958b\u767a\u30dc\u30fc\u30c9\u306eIO0\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001AWS\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u3067\u4ee5\u4e0b\u306e\u69d8\u306a\u3082\u306e\u304c\u8868\u793a\u3055\u308c\u3001\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6\u51fa\u6765\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n<code><br \/>\n{<br \/>\n  \"free_ram\": 105960,<br \/>\n  \"total_ram\": 191920<br \/>\n}<br \/>\n<\/code><\/p>\n<h3>AWS IoT\u3067\u3067\u304d\u308b\u3053\u3068<\/h3>\n<p>AWS IoT\u3092\u901a\u3058\u3066\uff08mqtt\u3067\uff09\u3001\u30ea\u30e2\u30fc\u30c8\u8d8a\u3057\u306b\u30c7\u30d0\u30a4\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u30fb\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u4f5c\u6210<\/p>\n<pre><code>$ alias mos1=\"mos --cert-file $(mos config-get mqtt.ssl_cert) --key-file $(mos config-get mqtt.ssl_key) --port mqtts:\/\/$(mos config-get mqtt.server)\/$(mos config-get device.id)\"\n<\/code><\/pre>\n<pre><code>$ mos1 ls -l\u3000\u3000\u3000\u3000\u3000\u3000\u3000\/\/ \u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\n$ mos1 call Sys.GetInfo\u3000\/\/ RPC\u547c\u3073\u51fa\u3057      \u30b7\u30b9\u30c6\u30e0\u60c5\u5831\u8868\u793a  \n$ mos1 call Sys.Reboot\u3000\/\/ RPC\u547c\u3073\u51fa\u3057\u3000\u518d\u8d77\u52d5\n<\/code><\/pre>\n<p>\u5b9f\u306f<a href=\"https:\/\/github.com\/mongoose-os-apps\/default\" rel=\"noopener\" target=\"_blank\">default<\/a>\u30a2\u30d7\u30ea\u3060\u3068\u3001http\u304cenabled\u306b\u306a\u3063\u3066\u3044\u3066\u3001AWS IoT\u4ee5\u5916\u306bhttp\u3001websocket\u3067\u3082\u30c7\u30d0\u30a4\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u30fb\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>$ mos --port http:\/\/192.168.17.142\/rpc ls\n$ mos --port http:\/\/192.168.17.142\/rpc call Sys.GetInfo\n$ mos --port ws:\/\/192.168.17.142\/rpc call Sys.GetInfo\n<\/code><\/pre>\n<h2>\u30e9\u30a4\u30d6\u30e9\u30ea\u304a\u3088\u3073\u8a2d\u5b9a\u306b\u3064\u3044\u3066<\/h2>\n<p>mos.yml\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u304a\u3088\u3073\u8a2d\u5b9a\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/mongoose-os-apps\/default\" rel=\"noopener\" target=\"_blank\">default<\/a>\u30a2\u30d7\u30ea\u3067\u3001http\u304cenabled\u306b\u306a\u3063\u3066\u308b\u306e\u306f\u3001<a href=\"https:\/\/github.com\/mongoose-os-apps\/default\" rel=\"noopener\" target=\"_blank\">default<\/a>\u30a2\u30d7\u30ea\u306f\u30e9\u30a4\u30d6\u30e9\u30ea<a href=\"https:\/\/github.com\/mongoose-os-libs\/js-demo-bundle\" rel=\"noopener\" target=\"_blank\">js-demo-bundle<\/a>\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u3066\u3001<a href=\"https:\/\/github.com\/mongoose-os-libs\/js-demo-bundle\" rel=\"noopener\" target=\"_blank\">js-demo-bundle<\/a>\u306f\u3001<a href=\"https:\/\/github.com\/mongoose-os-libs\/http-server\" rel=\"noopener\" target=\"_blank\">http-server<\/a>\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<br \/>\nhttp-server\u306emos.yml\u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<code><br \/>\nconfig_schema:<br \/>\n- [\"http.enable\", \"b\", true, {title: \"Enable HTTP Server\"}]<br \/>\n<\/code><\/p>\n<h2>RPC<\/h2>\n<p>Mongoose OS\u306fRPC\uff08remote procedure call\uff09\u304c\u5f37\u529b\u3067\u3059\u3002<\/p>\n<p>\u30b7\u30a7\u30eb\u4e0a\u3067mos\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308b\u5834\u5408\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ mos1 call Sys.Reboot\n<\/code><\/pre>\n<p>OTA\uff08Over The Air updates\uff09\u3067\u3001\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u66f8\u304d\u63db\u3048\u304c\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u307e\u305fI2C\u3084GPIO\u3082RPC\u3067\u64cd\u4f5c\u3067\u304d\u308b\u306e\u3067\u3001\u30c7\u30d0\u30a4\u30b9\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7f6e\u304f\u306e\u3067\u306f\u306a\u304f\u3001\u30ea\u30e2\u30fc\u30c8\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7f6e\u3044\u3066\uff08\u305f\u3068\u3048\u3070AWS Lambda\uff09\u3001\u30c7\u30d0\u30a4\u30b9\u64cd\u4f5c\u3059\u308b\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u30d0\u30c3\u30af\u30c9\u30a2\u7684\u306a\u3053\u3068\u304c\u7c21\u5358\u306b\u5b9f\u73fe\u53ef\u80fd\u306a\u6c17\u304c\u3057\u307e\u3059\u3002\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u3092\u3061\u3083\u3093\u3068\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7528\u610f\u3055\u308c\u3066\u308bRPC\u4e00\u89a7\u3067\u3059\u3002<\/p>\n<pre><code>$ mos call RPC.List\n[\n  \"Wifi.Scan\",\n  \"OTA.SetBootState\",\n  \"OTA.GetBootState\",\n  \"OTA.CreateSnapshot\",\n  \"OTA.Revert\",\n  \"OTA.Commit\",\n  \"OTA.Update\",\n  \"I2C.WriteRegW\",\n  \"I2C.WriteRegB\",\n  \"I2C.ReadRegW\",\n  \"I2C.ReadRegB\",\n  \"I2C.Write\",\n  \"I2C.Read\",\n  \"I2C.Scan\",\n  \"GPIO.RemoveIntHandler\",\n  \"GPIO.SetIntHandler\",\n  \"GPIO.Toggle\",\n  \"GPIO.Write\",\n  \"GPIO.Read\",\n  \"FS.Umount\",\n  \"FS.Mount\",\n  \"FS.Mkfs\",\n  \"FS.Remove\",\n  \"FS.Put\",\n  \"FS.Get\",\n  \"FS.ListExt\",\n  \"FS.List\",\n  \"Config.Save\",\n  \"Config.Set\",\n  \"Config.Get\",\n  \"Sys.SetDebug\",\n  \"Sys.GetInfo\",\n  \"Sys.Reboot\",\n  \"RPC.Ping\",\n  \"RPC.Describe\",\n  \"RPC.List\"\n]\n<\/code><\/pre>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219&#038;t=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219&#038;p&#091;images&#093;&#091;0&#093;=http%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-content%2Fuploads%2F2017%2F09%2Fmongoose_os_device-400x345.png&#038;p&#091;title&#093;=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219&#038;text=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219&#038;title=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Mongoose%20OS%E3%82%92ESP32%E3%81%A7%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5219\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>ESP32\u958b\u767a\u30dc\u30fc\u30c9\u3092\u8cfc\u5165\u3057\u3001Mongoose OS\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002 ESP32\u30b7\u30ea\u30fc\u30ba\u306f\u3001Wi-Fi\u3068Bluetooth\u3092\u5185\u8535\u3059\u308b\u4f4e\u30b3\u30b9\u30c8\u3001\u4f4e\u6d88\u8cbb\u96fb\u529b\u306aSoC\u306e\u30de\u30a4\u30af\u30ed\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3059\u3002 Mongoose OS\u306f\u3001\u4f4e [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[172,173],"tags":[177,176,174,175],"class_list":["post-5219","post","type-post","status-publish","format-standard","hentry","category-iot","category-mongoose-os","tag-aws-iot","tag-esp32","tag-iot","tag-mongoose-os"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=5219"}],"version-history":[{"count":30,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5219\/revisions"}],"predecessor-version":[{"id":5262,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5219\/revisions\/5262"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=5219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=5219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=5219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}