rcvbuf안에 있는 rcv_value는 0 → 1로 잘 변하고(웹에서 LED버튼 클릭시)
1로 변한것을 잘 받았다고 시리얼 모니터에 뿌려지는데요.
그래서 LED를 On한 다음에 다시 유비닷에 접속하는 부분에서 멈춰버립니다.
아래에 보시면은,
rcv_value = 1
disconnecting.
LED is ON
AT+FDNS=thing.ubidots.com,1000 // ==> 여기에서 멈춥니다.
**************************************************
아래에는 와이파이 접속 부터 LED 온오프를 1번 클릭 할때까지의
상태값을 시리얼 모니터에 뿌린 겁니다.
//==============================================================================//
Serial Init
===== SPI Send =====
AT
==================
===== SPI Recv =====
WizFi250 Version 1.0.3.3 (WIZnet Co.Ltd)
AT
[OK]
==================
===== SPI Send =====
AT+MECHO=0
==================
===== SPI Recv =====
AT+MECHO=0
[OK]
==================
AT+WNET=1
[OK]
AT+WLEAVE
[OK]
AT+WSET=0,daddyslab_2_4G
[OK]
AT+WSEC=0,asdf7890
[OK]
AT+WJOIN
Joining : daddyslab_2_4G
Successfully joined : daddyslab_2_4G
[Link-Up Event]
IP Addr : 192.168.0.174
Gateway : 192.168.0.1
[OK]
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:11 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:16 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:21 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:27 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:32 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:37 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “_last_activity”: 1459992487000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992487529, “value”: 0.0, “context”: {}}, “last_activity”: 1459992487000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 0
disconnecting.
LED is OFF
AT+FDNS=thing.ubidots.com,1000
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
[CONNECT 0]send GET
AT+SSEND=0,0.0.0.0,80,186
[0,186]
[OK]
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Apr 2016 01:29:43 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept
Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
2d5
{“id”: “5703b88376254216c5afb846”, “name”: “led”, “icon”: “”, “unit”: “”, “datasource”: {“id”: “5703ab5b7625424037dd94bf”, “name”: “LED”, “url”: “http://things.ubidots.com/api/v1.6/datasources/5703ab5b7625424037dd94bf”}, “url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846”, “description”: “”, “properties”: {“_last_value”: {“timestamp”: 1459992579286, “value”: 1.0, “context”: {}}, “_last_activity”: 1459992579000}, “tags”: , “values_url”: “http://things.ubidots.com/api/v1.6/variables/5703b88376254216c5afb846/values”, “created_at”: “2016-04-05T13:07:15.314”, “last_value”: {“timestamp”: 1459992579286, “value”: 1.0, “context”: {}}, “last_activity”: 1459992579000, “type”: 0, “derived_expr”: “”}
0
rcv_value = 1
disconnecting.
LED is ON
AT+FDNS=thing.ubidots.com,1000
//================================================================================//