last update: 2024/04
Demo Sample Application Folder:
Application └ _Exclude ├ IP ..... TCP/IPネットワーク通信機能のデモサンプル
Sample | 説明 |
---|---|
IP_Start | emNet TCP/IPスタックの基本的なスタートアップ手順を示すサンプル |
IP_SHELL_Start | TELNETサーバー(emNet Shellコンソール)を実装します |
IP_SimpleServer | 簡単なTELNETサーバーを実装します |
IP_FTPServerSample | FTPサーバーのデモサンプル |
BSP |- BSP_USB.c ..................... USBポートの初期化設定ファイル | |- Setup |- IP_Config_IP_over_USB.c .... IO-Over-USBドライバインターフェース設定ファイル Config |- IP_Conf.h ............... emNet IPコンフィグレーション設定ファイル |- IP_FTP_SERVER_Conf.h .... emNet FTP Serverコンフィグレーション設定ファイル | |- IO | |- IP_ConfigIO.c ....... デバッグコンソールIOインターフェース設定ファイル | |- OS | |- IP_OS_uITRON_Config.c ............... OSリソースID設定ファイル | |- libRI600V4_OSLayer_RXv3_L.lib ....... OSインターフェース設定ファイル | |- SYS .................... SYS インターフェース設定(ソース・ヘッダ)
プロジェクト設定では「\Application\_Exclude\IP-Over-USB」フォルダはビルド対象外に設定しています。
「\_Exclude\IP-Over-USB」フォルダ下の動作確認を行うテストサンプルファイルをビルド対象設定の「\Application」フォルダ下にコピーします。 各テストアプリケーションの動作確認方法はテストサンプルアプリケーションのヘッダのコメント情報を参照ください。
評価ボードのジャンパー設定でJ29 USBポートをDEVICEモードに変更します。
操作手順:プログラム起動してUSBポートをパソコンに接続します。PC側の設定パネル又はデバイスマネジャウインドウからRNDIS LANアダプタデバイスとして認識されていることを確認します。パソコンのコマンドプロンプトから「ping usb.local」を実行してPINGレスポンスを確認します。
Debug IO Console:
SEGGER Software Evaluation Sample Eval Board: EK-RX671 Base: Renesas RI600V4 RTOS ------------------------------------------------ 0:021 INIT: emNet init started. Version 3.52.0 0:023 ********************************************************************* 0:025 * emNet Configuration * 0:027 ********************************************************************* 0:029 * IP_DEBUG: 2 0:031 * Memory added: 49144 bytes 0:033 * Buffer configuration: 0:035 * 12 buffers of 256 bytes 0:037 * 10 buffers of 1516 bytes 0:039 * TCP Tx/Rx window size per socket: 8760/8760 bytes 0:041 * Number of interfaces added: 1 0:043 * Interface #0 configuration: 0:045 * Type: ETH 0:047 * MTU: 1500 0:049 * HW addr. not set, trying to read from driver later. 0:051 ********************************************************************* 0:053 INIT: Link is down 0:055 INIT: Init completed 0:057 INIT: IP_Task started 0:060 USBD_Start 0:700 Renesas USB: 512 bytes unused EP buffer RAM (USB_ENDPOINT_BUFFER_POOL_SIZE) 0:749 LINK: Link state changed: Full duplex, 100MHz 0:751 SetAddrMaskEx done 0:753 IP_DHCPS_ConfigPool done 0:755 IP_DHCPS_ConfigDNSAddr done 0:757 IP_DHCPS_Start done 0:760 IP_MDNS_SERVER_Start done 0:762 IP_DNS_SERVER_Start done 1:124 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 1:127 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 11:735 DHCPs: DISCOVER from 04:22:C7:FE:00:80 on IFace 0 11:737 DHCPs: Lease time [s] requested 0, granted 7200 11:740 DHCPs: OFFER 100.127.0.2 11:743 DHCPs: REQUEST from 04:22:C7:FE:00:80 on IFace 0 11:745 DHCPs: Requested 100.127.0.2 11:747 DHCPs: Lease time [s] requested 0, granted 7200 11:749 DHCPs: ACK 48:857 LINK: Link state changed: No Link, 48:859 IP_DHCPS_Halt done 48:861 IP_MDNS_SERVER_Stop done 48:863 IP_DNS_SERVER_Stop done
パソコン側:
操作手順:
TIMEOUTマクロを編集して5秒のタイムアウト設定は変更可能です
File: IP_SimpleServer.c
// // Telnet server sample. // #define TIMEOUT 5000 // Timeout for recv() [ms].
パソコン側:
Debug IO Console:
SEGGER Software Evaluation Sample Eval Board: EK-RX671 Base: Renesas RI600V4 RTOS ------------------------------------------------ 0:021 INIT: emNet init started. Version 3.52.0 0:023 ********************************************************************* 0:025 * emNet Configuration * 0:027 ********************************************************************* 0:029 * IP_DEBUG: 2 0:031 * Memory added: 49152 bytes 0:034 * Buffer configuration: 0:035 * 12 buffers of 256 bytes 0:037 * 10 buffers of 1516 bytes 0:039 * TCP Tx/Rx window size per socket: 8760/8760 bytes 0:041 * Number of interfaces added: 1 0:043 * Interface #0 configuration: 0:045 * Type: ETH 0:047 * MTU: 1500 0:049 * HW addr. not set, trying to read from driver later. 0:051 ********************************************************************* 0:053 INIT: Link is down 0:055 INIT: Init completed 0:057 INIT: IP_Task started 0:060 USBD_Start 4:128 Renesas USB: 512 bytes unused EP buffer RAM (USB_ENDPOINT_BUFFER_POOL_SIZE) 4:165 LINK: Link state changed: Full duplex, 100MHz 4:167 SetAddrMaskEx done 4:169 IP_DHCPS_ConfigPool done 4:171 IP_DHCPS_ConfigDNSAddr done 4:173 IP_DHCPS_Start done 4:176 IP_MDNS_SERVER_Start done 4:178 IP_DNS_SERVER_Start done 4:180 DHCPs: REQUEST from 04:22:C7:FE:00:80 on IFace 0 4:181 DHCPs: Requested 100.127.0.2 4:183 *** Warning *** DHCPs: NAK, no previous DISCOVER 4:241 DHCPs: DISCOVER from 04:22:C7:FE:00:80 on IFace 0 4:243 DHCPs: Lease time [s] requested 0, granted 7200 4:245 DHCPs: OFFER 100.127.0.2 4:249 DHCPs: REQUEST from 04:22:C7:FE:00:80 on IFace 0 4:251 DHCPs: Requested 100.127.0.2 4:253 DHCPs: Lease time [s] requested 0, granted 7200 4:255 DHCPs: ACK 4:524 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 4:527 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 14:352 New IPv4 client accepted. 24:152 recv() timeout after 5 seconds of inactivity! 24:153 Disconnecting client.
操作手順:
操作手順:
Debug IO Console:
SEGGER Software Evaluation Sample Eval Board: EK-RX671 Base: Renesas RI600V4 RTOS ------------------------------------------------ 0:021 INIT: emNet init started. Version 3.52.0 0:023 ********************************************************************* 0:025 * emNet Configuration * 0:027 ********************************************************************* 0:029 * IP_DEBUG: 2 0:031 * Memory added: 49152 bytes 0:033 * Buffer configuration: 0:035 * 12 buffers of 256 bytes 0:037 * 10 buffers of 1516 bytes 0:039 * TCP Tx/Rx window size per socket: 8760/8760 bytes 0:041 * Number of interfaces added: 1 0:043 * Interface #0 configuration: 0:045 * Type: ETH 0:047 * MTU: 1500 0:049 * HW addr. not set, trying to read from driver later. 0:051 ********************************************************************* 0:053 INIT: Link is down 0:055 INIT: Init completed 0:057 INIT: IP_Task started 0:059 USBD_Start 0:711 Renesas USB: 512 bytes unused EP buffer RAM (USB_ENDPOINT_BUFFER_POOL_SIZE) 0:739 LINK: Link state changed: Full duplex, 100MHz 0:740 SetAddrMaskEx done 0:742 IP_DHCPS_ConfigPool done 0:744 IP_DHCPS_ConfigDNSAddr done 0:746 IP_DHCPS_Start done 0:749 IP_MDNS_SERVER_Start done 0:751 IP_DNS_SERVER_Start done 0:753 DHCPs: REQUEST from 04:22:C7:FE:00:80 on IFace 0 0:755 DHCPs: Requested 100.127.0.2 0:757 *** Warning *** DHCPs: NAK, no previous DISCOVER 0:810 DHCPs: DISCOVER from 04:22:C7:FE:00:80 on IFace 0 0:811 DHCPs: Lease time [s] requested 0, granted 7200 0:813 DHCPs: OFFER 100.127.0.2 0:817 DHCPs: REQUEST from 04:22:C7:FE:00:80 on IFace 0 0:818 DHCPs: Requested 100.127.0.2 0:820 DHCPs: Lease time [s] requested 0, granted 7200 0:822 DHCPs: ACK 0:866 FTPS: Using a memory pool of 4096 bytes for 1 connections. 1:124 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 1:127 NDP: Link-local IPv6 addr.: FE80:0000:0000:0000:0622:C7FF:FEFE:0000 added to IFace: 0 16:095 New IPv4 client accepted.
USB-Hostインターフェース