{"id":1277,"date":"2015-09-27T02:17:42","date_gmt":"2015-09-26T17:17:42","guid":{"rendered":"https:\/\/hack.gpl.jp\/?p=1277"},"modified":"2015-09-27T02:17:42","modified_gmt":"2015-09-26T17:17:42","slug":"post-1277","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2015\/09\/27\/post-1277.html","title":{"rendered":"espeink \u306e\u6319\u52d5"},"content":{"rendered":"

\u3068\u308a\u3042\u3048\u305a\u3001\u5168\u4f53\u304c\u307e\u3060\u826f\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u3051\u308c\u3069\u3082\u3001E-ink \u3068\u30b9\u30c8\u30ea\u30fc\u30e0\u3059\u308b\u30b5\u30fc\u30d0\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u306f\u308f\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u30e1\u30e2\u3067\u3059\u3002<\/p>\n

 <\/p>\n

\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e user\/config.c \u4e2d\u306b\u3042\u308bURL \u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3066\u3001\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u3092\u30a2\u30c3\u30d7\u3002<\/p>\n

---- user\/config.c\n::\nvoid configLoad() {\n    int c;\n    spi_flash_read(ESP_PARAM_SEC*SPI_FLASH_SEC_SIZE, (uint32 *)&myConfig, sizeof(MyConfig));\n    c=calcChsum();\n    if (c!=myConfig.chsum) {\n        \/\/ os_strcpy(myConfig.url, "http:\/\/meuk.spritesserver.nl\/espbm.php");\n        os_strcpy(myConfig.url, "http:\/\/192.168.1.17:8266\/server\/espbm.php");\n    }\n}\n::<\/pre>\n

192.168.1.17:8266 \u306f\u3001\u3068\u308a\u3042\u3048\u305aosx \u3067\u8d77\u52d5\u3057\u3066\u3044\u308bapache \u3067\u3059\u3002<\/p>\n

\u672c\u6765\u3001mode \u304c 3 \u3067\u6700\u521d\u306b\u8d77\u52d5\u3059\u308b\u3068\u304d\u306f\u52d5\u4f5c\u3057\u3001\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u63a5\u7d9a\u3057\u305f\u3089 192.168.4.1 \u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u306f\u305a\u306a\u3093\u3060\u308d\u3046\u3051\u3069\u3082\u3001\u305d\u306e\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u5165\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u826f\u304f\u308f\u304b\u3089\u305a\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e2d\u3067\u3068\u308a\u3042\u3048\u305a\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u63a5\u7d9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u305f\u3002\u305d\u3057\u3066\u3001esp12 \u306b\u4ed6\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u305f\u306e\u304c\u4ee5\u4e0b\u3002<\/p>\n

\"WiFi_connection\" <\/p>\n

 <\/p>\n

Datasource \u306e URL \u306b\u3042\u308bespbm.php \u306f\u304a\u305d\u3089\u304f\u3001.bm \u3092\u30b9\u30c8\u30ea\u30fc\u30e0\u3059\u308b\u3082\u306e\u3060\u3068\u601d\u3046\u3051\u308c\u3069\u3082\u3001\u30b5\u30f3\u30d7\u30eb\u30d5\u30a1\u30a4\u30eb\u4e2d\u306b\u306f\u306a\u304f\u3001\u3068\u308a\u3042\u3048\u305a\u5909\u63db\u6e08\u307f\u306e.bm \u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3082\u306e\u3092\u7528\u610f\u3002\u5177\u4f53\u7684\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3002<\/p>\n

<?php\nfpassthru(fopen("..\/html\/apconnect.bm", "r"));\nexit(0);\n?><\/pre>\n

\u3053\u308c\u304c\u6b63\u3057\u3044\u306e\u304b\u3069\u3046\u304b\u306f\u3001\u4eca\u306e\u3068\u3053\u308d\u4e0d\u660e\u3067\u3059\u304c\u3001\u3053\u3046\u3057\u3066\u307f\u308b\u3068\u3001\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n

\u2605Reset \u5f8c\u306e UART \u306e\u5185\u5bb9\n::\n\n ets Jan  8 2013,rst cause:4, boot mode:(3,7)\n\nwdt reset\nload 0x40100000, len 31640, room 16 \ntail 8\nchksum 0x70\nload 0x3ffe8000, len 2572, room 0 \ntail 12\nchksum 0x06\nho 0 tail 12 room 4\nload 0x3ffe8a10, len 3528, room 12 \ntail 12\nchksum 0x7d\ncsum 0x7d\nrlDatasource http:\/\/192.168.1.17:8266\/server\/espbm.php\nmode : sta(18:fe:34:9b:99:a3)\nadd if0\nscandone\nreconnect\nscandone\nadd 0\naid 5\npm open phy_2,type:2 0 0\ncnt \n\nconnected with JunkHackAP, channel 6\ndhcp client start...\nNo heap available, failed to malloc 440\u2605\u30d2\u30fc\u30d7\u304c\u306a\u3044\u3068\u3055\u3002IP\u304c\u3068\u308c\u3066\u3044\u306a\u3044\nWdt. This takes too long. Go to sleep.\ndel if0\nusl\nsul 3 0\nrm mismatch\npm close 7 0 0\/17956334\ndeep sleep 60s\u2605\u4e00\u56de\u30b9\u30ea\u30fc\u30d7\u3059\u308b\u304c\u3001\n\n.\u00e1rl.l\u009c\u009e|.\u008cl\u00e0|....\u008c.l\u00ec.b|\u008e\u0082.\u00ec.\u0092r\u0092bl\u008eb\u008c\u00f2nn\u009elnn\u009c\u00e2\u00ec.b.p\u00ec\u008elrlrl.\u0082r\u00f2\u0092n\u00e0b\u00e2nbp.\u00fc\n\u260560\u79d2\u5f8c\u306b\u8d77\u304d\u305f\u6642\u306b\u306f\u52d5\u4f5c\u305b\u305a\u3002<\/pre>\n

\u3046\u30fc\u3093\u3001\u304a\u3057\u3044\u3068\u3053\u308d\u307e\u3067\u306f\u304d\u3066\u3044\u307e\u3059\u304c\u3001\u4f55\u304b\u304c\u304a\u304b\u3057\u3044\u3067\u3059\u306d\u3002<\/p>\n

\u30c6\u30b9\u30c8\u306e\u305f\u3081\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u306f\u4ee5\u4e0b\u306e\u5909\u66f4\u304c\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n

1) 3.1V \u4ee5\u4e0b\u3067\u3082\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u5b9a\u6570\u3092\u66f8\u304d\u63db\u3048<\/p>\n

2) \u521d\u56de mode(3) \u306e\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u5165\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e0d\u660e\u3067\u3001\u63a5\u7d9a\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3057\u3066\u3042\u308b<\/p>\n

 <\/p>\n

\u306a\u3093\u304b\u30012\u306e\u5909\u66f4\u304c\u307e\u305a\u305d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n

\u307e\u3041\u3001\u3067\u3082\u3053\u3053\u307e\u3067\u3067\u3001\u4ee5\u4e0b\u306e\u4e8b\u304c\u3001\u307c\u3084\u3063\u3068\u3067\u3059\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n

 <\/p>\n

\u25bc\u307e\u3068\u3081<\/p>\n

\u30fbESP12 \u304b\u3089\u8868\u793a\u3059\u308bURL\u306f\u6307\u5b9a\u3067\u304d\u3001\u305d\u3053\u304b\u3089\u753b\u50cf\u3092\u30b9\u30c8\u30ea\u30fc\u30e0\u3057\u3066\u8868\u793a\u3057\u3066\u3044\u308b\u3060\u308d\u3046\u3002<\/p>\n

\u30fbESP12 \u306b\u8868\u793a\u3055\u305b\u308b\u753b\u50cf\u306f\u3001\u5225\u30b5\u30fc\u30d0\u304b\u3089\u53d6\u5f97\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002<\/p>\n

\u30fb\u521d\u56de\u30d6\u30fc\u30c8\u304b\u3069\u3046\u304b\u3092\u5224\u5225\u3055\u305b\u308b\u3001RTC_MAGIC\u30b3\u30fc\u30c9\u90e8\u5206\u306f\u3046\u307e\u304f\u52d5\u4f5c\u3057\u3066\u3044\u308b<\/p>\n

\u30fb\u521d\u56de\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306e\u8a2d\u5b9a\u306b\u884c\u3063\u305f\u3068\u304d\u3001\u958b\u767a\u30dc\u30fc\u30c9\u306eLED \u306f\u5149\u308a\u3001\u753b\u50cf\u51fa\u529bpin \u3078\u306f\u30c7\u30fc\u30bf\u304c\u6d41\u308c\u3066\u3044\u308b\u3088\u3046\u3060\u3002<\/p>\n

 <\/p>\n

\u25bc\u4e0d\u660e\u306a\u3053\u3068<\/p>\n

\u30fb\u524d\u56de\u4e0d\u660e\u3060\u3063\u305f\u3053\u3068\u304c\u307e\u3060\u30af\u30ea\u30a2\u3055\u308c\u3066\u3044\u306a\u3044\u3002<\/p>\n

\n

\u30fb\u6700\u521d\u306e\u8d77\u52d5\u6642\u306b\u3001192.168.4.1 \u3067 mode(3) \u306e\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u8d77\u52d5\u3057\u3066\u304f\u308b\u304c\u3001\u3053\u306e\u3068\u304d\u306ewifi \u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u5165\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\uff1f <\/p>\n

\u30fbEPS12 \u304c\u8a2d\u5b9a\u3092\u7d42\u3048\u308c\u3070\u3001\u5b9a\u671f\u9593\u9694\u3067WEB \u30b5\u30fc\u30d0\u3092\u898b\u306b\u884c\u304f\u304c\u3001\u3053\u306e\u51e6\u7406\u306f\u3069\u3046\u3084\u308c\u3070\u3044\u3044\u306e\u304b\uff1f<\/p>\n<\/blockquote>\n

\u6700\u521d\u306e\u90e8\u5206\u306f\u3001ESP8266 \u306e\u6319\u52d5\u3092\u77e5\u308c\u3070\u89e3\u6c7a\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002wifi_set_opmode(3); \u304b\u3089\u30ea\u30b9\u30bf\u30fc\u30c8\u304c\u304b\u304b\u308b\u3068\u304d\u306e\u6319\u52d5\u3068\u3044\u3046\u304b\u3001\u30b5\u30f3\u30d7\u30eb\u306b\u3042\u308bWEB\u30b5\u30fc\u30d0\u306e\u6319\u52d5\u304c\u3069\u3046\u306a\u308b\u304b\u8abf\u67fb\u3059\u308b\u3053\u3068\u306b\u3002<\/p>\n

\u5f8c\u8005\u306f\u3001\u63a8\u6e2c\u306a\u306e\u3067\u306a\u3093\u3068\u3082\u8a00\u3048\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u4eca\u306e\u3068\u3053\u308d\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n

\u30fb800×600 \u306e\u753b\u50cf\u3092.bm \u306e\u5f62\u5f0f\u3067\u30b9\u30c8\u30ea\u30fc\u30e0\u3055\u305b\u308b\u3002png \u3092 bm \u306b\u5909\u63db\u3055\u305b\u308b\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e2d\u306emkimg.php \u304c\u305d\u308c\u3067\u3059\u3002\u51fa\u529b\u753b\u50cf\u306e\u90e8\u5206\u3092\u30b9\u30c8\u30ea\u30fc\u30e0\u3055\u305b\u308c\u3070\u3044\u3044\u304b\u3068\u3002\u3069\u3093\u306ahttp\u30d8\u30c3\u30c0\u30fc\u3092\u3064\u3051\u308c\u3070\u3044\u3044\u306e\u3067\u3059\u304b\u306d\uff1f<\/p>\n

<?php\n\n\/\/Small script to convert an 800x600 png into a .bm file the\n\/\/eink display can render from its internal espfs.\n\nfunction convertImage($file, $out) {\n    $im=imagecreatefrompng($file);\n    $of=fopen($out, "w");\n    for ($y=0; $y<600; $y++) {\n        for ($x=0; $x<800; $x+=8) {\n            $b=0;\n            for ($z=0; $z<8; $z++) {\n                $b<<=1;\n                $c=imagecolorat($im, $x+$z, $y);\n                if ((($c)&0xff)<0x80) $b|=1;\n            }\n            fprintf($of, "%c", $b);\n        }\n    }\n    imagedestroy($im);\n    fclose($of);\n}\n\nconvertImage("icons\/apconnect.png", "html\/apconnect.bm");\n\/\/convertImage("\u2605\u30bd\u30fc\u30b9\u753b\u50cf", "\u2605\u51fa\u529b\u753b\u50cf");\n\n?><\/pre>\n","protected":false},"excerpt":{"rendered":"

\u3068\u308a\u3042\u3048\u305a\u3001\u5168\u4f53\u304c\u307e\u3060\u826f\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u3051\u308c\u3069\u3082\u3001E-ink \u3068\u30b9\u30c8\u30ea\u30fc\u30e0\u3059\u308b\u30b5\u30fc\u30d0\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u306f\u308f\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u30e1\u30e2\u3067\u3059\u3002   \u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e user\/config.c \u4e2d\u306b\u3042\u308bURL \u3092\u4ee5\u4e0b\u306e\u3088 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[30,31,71],"tags":[],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"JunkHack","author_link":"https:\/\/hack.gpl.jp\/author\/junkhack\/"},"uagb_comment_info":0,"uagb_excerpt":"\u3068\u308a\u3042\u3048\u305a\u3001\u5168\u4f53\u304c\u307e\u3060\u826f\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u3051\u308c\u3069\u3082\u3001E-ink \u3068\u30b9\u30c8\u30ea\u30fc\u30e0\u3059\u308b\u30b5\u30fc\u30d0\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u306f\u308f\u304b\u3063…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1277"}],"collection":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/comments?post=1277"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1277\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=1277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=1277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=1277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}