5 ms·
What's more interesting is that you can use two USB-TTL converters and debug / connect to another machine (or for example see the Linux kernel logs).
by denysvitali 4y ago
What's more interesting is that you can use two USB-TTL converters and debug / connect to another machine (or for example see the Linux kernel logs).
- snvzz 4y agoOutputting text on a serial port that's directly available as io ports or mmio is of course trivial. Unless I'm missing something important, there's no such mechanism for usb-ttl dongles. I'd much sooner trust netconsole than the whole usb stack, as sending an UDP packet while bypassing the whole network stack is surprisingly trivial. Just poke some registers. No interrupts needed.
- Nursie 4y agoThey tend to show up as ttys and be easily usable to get a linux login console after the kernel has booted. You're not going to be using them to interact with (say) the u-boot bootloader on an embedded board, but if your machine has disappeared off the network and you're pretty sure the kernel is at least booting, you can sometimes use one of these to figure out wtf has gone wrong.
- snvzz 4y agoYes, even if USB attached, a serial port is definitely useful to get a console when network does not work. What I meant is that it will likely not help debugging when there's kernel or hardware issues.
- johnwalkr 4y agoThat’s true but it’s a step up in your game from attaching a keyboard and monitor at first. You can also do this over Bluetooth pretty easily.
- matja 4y agoJust poking some registers to send an Ethernet frame kind of hand-waves all of the ACPI table lookup, AML parsing, PCIe root/bridge init, etc, so in that regard "mov dx,0x3f8 ; out dx,al" is more simple and reliable - USB needs all of the same PCI/PCIe stack also so is of course a nightmare :)
- Gordonjcp 4y agoNow what you do is, you get four of 'em, two wired back-to-back and two with their RX pins wired to the RX and TX pins of the first pair. Now you can connect two machines via serial, and sniff traffic with two serial ports on the third.
- snvzz 4y ago>sniff traffic You can just wire up a $10 logic analyzer, that way you can even deal with changing speeds and partial messages (e.g. reset during TX).