From 3f815bb49f0f6ec65d9bd010c58f9d5690745c04 Mon Sep 17 00:00:00 2001 From: Noy-Zini Date: Tue, 19 Nov 2024 11:31:06 +0200 Subject: [PATCH 1/3] add dds-config tool readme --- tools/dds/dds-config/readme.md | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tools/dds/dds-config/readme.md diff --git a/tools/dds/dds-config/readme.md b/tools/dds/dds-config/readme.md new file mode 100644 index 0000000000..6a7a6b4491 --- /dev/null +++ b/tools/dds/dds-config/readme.md @@ -0,0 +1,54 @@ +# dds-config tool + +## Goal +This tool is used to define a device as a DDS-compatible device and ensure it operates correctly within a DDS environment. +It allows users to manage connection priorities, enabling the selection of either DDS or USB as the preferred connection method when both options are available. + +## Description +Typically, the PC which the device needs to be connected to will have only one ethernet port. +However, two ethernet ports are required for the setup: +* One Ethernet port is needed to connect to the network - for remote access. +* The second Ethernet port is needed to connect to the device - for DDS communication. + +To enable this configuration, a USB to ethernet adapter can be used, allowing the network connection to be routed through a USB port. +The dds-config tool helps manage this setup by enabling users to prioritize either the USB or DDS connection, based on the specified parameters. It also provides information about the connected devices when executed. + +## Command Line Parameters +| Flag | Description | +|---|---| +|'-h --help'|Show command line help menu| +|'--usb-first'|Prioritize USB before Ethernet| +|'--eth-first'|Prioritize Ethernet and fall back to USB after link timeout| +|'--dynamic-priority'|Dynamically prioritize the last-working connection method (the default)| + +## Usage example +Prioritize Ethernet connection by using `rs-dds-config.exe --eth-first`: +``` + Device: [USB] Intel RealSense D555 s/n 338522301774 + MAC address: 98:4f:ee:19:cc:49 + configured: 192.168.11.55 & 255.255.255.0 / 192.168.11.1 + DDS: + domain ID: 0 + link: 1000 Mbps + MTU, bytes: 9000 + timeout, ms: 10000 + priority: usb-first --> eth-first + DHCP: OFF + timeout, sec: 30 + Successfully changed + Resetting device... +``` +After running `rs-dds-config.exe` we can now see the device changed it's connection to DDS: +``` + Device: [DDS] Intel RealSense D555 s/n 338522301774 + MAC address: 98:4f:ee:19:cc:49 + configured: 192.168.11.55 & 255.255.255.0 / 192.168.11.1 + DDS: + domain ID: 0 + link: 1000 Mbps + MTU, bytes: 9000 + timeout, ms: 10000 + priority: eth-first + DHCP: OFF + timeout, sec: 30 +``` \ No newline at end of file From 0867a719c29a699d1df297c2d4d239da1de15669 Mon Sep 17 00:00:00 2001 From: Noy-Zini Date: Wed, 20 Nov 2024 10:24:22 +0200 Subject: [PATCH 2/3] added command line parameters --- tools/dds/dds-config/readme.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/tools/dds/dds-config/readme.md b/tools/dds/dds-config/readme.md index 6a7a6b4491..8ba1db6ec8 100644 --- a/tools/dds/dds-config/readme.md +++ b/tools/dds/dds-config/readme.md @@ -1,25 +1,32 @@ # dds-config tool ## Goal -This tool is used to define a device as a DDS-compatible device and ensure it operates correctly within a DDS environment. +This tool is used to configer DDS based device and ensure it operates correctly within a DDS environment. It allows users to manage connection priorities, enabling the selection of either DDS or USB as the preferred connection method when both options are available. - ## Description -Typically, the PC which the device needs to be connected to will have only one ethernet port. -However, two ethernet ports are required for the setup: -* One Ethernet port is needed to connect to the network - for remote access. -* The second Ethernet port is needed to connect to the device - for DDS communication. - -To enable this configuration, a USB to ethernet adapter can be used, allowing the network connection to be routed through a USB port. -The dds-config tool helps manage this setup by enabling users to prioritize either the USB or DDS connection, based on the specified parameters. It also provides information about the connected devices when executed. +The dds-config tool allows users to prioritize either the DDS or USB connection and configure network parameters for the device. +It also provides information about the connected devices when executed. ## Command Line Parameters | Flag | Description | |---|---| -|'-h --help'|Show command line help menu| -|'--usb-first'|Prioritize USB before Ethernet| -|'--eth-first'|Prioritize Ethernet and fall back to USB after link timeout| -|'--dynamic-priority'|Dynamically prioritize the last-working connection method (the default)| +|-h --help|Show command line help menu| +|--usb-first|Prioritize USB before Ethernet| +|--eth-first|Prioritize Ethernet and fall back to USB after link timeout| +|--dynamic-priority|Dynamically prioritize the last-working connection method (the default)| +|--version|Displays version information and exits| +|--serial-number |Device serial-number to use, if more than one device is available| +|--reset|Hardware reset without making any changes| +|--link-timeout |Milliseconds before --eth-first link times out and falls back to USB| +|--dhcp |DHCP dynamic IP discovery 'on' or 'off'| +|--ip
|Device static IP address to use when DHCP is off| +|--domain-id <0-232>|DDS Domain ID to use (default is 0), note:this is the device domain ID not librealsense domain ID| +|--golden| Show R/O golden values vs. current; mutually exclusive with any changes| +|--factory-reset|Reset settings back to the --golden values| +|--dhcp-timeout |Seconds before DHCP times out and falls back to a static IP| +|--mask <1.2.3.4>|Device static IP network mask to use when DHCP is off| +|--gateway <1.2.3.4>|Displays version information and exits| +|--no-reset|Do not hardware reset after changes are made| ## Usage example Prioritize Ethernet connection by using `rs-dds-config.exe --eth-first`: From d9b678894f2c21390023dac37d6de7410bbc8b83 Mon Sep 17 00:00:00 2001 From: Noy-Zini Date: Wed, 20 Nov 2024 15:15:45 +0200 Subject: [PATCH 3/3] phrasing adjustments --- tools/dds/dds-config/readme.md | 22 +++++++++++----------- tools/dds/dds-config/rs-dds-config.cpp | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/dds/dds-config/readme.md b/tools/dds/dds-config/readme.md index 8ba1db6ec8..89db952081 100644 --- a/tools/dds/dds-config/readme.md +++ b/tools/dds/dds-config/readme.md @@ -1,32 +1,32 @@ # dds-config tool ## Goal -This tool is used to configer DDS based device and ensure it operates correctly within a DDS environment. -It allows users to manage connection priorities, enabling the selection of either DDS or USB as the preferred connection method when both options are available. +This tool is used to configure Ethernet based devices. + ## Description -The dds-config tool allows users to prioritize either the DDS or USB connection and configure network parameters for the device. -It also provides information about the connected devices when executed. +The dds-config tool offers connection configuration information for connected devices and allows users to manage connection priorities. +It enables the selection of the preferred connection method, whether Ethernet or USB, when both options are available, and provides the ability to set network parameters. ## Command Line Parameters | Flag | Description | |---|---| -|-h --help|Show command line help menu| -|--usb-first|Prioritize USB before Ethernet| +|-h --help|Show command line help menu with all available options| +|--version|Displays version information| +|--usb-first|Prioritize USB and fall back to Ethernet after link timeout| |--eth-first|Prioritize Ethernet and fall back to USB after link timeout| |--dynamic-priority|Dynamically prioritize the last-working connection method (the default)| -|--version|Displays version information and exits| |--serial-number |Device serial-number to use, if more than one device is available| |--reset|Hardware reset without making any changes| |--link-timeout |Milliseconds before --eth-first link times out and falls back to USB| |--dhcp |DHCP dynamic IP discovery 'on' or 'off'| |--ip
|Device static IP address to use when DHCP is off| +|--mask <1.2.3.4>|Device static IP network mask to use when DHCP is off| +|--gateway <1.2.3.4>|Gateway to use when DHCP is off| |--domain-id <0-232>|DDS Domain ID to use (default is 0), note:this is the device domain ID not librealsense domain ID| -|--golden| Show R/O golden values vs. current; mutually exclusive with any changes| -|--factory-reset|Reset settings back to the --golden values| |--dhcp-timeout |Seconds before DHCP times out and falls back to a static IP| -|--mask <1.2.3.4>|Device static IP network mask to use when DHCP is off| -|--gateway <1.2.3.4>|Displays version information and exits| |--no-reset|Do not hardware reset after changes are made| +|--golden| Show R/O golden values vs. current; mutually exclusive with any changes| +|--factory-reset|Reset settings back to the --golden values| ## Usage example Prioritize Ethernet connection by using `rs-dds-config.exe --eth-first`: diff --git a/tools/dds/dds-config/rs-dds-config.cpp b/tools/dds/dds-config/rs-dds-config.cpp index 39bbe1d1c9..22c898bd4c 100644 --- a/tools/dds/dds-config/rs-dds-config.cpp +++ b/tools/dds/dds-config/rs-dds-config.cpp @@ -151,19 +151,19 @@ try cli::flag quiet_arg( "quiet", "Suppress regular informational (-I-) messages" ); cli::flag reset_arg( "reset", "Hardware reset without making any changes" ); - cli::flag disable_arg( "disable", "Disable DDS in all librealsense examples & tools by default and exit" ); + cli::flag disable_arg( "disable", "Disable DDS in all librealsense examples & tools by default" ); cli::flag no_reset_arg( "no-reset", "Do not hardware reset after changes are made" ); cli::flag golden_arg( "golden", "Show R/O golden values vs. current; mutually exclusive with any changes" ); cli::flag factory_reset_arg( "factory-reset", "Reset settings back to the --golden values" ); cli::value< std::string > sn_arg( "serial-number", "S/N", "", "Device serial-number to use, if more than one device is available" ); cli::value< std::string > ip_arg( "ip", "address", "", "Device static IP address to use when DHCP is off" ); cli::value< std::string > mask_arg( "mask", "1.2.3.4", "", "Device static IP network mask to use when DHCP is off" ); - cli::value< std::string > gateway_arg( "gateway", "1.2.3.4", "", "Device static IP network mask to use when DHCP is off" ); + cli::value< std::string > gateway_arg( "gateway", "1.2.3.4", "", "Gateway to use when DHCP is off" ); cli::value< std::string > dhcp_arg( "dhcp", "on/off", "on", "DHCP dynamic IP discovery 'on' or 'off'" ); cli::value< uint32_t > dhcp_timeout_arg( "dhcp-timeout", "seconds", 30, "Seconds before DHCP times out and falls back to a static IP" ); cli::value< uint32_t > link_timeout_arg( "link-timeout", "milliseconds", 4000, "Milliseconds before --eth-first link times out and falls back to USB" ); cli::value< int > domain_id_arg( "domain-id", "0-232", 0, "DDS Domain ID to use (default is 0)" ); - cli::flag usb_first_arg( "usb-first", "Prioritize USB before Ethernet" ); + cli::flag usb_first_arg( "usb-first", "Prioritize USB and fall back to Ethernet after link timeout" ); cli::flag eth_first_arg( "eth-first", "Prioritize Ethernet and fall back to USB after link timeout" ); cli::flag dynamic_priority_arg( "dynamic-priority", "Dynamically prioritize the last-working connection method (the default)" );