1. RSS 기상청 정보 접근방법
1) 기상청 홈페이지
2) 우측 하단의 RSS 진입 시
3) 원하는 지역 입력 후 RSS 버튼 클릭 시 접속 링크 확인
4) 해당 link 접속 시 xml 데이터 확인
5) postman을 이용한 데이터 호출 명령 확인
-> GET link주소 입력 후 code snippet에 해당 요청 type을 변경 시 다음과 같이 호출 명령어 확인이 가능
GET /wid/queryDFSRSS.jsp?zone=4311370000 HTTP/1.1
Host: www.kma.go.kr
2. Wifi360 module AT command
AT
1. WiFi Station mode 설정
AT+CWMODE_CUR=1 //Station mode 로 설정한다. AT+CWMODE_DEF 의 경우 flash 에
저장된다.
==> OK
2. Single Connection mode 설정
AT+CIPMUX=0
==> OK
3. DHCP enable 설정
AT+CWDHCP_CUR=1,1 //Station mode 에서 DHCP enable
==> OK
4. 연결가능한 WiFi AP List 확인
AT+CWLAP
==> +CWLAP:(3,"ssid",-57,"mac address",1,1) //encryption method, ssid, rssi, mac address, channel, wps
5. WiFi AP 에 연결
AT+CWJAP_CUR="ssid","password"
==> WIFI CONNECTED
WIFI GOT IP
OK
6. WizFi360 device 의 IP address 확인
AT+CIPSTA_CUR?
==> +CIPSTA_CUR:ip:"192.168.10.13"
+CIPSTA_CUR:gateway:"192.168.10.1"
+CIPSTA_CUR:network:"255.255.255.0"
OK
7. WizFi360 이 연결되어 있는 AP 와 같은 AP 에 연결된 PC 에서 TCP Server Open.
- Ex) IP : 192.168.10.100 Port : 5000
8. WizFi360 connects to the TCP Server as a TCP Client
AT+CIPSTART="TCP","192.168.10.100",5000 //protocol, server IP, port
==> CONNECT
OK
9. WizFi360 sends data to the TCP Server
AT+CIPSEND=10 //data length(10 byte) 설정
==> OK
> //WizFi360 에서 serial data 의 수신을 시작하기위해 >를 return 한다.
1234567890 //data 를 입력한다.
==> Recv 10 bytes
SEND OK
10. When WizFi360 received data from TCP Server, it will prompt message below:
==> +IPD,10:1234567890
11. End the TCP Connection
AT+CIPCLOSE
==> CLOSED
OK
참고 Manual : Wizfi360 quick start guide v1.1.3
3. 기상청 RSS 요청
AT+CIPSTART="TCP","www.kma.go.kr",80<CR><LF>
AT+CIPSEND=94<CR><LF>
GET /wid/queryDFSRSS.jsp?zone=4311370000 HTTP/1.1<CR><LF>Host: www.kma.go.kr<CR><LF>Connection: close<CR><LF><CR><LF>
// 실제 동작
AT+CIPSTART="TCP","www.kma.go.kr",80
CONNECT
OK
AT+CIPSEND=93
AT+CIPSEND=93
OK
> GET /wid/queryDFSRSS.jsp?zone=4311370000 HTTP/1.1
Host: www.kma.go.kr
Connection: close
Recv 93 bytes
SEND OK
+IPD,275:HTTP/1.1 200 200
Date: Sun, 16 Apr 2023 13:35:05 GMT
Content-Type: text/xml;charset=UTF-8
Content-Length: 7588
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains
Set-Cookie: JSESSIONID=065C8D1970749F399C6393CB4A70BBD4; Path=/; HttpOnly
+IPD,1024:<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>湲곗긽泥??숇꽕?덈낫 ?뱀꽌鍮꾩뒪 - 異⑹껌遺곷룄 泥?<?쒗씎?뺢뎄 ?댁쿇.?좊큺???꾪몴?덈낫</title>
<link>http://www.kma.go.kr/weather/main.jsp</link>
<description>?숇꽕?덈낫 ?뱀꽌鍮꾩뒪</description>
<language>ko</language>
<generator>?숇꽕?덈낫</generator>
<pubDate>2023??04??16??(???붿씪 20:00</pubDate>
<item>
<author>湲곗긽泥?/author>
<category>異⑹껌遺곷룄 泥?<?쒗씎?뺢뎄 ?댁쿇.?좊큺??/category>
<title>?숇꽕?덈낫(?꾪몴) : 異⑹껌遺곷룄 泥?<?쒗씎?뺢뎄 ?댁쿇.?좊큺??[X=69,Y=107]</title><link> http://www.kma.go.kr/weather/forecast/timeseries.jsp?searchType=INTEREST&dongCode=4311370000 </link>
<guid> http://www.kma.go.kr/weather/forecast/timeseries.jsp?searchType=INTEREST&dongCode=4311370000 </guid>
<description>
<header>
<tm>202304162000</tm>
<ts>6</ts>
<x>69</x>
<y>107</y>
</header>
<body>
<data seq="0">
<hour>24</hour>
<day>0</day>
<temp>9.0</temp>
<tmx>-999.0</t
+IPD,1024:mx>
<tmn>-999.0</tmn>
<sky>1</sky>
<pty>0</pty>
<wfKor>留묒쓬</wfKor>
<wfEn>Clear</wfEn>
<pop>0</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>0.9</ws>
<wd>6</wd>
<wdKor>??/wdKor>
<wdEn>W</wdEn>
<reh>70</reh>
<r06>0.0</r06>
<s06>0.0</s06>
</data>
<data seq="1">
<hour>3</hour>
<day>1</day>
<temp>7.0</temp>
<tmx>21.0</tmx>
<tmn>5.0</tmn>
<sky>1</sky>
<pty>0</pty>
<wfKor>留묒쓬</wfKor>
<wfEn>Clear</wfEn>
<pop>0</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>1.3</ws>
<wd>7</wd>
<wdKor>遺곸꽌</wdKor>
<wdEn>NW</wdEn>
<reh>75</reh>
<r06>0.0</r06>
<s06>0.0</s06>
</data>
<data seq="2">
<hour>6</hour>
<day>1</day>
<temp>5.0</temp>
<tmx>21.0</tmx>
<tmn>5.0</tmn>
<sky>1</sky>
<pty>0</pty>
<wfKor>留묒쓬</wfKor>
<wfEn>Clear</wfEn>
<pop>0</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>0.8</ws>
<wd>5</wd>
<wdKor>?⑥꽌</wdKor>
<wdEn>SW</wdEn>
<reh>80</reh>
<r06>0.0</r06>
<s06>0.0
+IPD,1024:</s06>
</data>
<data seq="3">
<hour>9</hour>
<day>1</day>
<temp>11.0</temp>
<tmx>21.0</tmx>
<tmn>5.0</tmn>
<sky>1</sky>
<pty>0</pty>
<wfKor>留묒쓬</wfKor>
<wfEn>Clear</wfEn>
<pop>0</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>1.8</ws>
<wd>5</wd>
<wdKor>?⑥꽌</wdKor>
<wdEn>SW</wdEn>
<reh>60</reh>
<r06>0.0</r06>
<s06>0.0</s06>
</data>
<data seq="4">
<hour>12</hour>
<day>1</day>
<temp>17.0</temp>
<tmx>21.0</tmx>
r12>0.0</r12>
<s12>0.0</s12>
<ws>1.1</ws>
<wd>5</wd>
<wdKor>?⑥꽌</wdKor>
<wdEn>SW</wdEn>
<reh>80</reh>
<r06>0.9</r06>
<s06>0.0</s06>
</data>
<data seq="15">
<hour>21</hour>
<day>2</day>
<temp>16.0</temp>
<tmx>19.0</tmx>
<tmn>11.0</tmn>
<sky>4</sky>
<pty>0</pty>
<wfKor>?먮┝</wfKor>
<wfEn>Cloudy</wfEn>
<pop>30</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>0.6000000000000001</ws>
<wd>4</wd>
<wdKor>??/wdKor>
<wdEn>S</wdEn>
<reh>80</reh>
<r06>0.0</r06>
<s06>0.0</s06>
</data>
<data seq="16">
<
+IPD,420:hour>24</hour>
<day>2</day>
<temp>15.0</temp>
<tmx>19.0</tmx>
<tmn>11.0</tmn>
<sky>4</sky>
<pty>0</pty>
<wfKor>?먮┝</wfKor>
<wfEn>Cloudy</wfEn>
<pop>30</pop>
<r12>0.0</r12>
<s12>0.0</s12>
<ws>1.2000000000000002</ws>
<wd>2</wd>
<wdKor>??/wdKor>
<wdEn>E</wdEn>
<reh>85</reh>
<r06>0.0</r06>
<s06>0.0</s06>
</data>
</body>
</description>
</item>
</channel>
</rss>CLOSED