ÀÌ ¸Å´º¾óÀº JKÀüÀÚ(JK Electronics) ¿¡ ÀÇÇؼ ¹ø¿ª, ¼öÁ¤, ÀÛ¼º µÇ¾ú°í ¼ÒÀ¯±Ç ¶ÇÇÑ JKÀüÀÚ(JK Electronics)ÀÇ °ÍÀÔ´Ï´Ù. ¼ÒÀ¯±ÇÀÚÀÇ Çã°¡¸¦ ¹ÞÁö ¾Ê°í ¹«´ÜÀ¸·Î ¼öÁ¤, »èÁ¦Çϰųª ¹èÆ÷ ÇÒ ¼ö ¾ø½À´Ï´Ù. |
|||
Cortex-M4 STM32F407IGT6 ¿µ»óó¸® °³¹ßº¸µå ¸Þ´º¾ó - Ethernet |
|||
* Update history - 2012.4.25 : Ãʱâ Release |
|||
4. S/W Å×½ºÆ® ¹æ¹ý * ¿¹Á¦ 4.14 ~ 4.24 ±îÁö´Â KEIL RL-ARM ¶óÀ̺귯¸®°¡ ÇÊ¿ä ÇÕ´Ï´Ù. 4.14 HTTP Server 4.15 HTTP Server with File upload 4.16 Telnet Server 4.17 DNS 4.18 FTP Server 4.19 SNMP 4.20 SMTP Client 4.21 LED switch with TCP/UDP Network 4.22 BSD Network 4.23 TCP/UDP LED Client 4.24 BSD Client * ¿¹Á¦ 4.25 ~ 4.30 ±îÁö´Â KEIL RL-ARM ¶óÀ̺귯¸®°¡ ÇÊ¿ä ¾ø½À´Ï´Ù. 4.25 HTTP Server 4.26 TFTP Server 4.27 TCP Echo Server 4.28 UDP Echo Server 4.29 TCP Echo client 4.30 UDP Echo client * ¿¹Á¦ 4.31 ~ 4.33 ±îÁö FreeRTOS¸¦ ÀÌ¿ëÇÑ ¿¹Á¦ ÀÔ´Ï´Ù. 4.31 HTTP Server 4.32 HTTP Server with socket library 4.33 Echo Server |
|||
4.14 HTTP Server (1) /Examples/Ethernet/Http_demo (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ HTTP ¼¹ö(CGIµ¿ÀÛ Å×½ºÆ®)·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. (4) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. - °³¹ßº¸µåÀÇ IP´Â DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ°Ô µË´Ï´Ù. (5) ¸¸¾à DHCP¿¡ ÀÇÇؼ IP¸¦ ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ´Â°ÍÀÌ ½ÇÆÐÇÑ´Ù¸é ¾Æ·¡ ±×¸²°ú °°ÀÌ Net-Config.c ÆÄÀÏÀ» ¿°í "Configuration Wizard" ÅÇÀ» ÀÌ¿ëÇؼ IP Address, Subnet mask µîÀ» ¼öÁ¤ÇÏ°í ÄÄÆÄÀÏ ÇÕ´Ï´Ù. (6) °³¹ßº¸µå¿¡ Æß¿þ¾î ´Ù¿î·Îµå°¡ ¿Ï·áµÇ¸é ¹Ýµå½Ã ³×Æ®¿öÅ© ¼±ÀÌ ¿¬°áµÈ »óÅ¿¡¼ °³¹ßº¸µåÀÇ Àü¿øÀ» ¿¬°á ÇÕ´Ï´Ù. (7) PCÀÇ ÀÎÅÍ³Ý ºê¶ó¿ìÀú¸¦ ½ÇÇà ½ÃÅ°°í URL À» "http://stm3240g-eval/" ·Î ÀÔ·Â ÇÕ´Ï´Ù. (8) ±×·¯¸é ÀÎÅÍ³Ý ÀͽºÇ÷η¯ÀÇ °æ¿ì ¾Æ·¡¿Í °°ÀÌ »ç¿ëÀÚ À̸§°ú ¾ÏÈ£¸¦ ÀÔ·Â Ç϶ó´Â âÀÌ ³ª¿É´Ï´Ù. - »ç¿ëÀÚ À̸§ : admin(¹Ýµå½Ã ¼Ò¹®ÀÚ·Î ÀÔ·Â Çϼ¼¿ä.) - ¾ÏÈ£ : ¾øÀ½ "Network" ¸¦ Ŭ¸¯ ÇÕ´Ï´Ù. °³¹ßº¸µå HTTP ¼¹öÀÇ ³×Æ®¿öÅ© ȯ°æÀ» ¼öÁ¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¼öÁ¤ »çÇ×Àº ÀúÀåµÇÁö ¾Ê°í Àç ºÎÆÃÀ» ÇÏ¸é ¿ø»óÅ·Πº¹±¸ µË´Ï´Ù. À¥ ÀÎÅÍÆäÀ̽º¸¦ ÀÌ¿ëÇؼ °³¹ßº¸µåÀÇ LED ¸¦ ON/OFF ÇÒ ¼ö ÀÖ½À´Ï´Ù. °³¹ßº¸µåÀÇ ADC °ªÀ» ÀÐ¾î ¿Ã ¼ö ÀÖ½À´Ï´Ù. HTTP¼¹öÀÇ »óŸ¦ º¸¿© ÁÝ´Ï´Ù. À§ÀÇ ¿¹Á¦ ÀÌ¿Ü¿¡¼ °³¹ßº¸µåÀÇ BUTTON »óŸ¦ ÀÐ¾î ¿Ã¼öµµ ÀÖ°í, LCD ¿¡ Display ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 4.15 HTTP Server with File upload (1) /Examples/Ethernet/Http_upload (2) EhternetÀ» ÀÌ¿ëÇؼ PCÀÇ ÆÄÀÏÀ» °³¹ßº¸µåÀÇ HTTP ¼¹ö(CGIµ¿ÀÛ Å×½ºÆ®)¸¦ ÀÌ¿ëÇؼ °³¹ßº¸µåÀÇ SD¸Þ¸ð¸®¿¡ ÆÄÀÏÀ» ¾÷·Îµå ÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. - °³¹ßº¸µåÀÇ IP´Â DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ°Ô µË´Ï´Ù. (4) °³¹ßº¸µå¿¡ SD¸Þ¸ð¸®¸¦ »ðÀÔ ÇÕ´Ï´Ù. - ¹Ýµå½Ã SW3, SW4 ¸¦ ¾Æ·¡ ±×¸²°ú °°ÀÌ SD ÂÊÀ¸·Î Á¡ÆÛ¸¦ Short ½ÃÄÑ¾ß SD¸Þ¸ð¸®¸¦ »ç¿ë ÇÒ ¼ö ÀÖ½À´Ï´Ù. (5) PCÀÇ ÀÎÅÍ³Ý ºê¶ó¿ìÀú¸¦ ½ÇÇà ½ÃÅ°°í URL À» "http://stm3240g-eval/" ·Î ÀÔ·Â ÇÕ´Ï´Ù. (6) ±×·¯¸é ÀÎÅÍ³Ý ÀͽºÇ÷η¯ÀÇ °æ¿ì ¾Æ·¡¿Í °°ÀÌ »ç¿ëÀÚ À̸§°ú ¾ÏÈ£¸¦ ÀÔ·Â Ç϶ó´Â âÀÌ ³ª¿É´Ï´Ù. - »ç¿ëÀÚ À̸§ : admin(¹Ýµå½Ã ¼Ò¹®ÀÚ·Î ÀÔ·Â Çϼ¼¿ä.) - ¾ÏÈ£ : ¾øÀ½ - "List Directory" ȸé - "File Upload" ¸¦ ¼±Åà ÇÏ°í "ã¾Æº¸±â" ¹öÆ°À» ´·¯¼ Upload ÇÒ ÆÄÀÏÀ» ¼±Åà ÇÏ°í "Send" ¹öÆ°À» Ŭ¸¯ ÇÕ´Ï´Ù. - ´Ù½Ã "List Directory" ¸¦ Çؼ ÆÄÀÏÀÌ ¿Ã¶ó °¬´ÂÁö¸¦ È®ÀÎ ÇÕ´Ï´Ù. (7) ÆÄÀÏ ¾÷·Îµå°¡ ½ÃÀÛÀÌ µÇ¸é CPUº¸µåÀÇ LED1ÀÌ 3ÃÊ¿¡ Çѹø¾¿ ±ôºý ÀÔ´Ï´Ù. 4.16 Telnet Server (1) /Examples/Ethernet/Telnet_demo (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ Telnet ¼¹ö·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. - °³¹ßº¸µåÀÇ IP´Â DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ°Ô µË´Ï´Ù. (3) PCÀÇ µµ½º ¸í·Éâ(cmd.exe) À» ½ÇÇà ½ÃÅ°°í "telnet stm3240g-eval" À» ÀÔ·Â ÇÕ´Ï´Ù. - »ç¿ëÀÚ À̸§ : admin(¹Ýµå½Ã ¼Ò¹®ÀÚ·Î ÀÔ·Â Çϼ¼¿ä.) - ¾ÏÈ£ : ¾øÀ½(¿£ÅÍ) - ¿¬°áÀÌ ¼º°ø ÀûÀÌ¸é ¾Æ·¡ ±×¸²°ú °°ÀÌ "help ¸í·ÉÀ» ÀÔ·ÂÇÏ°í ´ÙÀ½ ¸í·É¾î µîÀ» ½ÇÇà ½ÃÄÑ º¾´Ï´Ù. (ÁÖ) À©µµ7 ÀÇ °æ¿ì telnet, tftp ±â´ÉµîÀÌ ±âº»À¸·Î OFF »óÅ ÀÔ´Ï´Ù. PCÀÇ Á¦¾îÆÇ¿¡¼ ON À¸·Î º¯°æ ½ÃŲ ÈÄ Å×½ºÆ® ÇϽñ⠹ٶø´Ï´Ù. 4.17 DNS (1) /Examples/Ethernet/DNS_demo (2) EhternetÀ» ÀÌ¿ëÇؼ DNS resolving(µµ¸ÞÀÎ À̸§À» DNS¼¹ö¸¦ ÅëÇؼ IP·Î º¯È¯) À» ÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. - ÀÌ ¿¹Á¦¿¡¼´Â °³¹ßº¸µåÀÇ IP¸¦ DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹ÞÁö ¾Ê½À´Ï´Ù ¾Æ·¡ ±×¸²Ã³·³ ¸Þ´º¾ó·Î ÇÒ´çÇؼ ÄÄÆÄÀÏ ÇØ¾ß ÇÕ´Ï´Ù.. (4) °³¹ßº¸µåÀÇ UART3 Á¡ÆÛ¸¦ ¼³Á¤ ÇÏ°í PCÀÇ °³¹ßº¸µåÀÇ UART¸¦ ¿¬°á ÇÕ´Ï´Ù. ¹Ýµå½Ã SW3, SW4 ¸¦ ¾Æ·¡ ±×¸²°ú °°ÀÌ UART3ÂÊÀ¸·Î Á¡ÆÛ¸¦ Short ½ÃÄÑ¾ß UART3 Åë½ÅÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù. (5) PCÀÇ ÇÏÀÌÆÛ Å͹̳ÎÀ» ¿¬°á ÇÕ´Ï´Ù. 4.18 FTP Server (1) /Examples/Ethernet/FTP_demo (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ FTP¼¹ö·Î µ¿ÀÛ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µå¿¡ SD¸Þ¸ð¸®¿Í Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) PCÀÇ Å½»ö±â¸¦ ½ÇÇà ½ÃÅ°°í URL À» "http://stm3240g-eval/" ·Î ÀÔ·Â ÇÕ´Ï´Ù. (5) ±×·¯¸é ÀÎÅÍ³Ý ÀͽºÇ÷η¯ÀÇ °æ¿ì ¾Æ·¡¿Í °°ÀÌ »ç¿ëÀÚ À̸§°ú ¾ÏÈ£¸¦ ÀÔ·Â Ç϶ó´Â âÀÌ ³ª¿É´Ï´Ù. - »ç¿ëÀÚ À̸§ : admin(¹Ýµå½Ã ¼Ò¹®ÀÚ·Î ÀÔ·Â Çϼ¼¿ä.) - ¾ÏÈ£ : ¾øÀ½ °³¹ßº¸µåÀÇ SD¸Þ¸ð¸®ÀÇ ÆÄÀÏ ¸®½ºÆ®¸¦ º¸¿© ÁÖ°í PCÀÇ ÆÄÀϵéÀ» ¾÷·Îµå ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 4.19 SNMP (1) /Examples/Ethernet/SNMP_demo (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ SNMP ¼¹ö·Î µ¿ÀÛ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÇ´Â "CD\PC-Software\PC-Software\SNMPTest\Release\SNMPTest.exe" ¸¦ ½ÇÇà ÇÕ´Ï´Ù. ½ÇÇàÆÄÀÏ°ú VC++ ¼Ò½º¿Í ÇÔ²² Á¦°ø ÇÏ°í ÀÖ½À´Ï´Ù. °³¹ßº¸µåÀÇ IP¸¦ ÀÔ·ÂÇÏ°í "Connect" ¹öÆ°À» ´©¸¨´Ï´Ù. °³¹ßº¸µåÀÇ IP´Â DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹ÞÀ»¼ö ÀÖÀ¸¸é LCD ȸ鿡 Display µË¤¤µð¤¿. - Line1, Line2 ¿¡ ÀÔ·ÂÇÑ ÅؽºÆ®°¡ °³¹ßº¸À¸ÀÇ LCD ȸ鿡 Display µË´Ï´Ù. - Outputs(LEDs), Inputs(Buttons) ÀÇ »óŸ¦ Àоî¿À°Å³ª Ãâ·ÂÀ» °³¹ßº¸µåÀÇ ³»º¸³¾ ¼ö ÀÖ½À´Ï´Ù. 4.20 SMTP Client (1) /Examples/Ethernet/SMTP_demo (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ SMTP Ŭ¶óÀ̾ðÆ®·Î µ¿ÀÛ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù (3) ÀÌ ¿¹Á¦¸¦ Á¦´ë·Î Å×½ºÆ® Çϱâ À§Çؼ´Â SMTP_demo.c ÆÄÀÏ¿¡¼ ¾Æ·¡¿Í °°ÀÌ SMTP ¸ÞÀϼ¹öÀÇ IP ÁÖ¼Ò¸¦ Á¦´ë·Î ¼öÁ¤ ÇØ¾ß ÇÕ´Ï´Ù. - SMTP_uif.c ÆÄÀÏ¿¡¼ ¾Æ·¡ ±×¸²°ú °°ÀÌ ¸ÞÀÏ °èÁ¤ Á¤º¸¸¦ ¼öÁ¤ ÇÕ´Ï´Ù. ÀÌ Á¤º¸´Â À§ÀÇ ¸ÞÀÏ ¼¹ö °èÁ¤À» ÀÔ·ÂÇÏ´Â °ÍÀÔ´Ï´Ù. »ç¿ëÀÚ ¸¶´Ù ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù. °³¹ßº¸µåÀÇ IP ÁÖ¼Òµî ³×Æ®¿öÅ© Á¤º¸¸¦ ¸Þ´º¾ó·Î ¼öÁ¤ ÇÕ´Ï´Ù. (4) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (5) ¾Æ¿ô·è µîÀÇ Email Ŭ¶óÀ̾ðÆ®¿¡¼ ÇÁ·Î±×·¥À» ÀÌ¿ëÇؼ À§¿¡¼ ¼³Á¤ÇÑ SMTP¼¹ö¿¡ Á¢¼ÓÇÏ¿© ¸ÞÀÏÀÌ µµÂø ÇÏ¿´´ÂÁö È®ÀÎ ÇÕ´Ï´Ù. 4.21 LED switch with TCP/UDP Network (1) /Examples/Ethernet/LEDSwitch (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¿Í PC°°ÀÇ TCP/UDP Åë½ÅÀ» ÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù. °³¹ßº¸µåÀÇ IP ÁÖ¼Òµî ³×Æ®¿öÅ© Á¤º¸¸¦ ¸Þ´º¾ó·Î ¼öÁ¤ ÇÕ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÇ´Â "CD\PC-Software\PC-Software\LEDSwitch\Release\LEDSwitch.exe" ¸¦ ½ÇÇà ÇÕ´Ï´Ù. ½ÇÇàÆÄÀÏ°ú VC++ ¼Ò½º¿Í ÇÔ²² Á¦°ø ÇÏ°í ÀÖ½À´Ï´Ù. °³¹ßº¸µåÀÇ IP¸¦ ÀÔ·ÂÇÏ°í ÇÏ°í Outputs(LEDs) ¸¦ Check or Uncheck ÇÏ¸é °³¹ßº¸µåÀÇ LED¸¦ Á¦¾îÇÒ ¼ö ÀÖ½À´Ï´Ù. 4.22 BSD Network (1) /Examples/Ethernet/BSD_server (2) 4.21 ÀÇ Åë½Å¿¹Á¦¿Í µ¿ÀÏÇϳª °³¹ßº¸µåÀÇ Åë½ÅÀ» BSD socket À¸·Î ±¸Çö Çߴٴ°͸¸ Â÷ÀÌ°¡ ÀÖ½À´Ï´Ù. 4.23 LED Client (1) /Examples/Ethernet/LEDClient (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¿Í PC°°ÀÇ TCP/UDP Åë½ÅÀ» ÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù. °³¹ßº¸µåÀÇ IP ÁÖ¼Òµî ³×Æ®¿öÅ© Á¤º¸¸¦ ¸Þ´º¾ó·Î ¼öÁ¤ ÇÕ´Ï´Ù. - BSD_client.c ¿¡¼´Â °³¹ßº¸µå¿¡¼ Á¢¼ÓÇÒ ¸®¸ðÆ® IP ÁÖ¼Ò¸¦ ÀÔ·Â ÇÕ´Ï´Ù. - BSD_client.cÀÇ "Communication Protocol À» TCP or UDP ¸¦ ¼öÁ¤Çϸé Åë½Å ÇÁ·ÎÅäÄÝÀ» ¼³Á¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù. - Net_Config.c ¿¡¼´Â °³¹ßº¸µå¿¡ ÇÒ´çÇÒ IPÁÖ¼Ò¸¦ ÀÔ·Â ÇÕ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÇ´Â "CD\PC-Software\PC-Software\echotool.exe" ¸¦ ½ÇÇà ÇÏ°í "echotool.exe /p udp /s 1001" ¸¦ ÀÔ·Â ÇÕ´Ï´Ù. °³¹ßº¸µå¿¡¼ º¸³»´Â Åë½Å µ¥ÀÌÅ͸¦ ĸÃÄÇؼ º¼ ¼ö ÀÖ½À´Ï´Ù. 4.24 BSD Client (1) /Examples/Ethernet/BSD_client (2) 4.23 ÀÇ Åë½Å¿¹Á¦¿Í µ¿ÀÏÇϳª °³¹ßº¸µåÀÇ Åë½ÅÀ» BSD socket À¸·Î ±¸Çö Çߴٴ°͸¸ Â÷ÀÌ°¡ ÀÖ½À´Ï´Ù. 4.25 HTTP Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/httpserver/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ HTTP ¼¹ö·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. - °³¹ßº¸µåÀÇ IP´Â DHCP¿¡ ÀÇÇؼ ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ°Ô µË´Ï´Ù. (4) °³¹ßº¸µåÀÇ LCD¿¡ DisplayµÇ´Â IP ÁÖ¼Ò¸¦ È®ÀÎÇÏ°í PCÀÇ À¥ºê¶ó¿ìÀú¸¦ ½ÇÇà ÇÕ´Ï´Ù. °³¹ßº¸µåÀÇ LCD¿¡ DisplayµÈ IP ÁÖ¼Ò¸¦ ºê¶ó¿ìÀúâ¿¡ ÀÔ·Â ÇÕ´Ï´Ù. LED¿Í ADC °ªµîÀ» À¥ ºê¶ó¿ìÀúµîÀ» ÅëÇؼ È®ÀÎ ÇÕ´Ï´Ù. 4.26 TFTP Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/tftpserver/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ FTP ¼¹ö·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. - main.h ÆÄÀÏ¿¡¼ °³¹ßº¸µå¿¡ ÇÒ´çµÉ IPÁÖ¼Ò¸¦ ÀÔ·Â ÇÕ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿¡ SD¸Þ¸ð¸®¸¦ »ðÀÔ ÇÕ´Ï´Ù. - ¹Ýµå½Ã SW3, SW4 ¸¦ ¾Æ·¡ ±×¸²°ú °°ÀÌ SD ÂÊÀ¸·Î Á¡ÆÛ¸¦ Short ½ÃÄÑ¾ß SD¸Þ¸ð¸®¸¦ »ç¿ë ÇÒ ¼ö ÀÖ½À´Ï´Ù. - °³¹ßº¸µå¿¡ ÇÒ´çµÈ IP ÁÖ¼Ò ÀÔ´Ï´Ù. (5) PCÀÇ µµ½º ÇÁ·ÒÇÁÆ® â¿¡¼ ¾Æ·¡¿Í °°ÀÌ °³¹ßº¸µå¿¡ ÇÒ´çÀÎ IPÁÖ¼Ò·Î ftp Á¢¼ÓÀ» ÇÏ°í "text.txt" ÆÄÀÏÀ» ¾÷·Îµå ÇÕ´Ï´Ù. ¾÷·ÎµåµÈ ÆÄÀϵéÀº °³¹ßº¸µåÀÇ SD¸Þ¸ð¸®¿¡ ÀúÀå µË´Ï´Ù. 4.27 TCP Echo Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/tcp_echo_server/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ TCP echo ¼¹ö·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. - main.h ÆÄÀÏ¿¡¼ °³¹ßº¸µå¿¡ ÇÒ´çµÉ IPÁÖ¼Ò¸¦ ÀÔ·Â ÇÕ´Ï´Ù. IPÁÖ¼Ò¸¦ ÇÒ´çÇÏÁö ¾Ê¾Æµµ DHCP¼¹ö¿¡ ¿¬°áµÈ´Ù¸é ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ½À´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÇ´Â "CD\PC-Software\PC-Software\TCPUDPDbg\TCPUDPDbg.exe ¸¦ ½ÇÇàÇÏ°í "CreateComm" À» Ŭ¸¯ ÇÕ´Ï´Ù. ¿¬°á »ý¼º â¿¡¼ ¾Æ·¡ ±×¸²°ú °°ÀÌ ÀÔ·Â ÇÕ´Ï´Ù. "DestIP" ´Â °³¹ßº¸µåÀÇ LCDâ¿¡ º¸¿©Áö´Â IP¸¦ ÀÔ·Â ÇÕ´Ï´Ù. ¾Æ·¡¿Í °°ÀÌ ¿¬°áÀÌ µÇ¸é "AutoSend" ¸¦ üũÇϰųª "Send" ¹öÆ°À» ÀÌ¿ëÇؼ °³¹ßº¸µå¿¡ µ¥ÀÌÅ͸¦ ¼Û½ÅÇÏ°í ¼ö½Å ÇÒ ¼ö ÀÖ½À´Ï´Ù. 4.28 UDP Echo Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/udp_echo_server/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¸¦ UDP echo ¼¹ö·Î µ¿ÀÛ ½ÃÅ°´Â ¿¹Á¦ ÀÔ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº 4.27 ¿¹Á¦¿Í µ¿ÀÏÇÕ´Ï´Ù. ´ÜÁö ¿¬°á »ý¼º½Ã¿¡ TCP ´ë½Å¿¡ UDP¸¦ ¼±Åà ÇÏ¸é µË´Ï´Ù. 4.29 TCP Echo client (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/tcp_echo_client/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¿¡¼ TCP echo ¼¹ö¿¡ ÆÐŶÀ» Àü¼ÛÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù. - main.h ÆÄÀÏ¿¡¼ °³¹ßº¸µå¿¡ ÇÒ´çµÉ IPÁÖ¼Ò¸¦ ÀÔ·Â ÇÕ´Ï´Ù. IPÁÖ¼Ò¸¦ ÇÒ´çÇÏÁö ¾Ê¾Æµµ DHCP¼¹ö¿¡ ¿¬°áµÈ´Ù¸é ÀÚµ¿À¸·Î ÇÒ´ç ¹Þ½À´Ï´Ù. - ÇÏÁö¸¸ UDP echo ¼¹öÀÇ IPÁÖ¼Ò´Â ¼öÁ¤Çؼ ÄÄÆÄÀÏ ÇØ¾ß ÇÕ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº °³¹ßº¸µåÀÇ Ethernet Æ÷Æ®¿¡ ³×Æ®¿öÅ© ÄÉÀ̺íÀ» ¿¬°á ÇÕ´Ï´Ù. (4) °³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÇ´Â "CD\PC-Software\PC-Software\echotool.exe" ¸¦ ½ÇÇà ÇÏ°í "echotool.exe /p tcp /s" ¸¦ ÀÔ·Â ÇÕ´Ï´Ù. °³¹ßº¸µå¿¡¼ º¸³»´Â Åë½Å µ¥ÀÌÅ͸¦ ĸÃÄÇؼ º¼ ¼ö ÀÖ½À´Ï´Ù. 4.30 UDP Echo client (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/Standalone/udp_echo_client/MDK-ARM (2) EhternetÀ» ÀÌ¿ëÇؼ °³¹ßº¸µå¿¡¼ UDP echo ¼¹ö¿¡ ÆÐŶÀ» Àü¼ÛÇÏ´Â ¿¹Á¦ ÀÔ´Ï´Ù. (3) Å×½ºÆ® ¹æ¹ýÀº ¸í·É¾î ÀÔ·Ââ¿¡¼ "echotool /p udp /s" ¸¦ ÀÔ·ÂÇÏ´Â°Í ÀÌ¿Ü¿¡´Â 4.29¿Í µ¿ÀÏ ÇÕ´Ï´Ù. * Å×½ºÆ® ¹æ¹ýÀº À§ÀÇ ¿¹Á¦µé°ú µ¿ÀÏ ÇÕ´Ï´Ù. 4.31 HTTP Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/FreeRTOS/udp_echo_client/MDK-ARM 4.32 HTTP Server with socket library (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/FreeRTOS/udp_echo_client/MDK-ARM 4.33 Echo Server (1) /Examples/STM32F4x7_ETH_LwIP_V1.0.0/Project/FreeRTOS/udptcp_echo_server_netconn/MDK-ARM |
|||