Wizfi 250, IoT플랫폼 접속 에러 질문
Wireless
No replies yet. Be the first to reply.
Join the discussion.
Wireless
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Wizfi 250, IoT플랫폼 접속 에러 질문
by wizdaniel ·
안녕하세요
아래 소스코드에서 주석으로 되어있는 //Serial.println(rcvbuf);를 주석을 해제하고 테스트 해보시길 바랍니다.
//Serial.println(rcvbuf); => Serial.println(rcvbuf);
LED를 On/Off 하는 예제는, Ubidots에서 LED 프로젝트의 상태 데이터를 읽어와서(JSON format) 그 중 value 의 상태값을 읽는 예제입니다.
그래서 value가 1이면 on, 아니면 off 로 동작하게 됩니다.
올려주신 상황은 off일 경우에는 동작하게 되는데, 이 상황이 Off 즉 value가 0인 상태를 읽는 것이 확실한지 우선 체크해보아야 할 것 같습니다.
그래서 rcvbuf를 모두 출력하게 되면, WizFi250이 Ubidots와 정상적으로 상태값을 읽어오는 상황인지, 아니면 다른 문제 상황인지를 파악할 수 있을 것 같습니다.
=========================================================================
if(!myClient.getIsConnected() && lastConnected )
{
//Serial.println(rcvbuf);
int rcv_value = parser_value(rcvbuf, PARSE);
Serial.println(“disconnecting.”);
myClient.stop();
digitalWrite(Pin_LED_Red, rcv_value);
Serial.print("LED is ");
if(rcv_value)
Serial.println(“ON”);
else
Serial.println(“OFF”);
rcvbuf = “”;
}
RE: Wizfi 250, IoT플랫폼 접속 에러 질문
by wootekken ·
rcvbuf안에 있는 rcv_value는 0 → 1로 잘 변하고(웹에서 LED버튼 클릭시)
1로 변한것을 잘 받았다고 시리얼 모니터에 뿌려지는데요.
그래서 LED를 On한 다음에 다시 유비닷에 접속하는 부분에서 멈춰버립니다.
아래에 보시면은,
rcv_value = 1
AT+FDNS=thing.ubidots.com,1000 // ==> 여기에서 멈춥니다. **************************************************disconnecting.
LED is ON
아래에는 와이파이 접속 부터 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]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is OFF
50.23.124.68
[OK]
AT+SCON=O,TCN,50.23.124.68,80,0
[OK]
AT+SSEND=0,0.0.0.0,80,186[CONNECT 0]send GET
[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
AT+FDNS=thing.ubidots.com,1000disconnecting.
LED is ON
//================================================================================//
RE: Wizfi 250, IoT플랫폼 접속 에러 질문
by wootekken ·
** 아 그리고, 참고사항이 있는데요.
아두이노 우노 + 아두이노 정품 와이파이쉴드(아두이노에서 만든것)를 결합해서
똑같은 인터넷 네트워크하에, 위에서 했던 유비닷 LED제어를 하면 작동이 잘 됩니다.
하지만 wizfi250만 현재 이 문제가 있어서요…
RE: Wizfi 250, IoT플랫폼 접속 에러 질문
by wizdaniel ·
이 문제는 Pin_LED_Red 핀이 13으로 define 되어 있는데,
13번 핀은 아두이노와 WizFi250의 SPI 통신으로 사용되는 핀 중 하나입니다.
따라서 LED가 켜지면서 13번 핀을 강제로 high로 만들었기 때문에 SPI 통신이 되지 않는 문제입니다.