Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (86 sloc) 7.65 KB
title author date image cover tags excerpt
IPv6 WebServer example with WIZnet W6100 chip
bongjun.hur
2019-03-05 13:00
/files/covers/home-office-336581_1280.jpg
title link author
Home office
arduino
WIZnet
W6100
IPv6
WebServer

(Modified) 2019-03-03

WebServer Example

WebServer-Adafruit (https://github.com/WIZnet-ArduinoEthernet/WebServer-Adafruit) W6100์˜ IPv4, IPv6 Dual Stack์„ ์ด์šฉํ•œ WebServer Example ์ž…๋‹ˆ๋‹ค.

Browser๋กœ ์ ‘์†ํ•˜๋ฉด Host์˜ IPv4 ๋˜๋Š” IPv6 ์ฃผ์†Œ๊ฐ€ Adafruit์˜ OLED SSD1306์— ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.

WIZnet Ethernet Library IPv6

Github WIZnet Arduino Ethernet Library (https://github.com/Wiznet/Ethernet)

IPv6 Branch๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

Arduino IDE๋ฅผ Default๋กœ ์„ค์น˜ํ•˜๋ฉด Library Manager๋ฅผ ํ†ตํ•ด Downloadํ•œ Library๋Š”

'C:\Users\Your ID\Documents\Arduino\libraries'์— ์œ„์น˜ ํ•ฉ๋‹ˆ๋‹ค.

Downloadํ•œ WIZnet Arduino Ethernet Library๊ฐ€ ์•„๋ž˜์™€ ๊ฐ™์€ ๊ฒฝ๋กœ๋ฅผ ๊ฐ–๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

C:\Users\Your ID\Documents\Arduino\libraries\Ethernet

Adafruit GFX Library

Adafruit GFX Library (https://github.com/adafruit/Adafruit-GFX-Library)

Version 1.4.2๋กœ Test ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Library Manager๋ฅผ ํ†ตํ•ด Download ํ•ฉ๋‹ˆ๋‹ค.

Adafruit SSD1306 Library

Adafruit SSD1306 Library (https://github.com/adafruit/Adafruit_SSD1306)

Version 1.2.9๋กœ Test ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Library Manager๋ฅผ ํ†ตํ•ด Download ํ•ฉ๋‹ˆ๋‹ค.

WebServer-Adafruit

WebServer-Adafruit Downloadํ•˜๊ณ , ์‹คํ–‰ํ•˜์—ฌ WebServer๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. WebServer-Adafruit๋Š” Web Browser๋กœ ์ ‘์†ํ•˜๋ฉด Host์˜ IPv4 ๋˜๋Š” IPv6 ์ฃผ์†Œ๋ฅผ Adafruit์˜ OLED SSD1306์— ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  Message๋ฅผ ์ „์†กํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

IPv4 Test

IPv6 LLA

Bug ๋ฐœ๊ฒฌ

๋ฒ„๊ทธ๊ฐ€ ๋ฐœ๊ฒฌ๋˜์—ˆ๋‹ค. ์ด์   ์ง์ ‘ ๋ณธ๊ฒฉ์ ์œผ๋กœ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋‚˜ ์˜ˆ์ œ๋ฅผ ๊ฐœ์„ ํ•ด ๋ณผ๊นŒ๋‚˜~~

๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๊ณผ์ •์—์„œ ๋ฉ”์‹œ์ง€ ์ด์™ธ์˜ ํŒจํ‚ท ๋‚ด์šฉ์ด ํ‘œ๊ธฐ๋˜์–ด ์ด๋ฅผ ์ˆ˜์ •ํ•˜๊ณ ์ž ํ•œ๋‹ค.

์ผ๋‹จ, ์ด ์˜ˆ์ œ๋ฅผ Clone ํ•˜์—ฌ ์ž์‹ ์˜ ๋กœ์ปฌ PC์— ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•˜๊ณ , ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ๋ถ€๋ถ„์„ ๋นจ๋ฆฌ ์ˆ˜์ •ํ•œ๋‹ค. (๋‚จ๋“ค์ด ํ•˜๊ธฐ์ „์— 82828282)

๋‹คํ–‰์ด ์•„์ฃผ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•ด๊ฒฐ ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ๋ฉ”์‹œ์ง€์˜ ๋์„ ์ฒดํฌํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ํ…Œ์ŠคํŠธ ํ•ด๋ณด์ž..์šฐ์„  ์ปดํŒŒ์ผ

๋‹ค์šด๋กœ๋“œ ํ›„ ์‹คํ–‰..๋‹ค์‹œ ํ•ด๋ณผ๊นŒ?

๊ฒฐ๊ณผ๋Š”ย  ์•„๋ž˜์™€ ๊ฐ™์ดย ๋™์ž‘์ด ์ž˜ ๋˜์—ˆ๋‹ค.ย 

๊ทธ๋Ÿผ ์ด์ œ GitHub ์ €์žฅ์†Œ๋ฅผ ์—…๋ฐ์ดํŠธ ํ•ด๋ณด์ž.

Reusable Library Update

Clone ๋˜์–ด ์žˆ๋Š” ํ™˜๊ฒฝ์—์„œ ์ผ๋‹จย โ€œhotfixโ€ ๋ผ๋Š” ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์–ด, ๋กœ์ปฌ์—์„œ ํ…Œ์ŠคํŠธ ํ•œ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•ด์„œ commit ์„ ์ง„ํ–‰ํ•œ๋‹ค.

์ด๋ฏธ ํ…Œ์ŠคํŠธํ•ด์„œ ๊ฒ€์ฆํ•œ ์†Œ์Šค์ด๋ฏ€๋กœ, ๊ฒ€์ฆ ๊ณผ์ •์€ ์ƒ๋žตํ•˜๊ณ  (์›๋ž˜๋Š” ์ด ๋ถ€๋ถ„์ด ๊ฐ€์žฅ ์ค‘์š”ํ•˜๋‹ค) ์ด์ œ master branch๋กœ pull request๋ฅผ ์ง„ํ–‰ํ•ด ๋ณธ๋‹ค.ย 

๋ฉ”๋‰ด์—์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ์„ ํƒํ•˜๋ฉด ๋œ๋‹ค.

์ด ๊ณผ์ •์—์„œย โ€œhotfixโ€ ๋ธŒ๋žœ์น˜๋กœ ์ž‘์—…์„ ์ง„ํ–‰ํ–ˆ๊ณ , ์ €์žฅ์†Œ์—๋Š” ์ด ๋ธŒ๋žœ์น˜๊ฐ€ ์—†์œผ๋ฏ€๋กœ ์ด ์ •๋ณด๋ฅผ ๋จผ์ € ์—…๋ฐ์ดํŠธ ํ•œ๋‹ค๋Š” ๋ฉ”์‹œ์ง€๊ฐ€ ๋œฌ๋‹ค. ๊ทธ๋ƒฅ โ€œPublishโ€ ํ•˜๊ณ  ์ง„ํ–‰ํ•˜๋ฉด ๋œ๋‹ค.

์ด ๊ณผ์ •์ด ์ข…๋ฃŒ๋˜๋ฉด, ๋ธŒ๋ผ์šฐ์ €๊ฐ€ GitHub ์‚ฌ์ดํŠธ๋ฅผ ๋„์šฐ๋ฉด์„œ Pull request ๊ณผ์ •์„ ์ง„ํ–‰ํ•˜๊ฒŒ ๋œ๋‹ค.

Pull request ๋ฅผ ๋ณด๋‚ด๋ฉด, ์•„๋ž˜ ๊ทธ๋ฆผ์ฒ˜๋Ÿผ Pull request ๋ฅผ ์ฒ˜๋ฆฌํ•ด์„œย โ€œMergeโ€ ํ• ์ง€ ๋ง์ง€ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฒ„ํŠผ์ด ์•„๋ž˜์™€ ๊ฐ™์ด ๋“ฑ์žฅํ•˜๊ฒŒ ๋œ๋‹ค.

๊ด€๋ฆฌ์ž๋Š” ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ๋จผ์ €ํ•˜๊ณ , ์ด ์ฝ”๋“œ๋ฅผ ์ˆ˜์šฉํ•  ์ง€ ์•„๋‹Œ์ง€ ๊ฒฐ์ •ํ•˜๋ฉด ๋œ๋‹ค. ํ•ด๋‹น ์ฝ”๋“œ๋Š” ์ผ๋‹จ ๊ฒ€์ฆ์ด ๋œ ๊ด€๊ณ„๋กœ ๋ฐ”๋กœย โ€œMergeโ€ ๊ณผ์ •์„ ์ง„ํ–‰ํ•ด ๋ณด์ž.

์•„๋ž˜์™€ ๊ฐ™์ดย โ€œMergeโ€ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด 2๊ฐ€์ง€ ์ค‘์— ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค.

๊ฐœ๋ฐœ ๋ธŒ๋žœ์น˜์˜ Commit ๋‚ด์šฉ์„ ์ „๋ถ€ ๊ฐ€์ง€๊ณ  Merge๋ฅผ ํ•  ๊ฒƒ์ด๋ƒ, ์•„๋‹ˆ๋ฉด 1๊ฐœ์˜ commit ์œผ๋กœ ์ƒ๋žตํ•ด์„œ Merge๋ฅผ ํ•  ๊ฒƒ์ด๋ƒ ์„ ํƒ์„ ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

์šฐ๋ฆฌ๋Š” Merge comment ๋ฅผ ์ถ”๊ฐ€๋กœ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, ์ผ๋ฐ˜์ ์œผ๋กœย โ€œ2๋ฒˆโ€์„ ์„ ํƒํ•˜๋„๋ก ํ•œ๋‹ค. (์ค‘์š”ํ•œ commit ์ด ๋‚จ์•„์•ผ ํ•œ๋‹ค๋ฉด ๋ฐ˜๋“œ์‹œย โ€œ1๋ฒˆโ€์„ ์„ ํƒํ•˜๋„๋ก!!!)

์ž ๊ทธ๋Ÿผ, Merge comment๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์•„๋ž˜์™€ ๊ฐ™์ด ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ master ๋ธŒ๋žœ์น˜๋ฅผ ์—…๋ฐ์ดํŠธ ํ•ด๋ณด์ž.

๊ทธ๋Ÿผ ์„ฑ๊ณต๋˜์—ˆ๋‹ค๋Š” ๋ฉ”์‹œ์ง€์™€ ํ•จ๊ป˜ ์š”์ฒญํ•œ Pull request ๋Š” ์ž๋™์œผ๋กœ close ๋œ๋‹ค.

์—ฌ๊ธฐ์„œ ์ž ๊น!! ์ž‘์—…ํ•œย โ€œhotfixโ€ ๋ธŒ๋žœ์น˜๋Š” ๋”์ด์ƒ ํ•„์š”๊ฐ€ ์—†์œผ๋ฏ€๋กœ ์œ„์˜ ๊ทธ๋ฆผ์˜ย โ€œDelete branchโ€๋ฅผ ๋ˆŒ๋Ÿฌ ์‚ญ์ œํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.

์ด ์‚ญ์ œ ๊ณผ์ •์€ ๋กœ์ปฌ์—์„œ ์•„๋ž˜ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ์ˆ˜ํ–‰ํ•ด๋„ ๋œ๋‹ค.

๋‹น์—ฐํžˆ GitHub ์ €์žฅ์†Œ์— ์žˆ๋Š” ๋ธŒ๋žœ์น˜๋„ ๊ฐ™์ด ์‚ญ์ œํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์ฃ  ^^.

์ด์ œ ์•„์ฃผ ๊นจ๋—ํ•ด์ง„ ์ €์žฅ์†Œ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

์ด์ƒ, GitHub ์ €์žฅ์†Œ์— ์˜คํ”ˆ๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ํ™œ์šฉ๋ฒ•๊ณผ ๊ธฐ์—ฌ๋ฅผ ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๋ชจ๋“  ๊ณผ์ •์„ ์‚ดํŽด๋ณด์•˜๋‹ค. ์ด์   ์ž์‹ ์žˆ๊ฒŒ ๋˜˜๋˜˜ํ•œ ์ž์‹๋“ค์„ ๋งŽ์ด ๋งŒ๋“ค์–ด ๋ณด์ž. ๋ณด๋ฌผ ์ฐพ์œผ๋Ÿฌ ๊ณ ๊ณ !!

You canโ€™t perform that action at this time.