DHJJ [Hatsune's Journal Japan] blog

Hatsune's Journal Japan blog

目次

Blog 利用状況

ニュース

最新ツイート

運営サイト

Hatsune's Journal Japan
DHJJ

著作など

資格など

OCP
MCP

書庫

日記カテゴリ

わんくま同盟

[Hardware]ESP-WROOM-02をWebサーバー化する。

image

 

こんな感じに接続してシリアルモニタを使って手動で各種コマンドを入力してESP-WROOM-02をWebサーバーとして稼働させる方法を検証します。

リセット

AT+RST


OK

ets Jan  8 2013,rst cause:1, boot mode:(3,0)

load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

2nd boot version : 1.4(b1)
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

r?テ9?
ready

WiFiステーションモード

AT+CWMODE=1


OK

WiFiアクセスポイントに接続(WPA)

AT+CWJAP="GL06P-F801137BF999","password"

WIFI CONNECTED
WIFI GOT IP

OK

IP表示

AT+CIFSR

+CIFSR:STAIP,"192.168.13.102"
+CIFSR:STAMAC,"18:fe:34:a4:25:5b"

OK

マルチコネクションモードを設定します

AT+CIPMUX=1


OK

サーバー起動(80番ポート使用)

AT+CIPSERVER=1,80


OK

ここでブラウザからアクセスします。

ブラウザからアクセスされるとTCP/IP接続が行われhttpプロトコルに基づいたヘッダが送られてきます。

0,CONNECT

+IPD,0,316:GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: ja
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
Accept-Encoding: gzip, deflate
Host: 192.168.13.102
Connection: Keep-Alive

 

応答を送信する

AT+CIPSEND=0,27

<html><h1>Hello!</h1></html>

AT+CIPCLOSE=0

 

image

image.

 

本当はちゃんとヘッダとかも設定しないといけないんだろうけれど、まあ、超簡易応答ということで。

投稿日時 : 2015年11月23日 16:36

Feedback

# Hello to every single one, it's genuinely a good for me to pay a visit this website, it contains helpful Information. 2021/07/27 2:26 Hello to every single one, it's genuinely a good

Hello to every single one, it's genuinely a good
for me to pay a visit this website, it contains helpful Information.

# Hello to every single one, it's genuinely a good for me to pay a visit this website, it contains helpful Information. 2021/07/27 2:29 Hello to every single one, it's genuinely a good

Hello to every single one, it's genuinely a good
for me to pay a visit this website, it contains helpful Information.

# Hello to every single one, it's genuinely a good for me to pay a visit this website, it contains helpful Information. 2021/07/27 2:32 Hello to every single one, it's genuinely a good

Hello to every single one, it's genuinely a good
for me to pay a visit this website, it contains helpful Information.

# Hello to every single one, it's genuinely a good for me to pay a visit this website, it contains helpful Information. 2021/07/27 2:35 Hello to every single one, it's genuinely a good

Hello to every single one, it's genuinely a good
for me to pay a visit this website, it contains helpful Information.

# Truly no matter if someone doesn't understand afterward its up to other people that they will help, so here it takes place. 2021/08/04 10:31 Truly no matter if someone doesn't understand afte

Truly no matter if someone doesn't understand afterward its up to other people that
they will help, so here it takes place.

タイトル  
名前  
Url
コメント