Author

Topic: [INFO]TTL serial to USB converters - a MinerMEDIC HOWTO (Read 60 times)

member
Activity: 166
Merit: 82
EET/NASA intern 2013 Bitmain/MicroBT/IPC cert
One to the most basic tools every tech/hacker/manager/noob must have for troubleshooting is a TTL to USB interface converter. This is the USB device that provides all mining machine control boards a way to communicate with the outside world when all else fails (read ethernet network).

The TTL Serial interface, TX/GND/RX(or just T/G/R) for Zynq based units, Pin 1(GND)(IS SQUARE), Pin 4,(RX), Pin 5(TX) on BeagleBone Black based units, is the most basic, most reliable way to communicate with any CPU. Internally this function is provided to the CPU by a piece of technology called a UART, so you'll se it referred to by that name too. This is an embedded CPU industry standard and applicable to every single control board made by anyone!

The data emanating from the TX pin starts flowing almost immediately upon startup and contains almost the same data contained in the kernel log but provides it way before the web interface has been initialized, Plus it is live( thus never requiring a "refresh"). All these reasons are why a Serial/UART/TTL to USB connection will always be used in troubleshooting if you have any expectation of a positive outcome.

To capture the data streaming in from the TTL wire to your USB converter and display it on your computer screen you need a terminal program .There are Sooooo many terminal software packages (putty, eggshell, teraterm just for starters)to choose from so, no surprise, there are just as many opinions upon which is best. These programs all have varying degrees of complexity and options which is why the REAL answer to the aforementioned question is NONE(at lease for Windows users) Wink. The best solution is to just run a few commands in windows PowerShell and all your data is nicely displaced in a windows in your screen. Placing the following script in a text document with the extension ".ps1" will do exactly what you need and do it beautifully. No installs. No wading through profiles and settings. NO MUFF! (source StackExchange) Don't forget to install your USB converter driver first(I like CP2102 based ones). You can find your devices COM number in Device Manager and you may also need to open File Explorer options to deselect ""Hide Extensions..." in order to rename that ps1 extension properly.

It is a display script only with no way to send key strokes to the control board but if you find you need to do that you are out of the BASIC scope of this posting and need a terminal emulator.

Code:
Write-Host "Select Serial Port"
$portName = Read-Host -Prompt 'Input Serial Device Name'
Write-Host "Using $portName..."

$port= new-Object System.IO.Ports.SerialPort $portName, 115200, None, 8, one
$port.Open()

Write-Output $port

for(;;)
{
    if ($port.IsOpen)
    {
        $data = $port.ReadLine()
        Write-Output $data
    }
}

I keep my script file on my desktop and right click "Run with Power Shell" to start it. It should be noted that the Bitmain Beaglebones are stripped down clones of the Beaglebone Black, for that reason you will need to solder on the omitted pins for the 3 serial lines, I harvest my pins from dead motherboards.

Jump to: