Jump to content

Glock24

Members
  • Posts

    11
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Glock24 reacted to Igor in Armbian loves Microsoft   
    Probably we should switch rather to https://vscodium.com/#install ?
  2. Like
    Glock24 reacted to Igor in Odroid HC4 does not recognize SATA HDDs   
    Great news! Thank you for trying. I will update images ASAP.
  3. Like
    Glock24 reacted to chwe in (Serial) console access via 'USB-UART/Gadget mode' on Linux/Windows/OSX   
    Access to a console can be mandatory when you SBC doesn't work as expected (e.g Network or HDMI output doesn't work). When SSH/Display access isn't possible access to console via UART is the best way to get a clue where your SBC hangs. This short tutorial should give you an introduction how this works. For some boards, armbian implements an USB gadget mode (a 'fake' serial console over microUSB) describen below. As a reminder an USB-UART bridge is always prefered over USB gadget mode whenever possible (UART get's initialized before the gadget driver and also before HDMI, means even if you don't get a proper output from HDMI or gadget mode console, it is possible that UART will give you the needed information).
     
    Prerequisites:
    We need an Terminal program to access the console. If you use Linux on your host system I prefer picocom (something like minicom will also do the job) which can be installed:
    on debian a like systems:
    sudo apt-get install picocom from arch community repo:
    https://www.archlinux.org/packages/community/x86_64/picocom/
     
    on fedora systems:
    yum install picocom on Mac OS X:
    brew install picocom on Widows we use PuTTY:
     
    https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
     
    UART USB Adapter:
    There are various USB-UART bridges e.g FT232 (and fakes of them, cause FDTI is expensive ), CH340/1,PL2303 or CP2102
    Normally it doesn't matter which one you use. I prefer the (probably fake) FDTI on the right side, but the CH341 does also a good job:

    The only thing which is needed is that the signal-level matches with your SBCs needs (this is mostly 3.3V expect some Odroids e.g HC1 which has only 1.8V!).  Most of these USB-UART bridges have jumpers for 5V and 3.3V, make sure that you use the 3.3V.  
    You've to figure out which pins on your SBC are debug UART (they've mostly a own 3 pin header, sometimes it's on the large pin header e.g. Tinkerboard) and then connect:
    GND --> GND RX --> TX TX --> RX You've to check dmesg (linux) or run devmgmt.msc (windows) to know which device you use. 
    Linux:
    [256597.311207] usb 3-2: Product: USB2.0-Serial [256597.402283] usbcore: registered new interface driver ch341 [256597.402341] usbserial: USB Serial support registered for ch341-uart [256597.402392] ch341 3-2:1.0: ch341-uart converter detected [256597.404012] usb 3-2: ch341-uart converter now attached to ttyUSB0 --> Device will be /dev/ttyUSB0
    Windows:
    for windows 10 (https://www.google.ch/search?client=opera&q=find+arduino+port+windows+10&sourceid=opera&ie=UTF-8&oe=UTF-8)
    Something like the picture in USB Gadget Mode part of the tutorial should show up)
     
    Armbians default settings are (expect some RK devices):
    For Picocom:
    picocom -b 115200 -r -l /dev/ttyUSB0 and for some RK devices:
    picocom -b 1500000 -r -l /dev/ttyUSB0 For PuTTY:
    You've to set configuration in 'Serial'. COM11 is just an example and needs to be checked first, Speed (baud) needs to be changed when you deal with the few RK boards which need 1500000.

     
    OS X:
    TBD
    should be similar to Linux whereas the naming differs a bit. See: https://forum.odroid.com/viewtopic.php?f=53&t=841 as an example with minicom.
     
    Normally you connect the USB-UART bridge to your host computer (and the SBC) and start picocom/putty before you power the board to ensure you get the full bootlog and not only parts of it. 
     
    USB Gadget Mode
    Several board (see list) for which official armbian images exist (or csc images can be built) have no HDMI display. On those boards there's USB gadget mode driver activated so that you can have console access to them via USB connection. The following short tutorial describes how you can access to console from Linux (don't have a windows machine here at the moment, I may check it later):
     
    install picocom connect your board via USB to your host computer (it should be one which is able to power an SBC via its USB port) check dmesg for the device showing up:  [184372.603816] usb 3-2: Product: Gadget Serial v2.4 [184372.603818] usb 3-2: Manufacturer: Linux 4.14.65-sunxi with musb-hdrc [184372.660041] cdc_acm 3-2:2.0: ttyACM0: USB ACM device [184372.660402] usbcore: registered new interface driver cdc_acm [184372.660403] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters  
    connect to it via picocom (in this case 'picocom /dev/ttyACM0'):  chwe@chwe-acer:~$ picocom /dev/ttyACM0 picocom v2.2 port is : /dev/ttyACM0 flowcontrol : none baudrate is : 9600 parity is : none databits are : 8 stopbits are : 1 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv -E imap is : omap is : emap is : crcrlf,delbs, Type [C-a] [C-h] to see available commands Terminal ready Debian GNU/Linux 9 orangepizero ttyGS0 orangepizero login: root Password: You are required to change your password immediately (root enforced) Changing password for root. (current) UNIX password:  
    I assume if you use the same settings in something like putty on windows and you check which 'serial' device shows up in *where windows shows connected devices - I forgot it* you should be able to access it from windows (someone motivated may confirm this).  
    For Windows:
    run devmgmt.msc and search for the serial device (in this case COM3) and connect to it via PuTTY (thanks to @hjc):

    for windows 10 (https://www.google.ch/search?client=opera&q=find+arduino+port+windows+10&sourceid=opera&ie=UTF-8&oe=UTF-8):
    (even the tutorial is for arduinos, it should be similar for every 'COM device')
     
    Currently boards with USB gadget mode:
    bananapim2plus bananapim2zero nanopifire3 nanopim3 nanopineo2 nanopineocore2 nanopineoplus2 orangepizeroplus nanopiair nanopiduo nanopineo olimex-som204-a20 orangepilite orangepi-r1 orangepizero orangepizeroplus2-h3 orangepizeroplus2-h5 tritium-h3  
    The silly approach
    For those, who want to save 1$ for an USB-UART bridge, you can spend 10$ for an OrangePi Zero and use its spare UARTs to log into an other SBC...  SSH --> opi, ttl --> Tinkerboard
    For those loving text more than videos:
    SSH to your SBC sudo armbian-config --> system --> hardware  to activate an spare UART (in this case it was UART2, will give you ttyS2) reboot picocom -b 115200 -r -l /dev/ttyS2  
     

    See:  https://asciinema.org/a/B87EOGhc0gx9oikMAGEG94lXR

     
     
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines