sercomm-printserver 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/CHANGELOG.md +44 -2
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/CONFIG.md +31 -10
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/PKG-INFO +75 -38
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/README.md +68 -32
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/Manual-PS301.md +70 -33
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/adr/0001-memory-adapters-in-src.md +2 -2
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/config-keys.md +157 -147
- sercomm_printserver-0.2.2/docs/device-dump/PSINF-factory.txt +29 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/plans/2026-10-23-library-design.md +4 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/systemdesign/module_reference.md +37 -33
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/pyproject.toml +12 -16
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/__init__conf__.py +1 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/arp.py +4 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/config.py +4 -4
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/device.py +4 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/logging/setup.py +3 -2
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/raw/printer.py +55 -5
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/print_server.py +14 -7
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_types.py +4 -3
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/device_info.py +16 -5
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/conftest.py +14 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_neighbors.py +1 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_raw.py +52 -6
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_telnet.py +11 -9
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_arp_trick.py +4 -2
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_overrides.py +1 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_validation.py +1 -1
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_config_codec.py +9 -3
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_device_reports.py +15 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_e2e_device.py +90 -4
- sercomm_printserver-0.2.2/tests/test_e2e_printer.py +159 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_logging.py +12 -4
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_permission_defaults.py +3 -3
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_print_server.py +30 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_public_api.py +2 -2
- sercomm_printserver-0.2.2/tests/test_tcp_fixture_portability.py +153 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/.gitignore +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/LICENSE +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/device-dump/CONFIG.txt +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/device-dump/PSINF.txt +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/device-dump/fw6a10/CONFIG.txt +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/docs/device-dump/telnet-monitor.txt +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/__main__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/_device.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/device_config.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/discover.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/info.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/commands/printing.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/config_load.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/constants.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/context.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/envelope.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/exit_codes.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/main.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/root.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/safe_console.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/cli/typed_click.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/defaultconfig.d/40-layered-config.toml +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/defaultconfig.d/50-device.toml +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/defaultconfig.d/90-logging.toml +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/defaultconfig.toml +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/deploy.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/device_settings.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/display.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/loader.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/overrides.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/config/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/discovery/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/discovery/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/discovery/scanner.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/ftp/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/ftp/client.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/ftp/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/logging/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/logging/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/lpd/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/lpd/client.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/lpd/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/config.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/device.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/discovery.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/logging.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/memory/neighbors.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/neighbors/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/neighbors/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/neighbors/table.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/raw/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/raw/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/snmp/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/snmp/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/snmp/uptime.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/telnet/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/telnet/client.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/telnet/iac.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/telnet/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/tftp/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/tftp/client.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/adapters/tftp/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/arp_trick.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/discovery.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/ports.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/application/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/composition/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/composition/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/__init__.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_catalogue.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_codec.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_lines.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_model.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_reader.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/config_writer.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/device_files.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/endpoint.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/enums.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/errors.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/neighbor.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/port_status.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/domain/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/entry.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/src/sercomm_printserver/py.typed +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/fake_ftp_server.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/fake_lpd_server.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/fake_raw_server.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/fake_telnet_server.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/fake_tftp_server.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/layer_roots.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_ftp.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_lpd.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_snmp.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_adapter_tftp.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cache_effectiveness.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_arp.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_config.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_config_errors.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_core.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_device.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_env_file.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_envelope.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_exit_codes.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_cli_main_exit.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_config_catalogue.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_config_layer_isolation.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_config_overrides.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_coverage_database.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_declared_dependencies.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_deploy_mode_safety.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_deploy_permissions.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_discovery.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_display.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_enums.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_errors.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_logging_dotenv_isolation.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_memory_logging.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_metadata.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_metadata_sync.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_module_entry.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_packaging.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_platform_markers.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_port_status.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_ports.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_property_overrides.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_safe_console.py +0 -0
- {sercomm_printserver-0.2.0 → sercomm_printserver-0.2.2}/tests/test_settings_dotenv_numbers.py +0 -0
|
@@ -6,7 +6,49 @@ the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
## [0.2.
|
|
9
|
+
## [0.2.2] - 2026-10-30
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Requires `lib_log_rich>=8.1.2`, `lib_layered_config>=7.6.1` and `ipscout>=2.5.4`.
|
|
14
|
+
- The skill describes the RAW connect retry, the `--timeout` it needs, and how to tell a RAW port
|
|
15
|
+
stuck refusing from a device that is down.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `print raw` (and `RawPrinter.send`) retries a refused connect for up to 3 s, never longer than the
|
|
20
|
+
timeout, before reporting the device unreachable. A PS301 RAW port refuses a new connection for
|
|
21
|
+
about 1-2 s after the previous job closed, so the second of two jobs sent back to back failed
|
|
22
|
+
although nothing was wrong. Other connect errors still fail at once.
|
|
23
|
+
- When a RAW port refuses for the whole retry window, the error now says so and that a restart
|
|
24
|
+
(`reset`) clears a port stuck refusing. A PS301 has been measured refusing every RAW connect for
|
|
25
|
+
minutes while `status` showed the port idle, so the message is the only place this shows.
|
|
26
|
+
|
|
27
|
+
## [0.2.1] - 2026-10-27
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Requires `lib_log_rich>=8.0.1`. A key in the `[lib_log_rich]` section that lib_log_rich does
|
|
32
|
+
not know is now refused by name (`lib_log_rich.<key>: Extra inputs are not permitted`) and
|
|
33
|
+
logging starts with the defaults, as for any other refused setting. It used to be ignored, so a
|
|
34
|
+
misspelled setting silently kept its default.
|
|
35
|
+
- Requires `ipscout>=2.5.2`.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- A device after a factory reset can be reached, read and written again (measured on a PS301,
|
|
40
|
+
FW 6022). Its CONFIG holds an empty `BOX_NAME`, which was refused as out of range, so reading
|
|
41
|
+
or writing its configuration failed; an empty name now parses and round-trips, and a non-empty
|
|
42
|
+
one is still at most 19 characters without spaces. Its PSINF has an empty `Server Name:` line,
|
|
43
|
+
which was taken for a section title, and an AppleTalk line `:LaserWriter`, which was refused
|
|
44
|
+
as not `Key: Value`, so the ARP trick could not identify a reset device.
|
|
45
|
+
- A write the device refuses for want of a login, with no login configured, is retried with
|
|
46
|
+
the default name (`SCxxxxxx`) when the server name is empty; it was retried with the empty
|
|
47
|
+
name.
|
|
48
|
+
- An empty confirmation name no longer counts as repeating the empty server name of a reset
|
|
49
|
+
device, so `factory-default`, `password clear` and `store-ip` refuse it there as everywhere.
|
|
50
|
+
|
|
51
|
+
## [0.2.0] - 2026-10-26
|
|
10
52
|
|
|
11
53
|
### Changed
|
|
12
54
|
|
|
@@ -66,7 +108,7 @@ the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
|
66
108
|
and pyright's `extraPaths`, and gives pyright an execution environment rooted at `tests/`. A test
|
|
67
109
|
checks that every doctest collected from `src/` gets both redirects.
|
|
68
110
|
|
|
69
|
-
## [0.1.0] 2026-10-24
|
|
111
|
+
## [0.1.0] - 2026-10-24
|
|
70
112
|
|
|
71
113
|
### Added
|
|
72
114
|
|
|
@@ -314,7 +314,9 @@ replaces a destination that carries a bad value, or does not parse at all, witho
|
|
|
314
314
|
|
|
315
315
|
### Generate Example Configuration Files
|
|
316
316
|
|
|
317
|
-
Create
|
|
317
|
+
Create placeholder files that show where each configuration layer reads from. They hold a generic
|
|
318
|
+
`[service]` table, not this application's settings (see "Generated Files" below); for this
|
|
319
|
+
application's defaults with every option documented, use `config-deploy`.
|
|
318
320
|
|
|
319
321
|
#### Options Reference
|
|
320
322
|
|
|
@@ -453,13 +455,16 @@ Profile directories are **separate namespaces**. Configuration deployed with a p
|
|
|
453
455
|
The `[device]` section (shipped in `config.d/50-device.toml`) names the SerComm print server the
|
|
454
456
|
CLI talks to. Every key ships empty or at its default, so nothing is contacted until a host is set.
|
|
455
457
|
|
|
456
|
-
| Key | Type
|
|
457
|
-
|
|
458
|
-
| `host` | string
|
|
459
|
-
| `login` | string
|
|
460
|
-
| `password` | string
|
|
461
|
-
| `timeout` | float,
|
|
462
|
-
| `raw_port_base` | integer, 1-65535
|
|
458
|
+
| Key | Type | Default | Environment variable | Meaning |
|
|
459
|
+
|-----------------|---------------------|---------|-----------------------------------------------|----------------------------------------------------------------------------------------------------------|
|
|
460
|
+
| `host` | string | `""` | `SERCOMM_PRINTSERVER___DEVICE__HOST` | IPv4 address or host name of the print server |
|
|
461
|
+
| `login` | string | `""` | `SERCOMM_PRINTSERVER___DEVICE__LOGIN` | FTP login name; empty means "ask the device for its name first" (its default name after a factory reset) |
|
|
462
|
+
| `password` | string | `""` | `SERCOMM_PRINTSERVER___DEVICE__PASSWORD` | FTP password (factory default: none); shown as `***REDACTED***` by `config` |
|
|
463
|
+
| `timeout` | float, 0 < x <= 600 | `10.0` | `SERCOMM_PRINTSERVER___DEVICE__TIMEOUT` | Network timeout for one operation, in seconds |
|
|
464
|
+
| `raw_port_base` | integer, 1-65535 | `9100` | `SERCOMM_PRINTSERVER___DEVICE__RAW_PORT_BASE` | RAW (direct socket) port of logical printer L1; L2 and L3 use the next two, L4..L8 have none |
|
|
465
|
+
|
|
466
|
+
An unknown key or an invalid value is refused: every command that reads the configuration
|
|
467
|
+
(`config` and the device commands) exits 78 with `Error: device.<key>: <reason>`.
|
|
463
468
|
|
|
464
469
|
In a `.env` file the prefix is dropped:
|
|
465
470
|
|
|
@@ -476,6 +481,22 @@ sercomm-printserver config --section device
|
|
|
476
481
|
|
|
477
482
|
---
|
|
478
483
|
|
|
484
|
+
## Logging Section
|
|
485
|
+
|
|
486
|
+
The `[lib_log_rich]` section configures logging. `config-deploy` writes the shipped defaults with
|
|
487
|
+
a comment for every key to `config.d/90-logging.toml`; `config --section lib_log_rich` shows the
|
|
488
|
+
values in effect. The keys are those of lib_log_rich's own configuration: `service`,
|
|
489
|
+
`environment`, `console_level`, `backend_level`, `console_stream`, `console_format_preset`,
|
|
490
|
+
`console_format_template`, `console_theme`, `console_styles`, `force_color`, `no_color`,
|
|
491
|
+
`dump_format_preset`, `dump_format_template`, `enable_ring_buffer`, `ring_buffer_size`,
|
|
492
|
+
`enable_journald`, `enable_eventlog`, `enable_graylog`, `graylog_endpoint`, `graylog_level`,
|
|
493
|
+
`graylog_protocol`, `graylog_tls`, `queue_enabled`, `queue_maxsize`, `queue_full_policy`,
|
|
494
|
+
`queue_put_timeout`, `queue_stop_timeout`, `rate_limit`, `payload_limits` and `scrub_patterns`.
|
|
495
|
+
|
|
496
|
+
A key lib_log_rich does not know, or an invalid value, is refused by name: commands that read
|
|
497
|
+
the configuration exit 78 with `Error: lib_log_rich.<key>: <reason>`, and logging starts with the
|
|
498
|
+
package defaults. `info` and `config-deploy` still run.
|
|
499
|
+
|
|
479
500
|
## Environment Variables
|
|
480
501
|
|
|
481
502
|
Configuration can be overridden via environment variables using two methods:
|
|
@@ -598,10 +619,10 @@ This approach keeps your customizations separate and safe from updates while sti
|
|
|
598
619
|
You can import the configuration system directly in Python:
|
|
599
620
|
|
|
600
621
|
```python
|
|
601
|
-
import sercomm_printserver as
|
|
622
|
+
import sercomm_printserver as sp
|
|
602
623
|
|
|
603
624
|
# Get the merged configuration object
|
|
604
|
-
config =
|
|
625
|
+
config = sp.get_config()
|
|
605
626
|
print(config.as_dict())
|
|
606
627
|
|
|
607
628
|
# Access specific sections
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sercomm-printserver
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: CLI and Python library for SerComm-based network print servers (PS301 and OEM variants)
|
|
5
5
|
Project-URL: Homepage, https://github.com/bitranox/sercomm-printserver
|
|
6
6
|
Project-URL: Repository, https://github.com/bitranox/sercomm-printserver.git
|
|
@@ -23,10 +23,10 @@ Classifier: Programming Language :: Python :: 3.15
|
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
24
|
Requires-Python: >=3.10
|
|
25
25
|
Requires-Dist: click>=8.5.0
|
|
26
|
-
Requires-Dist: ipscout>=2.4
|
|
26
|
+
Requires-Dist: ipscout>=2.5.4
|
|
27
27
|
Requires-Dist: lib-cli-exit-tools>=2.4.1
|
|
28
|
-
Requires-Dist: lib-layered-config>=7.
|
|
29
|
-
Requires-Dist: lib-log-rich>=
|
|
28
|
+
Requires-Dist: lib-layered-config>=7.6.1
|
|
29
|
+
Requires-Dist: lib-log-rich>=8.1.2
|
|
30
30
|
Requires-Dist: orjson>=3.13.0
|
|
31
31
|
Requires-Dist: pydantic>=2.14.1
|
|
32
32
|
Requires-Dist: python-dotenv>=1.2.4
|
|
@@ -34,7 +34,7 @@ Requires-Dist: rich-click>=1.9.9
|
|
|
34
34
|
Provides-Extra: dev
|
|
35
35
|
Requires-Dist: bandit>=1.9.4; extra == 'dev'
|
|
36
36
|
Requires-Dist: build>=1.6.1; extra == 'dev'
|
|
37
|
-
Requires-Dist: certifi>=2026.10.
|
|
37
|
+
Requires-Dist: certifi>=2026.10.23; extra == 'dev'
|
|
38
38
|
Requires-Dist: click>=8.5.0; extra == 'dev'
|
|
39
39
|
Requires-Dist: filelock>=4.2.4; (python_version >= '3.11') and extra == 'dev'
|
|
40
40
|
Requires-Dist: hatchling>=1.32.4; extra == 'dev'
|
|
@@ -46,10 +46,11 @@ Requires-Dist: pip-audit>=2.10.1; extra == 'dev'
|
|
|
46
46
|
Requires-Dist: pynacl>=1.6.2; extra == 'dev'
|
|
47
47
|
Requires-Dist: pyright[nodejs]>=1.1.414; extra == 'dev'
|
|
48
48
|
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
|
|
49
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
|
|
49
50
|
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
50
51
|
Requires-Dist: python-multipart>=0.0.32; extra == 'dev'
|
|
51
52
|
Requires-Dist: rtoml>=0.14.0; extra == 'dev'
|
|
52
|
-
Requires-Dist: ruff>=0.17.
|
|
53
|
+
Requires-Dist: ruff>=0.17.2; extra == 'dev'
|
|
53
54
|
Requires-Dist: textual>=8.2.8; extra == 'dev'
|
|
54
55
|
Requires-Dist: twine>=7.0.0; extra == 'dev'
|
|
55
56
|
Requires-Dist: urllib3>=2.8.0; extra == 'dev'
|
|
@@ -73,16 +74,17 @@ Description-Content-Type: text/markdown
|
|
|
73
74
|
|
|
74
75
|
`sercomm-printserver` is a command-line tool and Python library for the SerComm family of
|
|
75
76
|
network print servers: the SerComm PS301 and the same hardware sold by TRENDnet, Perle, Netgear
|
|
76
|
-
and Linksys
|
|
77
|
+
and Linksys (one to three parallel ports, on some models a serial or USB port). It finds
|
|
77
78
|
them on the network, reads their status and configuration, changes settings, restarts them,
|
|
78
79
|
prints to them over LPD or raw sockets, and recovers a device whose address or password is
|
|
79
80
|
lost.
|
|
80
81
|
|
|
81
82
|
These devices are managed over FTP through "virtual files", and some of those files are actions:
|
|
82
83
|
reading `RESET` restarts the device, reading `DEFAULTC` wipes its settings. The tool never touches
|
|
83
|
-
them by accident. Anything that changes the device
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
them by accident. Anything that changes the device needs `--yes`, and `device-config set` /
|
|
85
|
+
`import` show the changes first. `factory-default`, `password clear`, `store-ip` and
|
|
86
|
+
`arp factory-reset` also need the device's name (`--confirm-name`). Every device command can
|
|
87
|
+
answer in JSON, so scripts get the same information people do.
|
|
86
88
|
|
|
87
89
|
What is known about the devices, models and firmware versions is in
|
|
88
90
|
[docs/Manual-PS301.md](docs/Manual-PS301.md) (German) and
|
|
@@ -97,9 +99,8 @@ recovery are written natively through [ipscout](https://github.com/bitranox/ipsc
|
|
|
97
99
|
- The project targets **Python 3.10 and newer**.
|
|
98
100
|
- Runtime dependencies are declared with >= floors in pyproject.toml. Dev
|
|
99
101
|
dependencies (pytest, ruff, pyright, bandit, etc.) are declared the same way.
|
|
100
|
-
- CI
|
|
101
|
-
`
|
|
102
|
-
alongside the latest available 3.x release provided by Actions.
|
|
102
|
+
- CI tests CPython 3.10 through 3.15 (taken from the pyproject classifiers) on
|
|
103
|
+
`ubuntu-latest` and `windows-latest`, and the newest of them on `macos-latest`.
|
|
103
104
|
|
|
104
105
|
---
|
|
105
106
|
|
|
@@ -112,13 +113,6 @@ recovery are written natively through [ipscout](https://github.com/bitranox/ipsc
|
|
|
112
113
|
# macOS/Linux
|
|
113
114
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
114
115
|
|
|
115
|
-
# Copy the actual binaries
|
|
116
|
-
cp /root/.local/bin/uv /usr/local/bin/uv
|
|
117
|
-
cp /root/.local/bin/uvx /usr/local/bin/uvx
|
|
118
|
-
|
|
119
|
-
# Ensure world-executable
|
|
120
|
-
chmod 755 /usr/local/bin/uv /usr/local/bin/uvx
|
|
121
|
-
|
|
122
116
|
# Windows (PowerShell)
|
|
123
117
|
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
124
118
|
```
|
|
@@ -172,7 +166,13 @@ To install the command line tool with a cooldown of your own (uv then skips any
|
|
|
172
166
|
than 7 days, transitive ones included), or to run the exact tree our CI tests:
|
|
173
167
|
|
|
174
168
|
```bash
|
|
175
|
-
uv tool install --exclude-newer "7 days"
|
|
169
|
+
uv tool install --exclude-newer "7 days" \
|
|
170
|
+
--exclude-newer-package sercomm-printserver=false \
|
|
171
|
+
--exclude-newer-package ipscout=false \
|
|
172
|
+
--exclude-newer-package lib-log-rich=false \
|
|
173
|
+
--exclude-newer-package lib-layered-config=false \
|
|
174
|
+
--exclude-newer-package lib-cli-exit-tools=false \
|
|
175
|
+
sercomm-printserver
|
|
176
176
|
git clone https://github.com/bitranox/sercomm-printserver.git && cd sercomm-printserver && uv sync --locked && uv run sercomm_printserver --help
|
|
177
177
|
```
|
|
178
178
|
|
|
@@ -182,8 +182,14 @@ an example) and commit the `uv.lock` that `uv add sercomm_printserver` writes:
|
|
|
182
182
|
```toml
|
|
183
183
|
[tool.uv]
|
|
184
184
|
exclude-newer = "7 days"
|
|
185
|
+
exclude-newer-package = {sercomm-printserver = false, ipscout = false, lib-log-rich = false, lib-layered-config = false, lib-cli-exit-tools = false}
|
|
185
186
|
```
|
|
186
187
|
|
|
188
|
+
The exemptions cover this package and the libraries it shares an author and a release process
|
|
189
|
+
with. Without them, a cooldown leaves out every release of this tool for its first week, and a
|
|
190
|
+
release whose floor names a young library version cannot be installed at all (uv answers "No
|
|
191
|
+
solution found"). Every other dependency keeps the cooldown.
|
|
192
|
+
|
|
187
193
|
---
|
|
188
194
|
|
|
189
195
|
## Configuration
|
|
@@ -216,9 +222,13 @@ sercomm-printserver discover [--network 192.0.2.0/24] # reads the FTP greeting
|
|
|
216
222
|
sercomm-printserver device-info # PSINF: names, MAC, firmware, addresses
|
|
217
223
|
sercomm-printserver firmware # firmware version, no login needed
|
|
218
224
|
sercomm-printserver status # port state and printer status
|
|
219
|
-
sercomm-printserver queue L1
|
|
225
|
+
sercomm-printserver queue L1 [--long] # LPD queue state; sends no print data
|
|
220
226
|
```
|
|
221
227
|
|
|
228
|
+
Without `--network`, `discover` searches this host's networks up to 4096 addresses in all and
|
|
229
|
+
lists the networks beyond that budget under `skipped`; a named `--network` larger than 4096
|
|
230
|
+
addresses is refused (exit 22). `--timeout` is the wait for each host's greeting (default 3 s).
|
|
231
|
+
|
|
222
232
|
### Configuration of the device
|
|
223
233
|
|
|
224
234
|
```bash
|
|
@@ -231,7 +241,10 @@ sercomm-printserver device-config import backup.cfg --yes
|
|
|
231
241
|
```
|
|
232
242
|
|
|
233
243
|
A write restarts the device and waits until it answers again, at its new address when the
|
|
234
|
-
change moved it.
|
|
244
|
+
change moved it. The wait reads the device's SNMP uptime (community `public`): a device whose
|
|
245
|
+
SNMP agent does not answer fails after 120 s with exit 69, even though the change was applied.
|
|
246
|
+
`--no-apply` stores the change without the restart; it takes effect at the next `reset --yes`.
|
|
247
|
+
`reset --no-wait` returns without waiting.
|
|
235
248
|
|
|
236
249
|
### Restart, password, factory settings
|
|
237
250
|
|
|
@@ -240,9 +253,16 @@ sercomm-printserver reset --yes
|
|
|
240
253
|
sercomm-printserver password set --yes # hidden prompt, or --from-file FILE
|
|
241
254
|
sercomm-printserver password clear --yes --confirm-name PS_EXAMPLE
|
|
242
255
|
sercomm-printserver store-ip --yes --confirm-name PS_EXAMPLE
|
|
243
|
-
sercomm-printserver factory-default --yes --confirm-name PS_EXAMPLE
|
|
256
|
+
sercomm-printserver factory-default --yes --confirm-name PS_EXAMPLE
|
|
244
257
|
```
|
|
245
258
|
|
|
259
|
+
After `factory-default` the device restarts with its stored address set to 0.0.0.0, DHCP
|
|
260
|
+
switched on and its name empty. It answers wherever a DHCP server puts it (measured: the old
|
|
261
|
+
address again, so the address alone does not show the reset happened). Without a DHCP server it
|
|
262
|
+
has no usable address: bring it back with `arp assign-ip`. Its login is then the default name
|
|
263
|
+
`SC` plus the last six hex digits of its MAC, and `--confirm-name` takes only that name. Export
|
|
264
|
+
its configuration first (`device-config export`) if you want to restore it afterwards.
|
|
265
|
+
|
|
246
266
|
A password does not protect these devices: the firmware lets anyone on the network clear it
|
|
247
267
|
without logging in. Keep them on a network you trust.
|
|
248
268
|
|
|
@@ -256,14 +276,20 @@ sercomm-printserver print raw 1 page.prn # RAW port of logical pr
|
|
|
256
276
|
|
|
257
277
|
Only L1..L3 have a RAW port, and RAW data goes wherever that logical printer is routed, just like
|
|
258
278
|
an LPD job. Data that no printer takes stays queued and keeps the port busy until a restart
|
|
259
|
-
(`reset --yes`), so never send a test
|
|
279
|
+
(`reset --yes`), so never send a test job, LPD or RAW, to a port without a printer. An LPD job
|
|
280
|
+
there fails after `--timeout` with exit 76, because the device holds back its acknowledgement.
|
|
281
|
+
`print lpd` names the job `job` unless `--job-name` says otherwise.
|
|
260
282
|
|
|
261
283
|
### A device without a usable address
|
|
262
284
|
|
|
263
285
|
The device answers any address this host maps to its MAC, which is how the vendor manuals
|
|
264
286
|
configure a new unit ("ARP trick"). `arp` borrows a free address in this host's subnet for the
|
|
265
|
-
call and removes the ARP entry afterwards. It needs root (or `CAP_NET_ADMIN
|
|
266
|
-
|
|
287
|
+
call and removes the ARP entry afterwards. It needs root on Linux (or both `CAP_NET_ADMIN`, to
|
|
288
|
+
write the ARP entry, and `CAP_NET_RAW`, to check by an ARP request that the address is free), root
|
|
289
|
+
on macOS, or Administrator on Windows. An address another machine holds, or one this host cannot
|
|
290
|
+
check, is refused before anything is written (exit 22 and 13). `--interface` picks the network
|
|
291
|
+
interface; `assign-ip` keeps the device's netmask and gateway unless `--netmask` / `--gateway`
|
|
292
|
+
are given, and always switches DHCP off.
|
|
267
293
|
|
|
268
294
|
```bash
|
|
269
295
|
sudo sercomm-printserver arp reach --mac 00:c0:02:12:34:56 --ip 192.0.2.77
|
|
@@ -273,21 +299,30 @@ sudo sercomm-printserver arp factory-reset --mac 00:c0:02:12:34:56 --ip 192.0.2.
|
|
|
273
299
|
|
|
274
300
|
### JSON and exit codes
|
|
275
301
|
|
|
276
|
-
Every device command takes `--json` or `--json-bare
|
|
302
|
+
Every device command takes `--json` (indented) or `--json-bare` (one line). stdout then carries
|
|
303
|
+
only the envelope; anything meant for a person goes to stderr. Success and failure look like this:
|
|
277
304
|
|
|
278
305
|
```json
|
|
279
|
-
{"ok":
|
|
306
|
+
{"ok":true,"command":"firmware","data":{"host":"192.0.2.52","firmware":"6022"},"skipped":[]}
|
|
307
|
+
{"ok":false,"command":"firmware","error":"ConfigurationError","message":"no device given: pass --host or set [device] host in the configuration"}
|
|
280
308
|
```
|
|
281
309
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
|
286
|
-
|
|
287
|
-
|
|
|
288
|
-
|
|
|
289
|
-
|
|
|
290
|
-
|
|
|
310
|
+
A usage error (an unknown option, `print raw 4`) is reported by the command-line parser before
|
|
311
|
+
any JSON is written: exit 2 and a usage message on stderr. Exit codes do not depend on the format.
|
|
312
|
+
|
|
313
|
+
| Exit code | Meaning |
|
|
314
|
+
|-----------|------------------------------------------------------------------------------|
|
|
315
|
+
| 0 | done |
|
|
316
|
+
| 1 | any other failure, such as an ARP table this host could not change |
|
|
317
|
+
| 2 | usage error: a missing or invalid option or argument |
|
|
318
|
+
| 13 | this host lacks a right (`arp`: the ARP table or sending an ARP request; |
|
|
319
|
+
| | `config-deploy`: a system dir) |
|
|
320
|
+
| 22 | invalid argument |
|
|
321
|
+
| 69 | the device did not answer, or did not come back after a restart |
|
|
322
|
+
| 76 | the device answered something this firmware family does not send, or stored |
|
|
323
|
+
| | a value other than the one sent (rare: run the command again) |
|
|
324
|
+
| 77 | refused: confirmation missing, the device wants a login, or a wrong password |
|
|
325
|
+
| 78 | configuration error, such as no device address |
|
|
291
326
|
|
|
292
327
|
### Python
|
|
293
328
|
|
|
@@ -309,6 +344,8 @@ sercomm-printserver config # the merged configuration
|
|
|
309
344
|
sercomm-printserver config --section device
|
|
310
345
|
sercomm-printserver config-deploy --target user # -> ~/.config/sercomm-printserver/config.toml
|
|
311
346
|
sercomm-printserver --set device.host=192.0.2.52 status
|
|
347
|
+
sercomm-printserver config-generate-examples --destination ./examples # one placeholder file per layer
|
|
348
|
+
sercomm-printserver info # package metadata (name, version, ...)
|
|
312
349
|
```
|
|
313
350
|
|
|
314
351
|
See [CONFIG.md](CONFIG.md) for the precedence, profiles and every key.
|
|
@@ -14,16 +14,17 @@
|
|
|
14
14
|
|
|
15
15
|
`sercomm-printserver` is a command-line tool and Python library for the SerComm family of
|
|
16
16
|
network print servers: the SerComm PS301 and the same hardware sold by TRENDnet, Perle, Netgear
|
|
17
|
-
and Linksys
|
|
17
|
+
and Linksys (one to three parallel ports, on some models a serial or USB port). It finds
|
|
18
18
|
them on the network, reads their status and configuration, changes settings, restarts them,
|
|
19
19
|
prints to them over LPD or raw sockets, and recovers a device whose address or password is
|
|
20
20
|
lost.
|
|
21
21
|
|
|
22
22
|
These devices are managed over FTP through "virtual files", and some of those files are actions:
|
|
23
23
|
reading `RESET` restarts the device, reading `DEFAULTC` wipes its settings. The tool never touches
|
|
24
|
-
them by accident. Anything that changes the device
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
them by accident. Anything that changes the device needs `--yes`, and `device-config set` /
|
|
25
|
+
`import` show the changes first. `factory-default`, `password clear`, `store-ip` and
|
|
26
|
+
`arp factory-reset` also need the device's name (`--confirm-name`). Every device command can
|
|
27
|
+
answer in JSON, so scripts get the same information people do.
|
|
27
28
|
|
|
28
29
|
What is known about the devices, models and firmware versions is in
|
|
29
30
|
[docs/Manual-PS301.md](docs/Manual-PS301.md) (German) and
|
|
@@ -38,9 +39,8 @@ recovery are written natively through [ipscout](https://github.com/bitranox/ipsc
|
|
|
38
39
|
- The project targets **Python 3.10 and newer**.
|
|
39
40
|
- Runtime dependencies are declared with >= floors in pyproject.toml. Dev
|
|
40
41
|
dependencies (pytest, ruff, pyright, bandit, etc.) are declared the same way.
|
|
41
|
-
- CI
|
|
42
|
-
`
|
|
43
|
-
alongside the latest available 3.x release provided by Actions.
|
|
42
|
+
- CI tests CPython 3.10 through 3.15 (taken from the pyproject classifiers) on
|
|
43
|
+
`ubuntu-latest` and `windows-latest`, and the newest of them on `macos-latest`.
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
@@ -53,13 +53,6 @@ recovery are written natively through [ipscout](https://github.com/bitranox/ipsc
|
|
|
53
53
|
# macOS/Linux
|
|
54
54
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
55
55
|
|
|
56
|
-
# Copy the actual binaries
|
|
57
|
-
cp /root/.local/bin/uv /usr/local/bin/uv
|
|
58
|
-
cp /root/.local/bin/uvx /usr/local/bin/uvx
|
|
59
|
-
|
|
60
|
-
# Ensure world-executable
|
|
61
|
-
chmod 755 /usr/local/bin/uv /usr/local/bin/uvx
|
|
62
|
-
|
|
63
56
|
# Windows (PowerShell)
|
|
64
57
|
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
65
58
|
```
|
|
@@ -113,7 +106,13 @@ To install the command line tool with a cooldown of your own (uv then skips any
|
|
|
113
106
|
than 7 days, transitive ones included), or to run the exact tree our CI tests:
|
|
114
107
|
|
|
115
108
|
```bash
|
|
116
|
-
uv tool install --exclude-newer "7 days"
|
|
109
|
+
uv tool install --exclude-newer "7 days" \
|
|
110
|
+
--exclude-newer-package sercomm-printserver=false \
|
|
111
|
+
--exclude-newer-package ipscout=false \
|
|
112
|
+
--exclude-newer-package lib-log-rich=false \
|
|
113
|
+
--exclude-newer-package lib-layered-config=false \
|
|
114
|
+
--exclude-newer-package lib-cli-exit-tools=false \
|
|
115
|
+
sercomm-printserver
|
|
117
116
|
git clone https://github.com/bitranox/sercomm-printserver.git && cd sercomm-printserver && uv sync --locked && uv run sercomm_printserver --help
|
|
118
117
|
```
|
|
119
118
|
|
|
@@ -123,8 +122,14 @@ an example) and commit the `uv.lock` that `uv add sercomm_printserver` writes:
|
|
|
123
122
|
```toml
|
|
124
123
|
[tool.uv]
|
|
125
124
|
exclude-newer = "7 days"
|
|
125
|
+
exclude-newer-package = {sercomm-printserver = false, ipscout = false, lib-log-rich = false, lib-layered-config = false, lib-cli-exit-tools = false}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
The exemptions cover this package and the libraries it shares an author and a release process
|
|
129
|
+
with. Without them, a cooldown leaves out every release of this tool for its first week, and a
|
|
130
|
+
release whose floor names a young library version cannot be installed at all (uv answers "No
|
|
131
|
+
solution found"). Every other dependency keeps the cooldown.
|
|
132
|
+
|
|
128
133
|
---
|
|
129
134
|
|
|
130
135
|
## Configuration
|
|
@@ -157,9 +162,13 @@ sercomm-printserver discover [--network 192.0.2.0/24] # reads the FTP greeting
|
|
|
157
162
|
sercomm-printserver device-info # PSINF: names, MAC, firmware, addresses
|
|
158
163
|
sercomm-printserver firmware # firmware version, no login needed
|
|
159
164
|
sercomm-printserver status # port state and printer status
|
|
160
|
-
sercomm-printserver queue L1
|
|
165
|
+
sercomm-printserver queue L1 [--long] # LPD queue state; sends no print data
|
|
161
166
|
```
|
|
162
167
|
|
|
168
|
+
Without `--network`, `discover` searches this host's networks up to 4096 addresses in all and
|
|
169
|
+
lists the networks beyond that budget under `skipped`; a named `--network` larger than 4096
|
|
170
|
+
addresses is refused (exit 22). `--timeout` is the wait for each host's greeting (default 3 s).
|
|
171
|
+
|
|
163
172
|
### Configuration of the device
|
|
164
173
|
|
|
165
174
|
```bash
|
|
@@ -172,7 +181,10 @@ sercomm-printserver device-config import backup.cfg --yes
|
|
|
172
181
|
```
|
|
173
182
|
|
|
174
183
|
A write restarts the device and waits until it answers again, at its new address when the
|
|
175
|
-
change moved it.
|
|
184
|
+
change moved it. The wait reads the device's SNMP uptime (community `public`): a device whose
|
|
185
|
+
SNMP agent does not answer fails after 120 s with exit 69, even though the change was applied.
|
|
186
|
+
`--no-apply` stores the change without the restart; it takes effect at the next `reset --yes`.
|
|
187
|
+
`reset --no-wait` returns without waiting.
|
|
176
188
|
|
|
177
189
|
### Restart, password, factory settings
|
|
178
190
|
|
|
@@ -181,9 +193,16 @@ sercomm-printserver reset --yes
|
|
|
181
193
|
sercomm-printserver password set --yes # hidden prompt, or --from-file FILE
|
|
182
194
|
sercomm-printserver password clear --yes --confirm-name PS_EXAMPLE
|
|
183
195
|
sercomm-printserver store-ip --yes --confirm-name PS_EXAMPLE
|
|
184
|
-
sercomm-printserver factory-default --yes --confirm-name PS_EXAMPLE
|
|
196
|
+
sercomm-printserver factory-default --yes --confirm-name PS_EXAMPLE
|
|
185
197
|
```
|
|
186
198
|
|
|
199
|
+
After `factory-default` the device restarts with its stored address set to 0.0.0.0, DHCP
|
|
200
|
+
switched on and its name empty. It answers wherever a DHCP server puts it (measured: the old
|
|
201
|
+
address again, so the address alone does not show the reset happened). Without a DHCP server it
|
|
202
|
+
has no usable address: bring it back with `arp assign-ip`. Its login is then the default name
|
|
203
|
+
`SC` plus the last six hex digits of its MAC, and `--confirm-name` takes only that name. Export
|
|
204
|
+
its configuration first (`device-config export`) if you want to restore it afterwards.
|
|
205
|
+
|
|
187
206
|
A password does not protect these devices: the firmware lets anyone on the network clear it
|
|
188
207
|
without logging in. Keep them on a network you trust.
|
|
189
208
|
|
|
@@ -197,14 +216,20 @@ sercomm-printserver print raw 1 page.prn # RAW port of logical pr
|
|
|
197
216
|
|
|
198
217
|
Only L1..L3 have a RAW port, and RAW data goes wherever that logical printer is routed, just like
|
|
199
218
|
an LPD job. Data that no printer takes stays queued and keeps the port busy until a restart
|
|
200
|
-
(`reset --yes`), so never send a test
|
|
219
|
+
(`reset --yes`), so never send a test job, LPD or RAW, to a port without a printer. An LPD job
|
|
220
|
+
there fails after `--timeout` with exit 76, because the device holds back its acknowledgement.
|
|
221
|
+
`print lpd` names the job `job` unless `--job-name` says otherwise.
|
|
201
222
|
|
|
202
223
|
### A device without a usable address
|
|
203
224
|
|
|
204
225
|
The device answers any address this host maps to its MAC, which is how the vendor manuals
|
|
205
226
|
configure a new unit ("ARP trick"). `arp` borrows a free address in this host's subnet for the
|
|
206
|
-
call and removes the ARP entry afterwards. It needs root (or `CAP_NET_ADMIN
|
|
207
|
-
|
|
227
|
+
call and removes the ARP entry afterwards. It needs root on Linux (or both `CAP_NET_ADMIN`, to
|
|
228
|
+
write the ARP entry, and `CAP_NET_RAW`, to check by an ARP request that the address is free), root
|
|
229
|
+
on macOS, or Administrator on Windows. An address another machine holds, or one this host cannot
|
|
230
|
+
check, is refused before anything is written (exit 22 and 13). `--interface` picks the network
|
|
231
|
+
interface; `assign-ip` keeps the device's netmask and gateway unless `--netmask` / `--gateway`
|
|
232
|
+
are given, and always switches DHCP off.
|
|
208
233
|
|
|
209
234
|
```bash
|
|
210
235
|
sudo sercomm-printserver arp reach --mac 00:c0:02:12:34:56 --ip 192.0.2.77
|
|
@@ -214,21 +239,30 @@ sudo sercomm-printserver arp factory-reset --mac 00:c0:02:12:34:56 --ip 192.0.2.
|
|
|
214
239
|
|
|
215
240
|
### JSON and exit codes
|
|
216
241
|
|
|
217
|
-
Every device command takes `--json` or `--json-bare
|
|
242
|
+
Every device command takes `--json` (indented) or `--json-bare` (one line). stdout then carries
|
|
243
|
+
only the envelope; anything meant for a person goes to stderr. Success and failure look like this:
|
|
218
244
|
|
|
219
245
|
```json
|
|
220
|
-
{"ok":
|
|
246
|
+
{"ok":true,"command":"firmware","data":{"host":"192.0.2.52","firmware":"6022"},"skipped":[]}
|
|
247
|
+
{"ok":false,"command":"firmware","error":"ConfigurationError","message":"no device given: pass --host or set [device] host in the configuration"}
|
|
221
248
|
```
|
|
222
249
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
250
|
+
A usage error (an unknown option, `print raw 4`) is reported by the command-line parser before
|
|
251
|
+
any JSON is written: exit 2 and a usage message on stderr. Exit codes do not depend on the format.
|
|
252
|
+
|
|
253
|
+
| Exit code | Meaning |
|
|
254
|
+
|-----------|------------------------------------------------------------------------------|
|
|
255
|
+
| 0 | done |
|
|
256
|
+
| 1 | any other failure, such as an ARP table this host could not change |
|
|
257
|
+
| 2 | usage error: a missing or invalid option or argument |
|
|
258
|
+
| 13 | this host lacks a right (`arp`: the ARP table or sending an ARP request; |
|
|
259
|
+
| | `config-deploy`: a system dir) |
|
|
260
|
+
| 22 | invalid argument |
|
|
261
|
+
| 69 | the device did not answer, or did not come back after a restart |
|
|
262
|
+
| 76 | the device answered something this firmware family does not send, or stored |
|
|
263
|
+
| | a value other than the one sent (rare: run the command again) |
|
|
264
|
+
| 77 | refused: confirmation missing, the device wants a login, or a wrong password |
|
|
265
|
+
| 78 | configuration error, such as no device address |
|
|
232
266
|
|
|
233
267
|
### Python
|
|
234
268
|
|
|
@@ -250,6 +284,8 @@ sercomm-printserver config # the merged configuration
|
|
|
250
284
|
sercomm-printserver config --section device
|
|
251
285
|
sercomm-printserver config-deploy --target user # -> ~/.config/sercomm-printserver/config.toml
|
|
252
286
|
sercomm-printserver --set device.host=192.0.2.52 status
|
|
287
|
+
sercomm-printserver config-generate-examples --destination ./examples # one placeholder file per layer
|
|
288
|
+
sercomm-printserver info # package metadata (name, version, ...)
|
|
253
289
|
```
|
|
254
290
|
|
|
255
291
|
See [CONFIG.md](CONFIG.md) for the precedence, profiles and every key.
|