From: Reto Buerki Date: Mon, 19 Aug 2019 09:47:05 +0000 (+0200) Subject: Use picocom to read serial in misc/xhcidbg-log X-Git-Url: https://git.codelabs.ch/?p=libxhcidbg.git;a=commitdiff_plain;h=64a7907f757962dfe854976f01f979af82eab53c Use picocom to read serial in misc/xhcidbg-log Separate configuration via stty and cat did not work very well, as initial characters could get lost. Use a simple terminal emulation program instead. --- diff --git a/README.md b/README.md index 719c2a4..a38b2b2 100644 --- a/README.md +++ b/README.md @@ -34,17 +34,9 @@ The debug capability should be visible as: For convenience, the `xhcidbc-log` shell script in the `misc/` directory can be used to gather debug output from the device. It uses the `inotifywait` utility (part of [*inotify-tools*][2]) to wait for the -device to be created and then display the output using `cat`. Either -execute the script as root or make sure the user has the necessary -access rights, e.g. is member of the `dialout` group. - -If there is no visible console output despite the serial device being present, -the tty setting may be incorrect. Issue the following command to adjust the -parameters: - - $ stty -F /dev/serial/by-id/usb-secunet_HW.DbC_1-if00-port0 raw -echo - -`stty` is part of the [*coreutils* software collection][3]. +device to be created and then displays the output using `picocom`. +Either execute the script as root or make sure the user has the +necessary access rights, e.g. is member of the `dialout` group. ## BIOS considerations @@ -66,4 +58,3 @@ debugging capability. To avoid any interference, the service should be stopped: [1]: https://www-ssl.intel.com/content/www/us/en/io/universal-serial-bus/extensible-host-controler-interface-usb-xhci.html [2]: https://github.com/rvoicilas/inotify-tools/wiki -[3]: https://www.gnu.org/software/coreutils/ diff --git a/misc/xhcidbg-log b/misc/xhcidbg-log index 6f1e574..3c96eb5 100755 --- a/misc/xhcidbg-log +++ b/misc/xhcidbg-log @@ -28,7 +28,7 @@ while true; do for f in "/dev/serial/by-id/usb-secunet_HW.DbC"*; do if [ -e "$f" ] ; then - cat "$f" + picocom -b 115200 -r -l "$f" break 2; else inotifywait -qe create /dev/serial/by-id 2>&1