Serial connection with Linux and 'screen' aplication



  • To debug and configure the Omega a serial-connection is necessary.
    http://onion.io/getstarted describes how to install and use.

    My question now is, how to I set up 'screen' that it is possible to scroll in the terminal and catch the whole boot process for example.

    With my command screen -a /dev/ttyUSB0 115200 i just can copy the part displayed in the Terminal window.

    With other words i do not have the option to scroll eve the scroll-bar is there.

    I use SolydX (Debian) in a Virtual-box.

    Alternatively i checked out putty. There i can scroll but not copy the output into a Texeditor.

    Thanks in advance for any helpful tip's.



  • I always use putty and there you can select text and with ctrl+c you copy (works for me, it just puts an enter in the terminal) or in the title bar you can right click and then select "Copy all to clipboard".

    Edit: Maybe I should mention that I use Windows to run putty...



  • Yes ... windows seams to more comfortable to work with putty.

    As I use Linux i have to suffer a bit more ;) Especial with applications were have been made for Windows and where ported to Linux.

    So, i got a success more ... if i press the Ctrl key while do a right click on the mouse i got a menu where I can do a copy all. But I still cant paste it to a Editor.



  • @PIHU @Luciano-S Well worth considering on Windows as an alternative to PuTTy is mobaXterm - see http://mobaxterm.mobatek.net/
    Has a lot more features than PuTTy



  • Thx @Kit-Bishop , in Windows not seams to be a Problem. There i can copy and past the whole boot process from the Terminal. I miss it in Linux.



  • @Luciano-S Hadn't realised until I tried it just now, just how limited PuTTY is under Linux :-(

    I have an alternative suggestion for that seems to work well and is more flexible (this is based on my KUbuntu system but would probably apply to other versions of Linux):

    • Open a konsole session
    • Enter the command ssh root@192.168.3.1 (or whatever the IP address is of your Omega)
    • When prompted enter your Omega's password
    • Select text using mouse left button
    • Copy text via mouse right button menu or using ctrl-shift-c
    • Paste text via mouse right button menu or using ctrl-shift-v

    Hope this gives you a better experience :-)



  • @Kit-Bishop thx again. I know ssh to. Just if i wanna debug my omega, i want to see the log from beginning of booting. This just works with Serial connection. And btw. for ssh i need a IP Adress ... and if wireless not works ssh also not works.

    The request i made because of the "screen" application i need in Linux. I found a manual with lot of examples ... not it is never so comfortable as putty in Windows.

    The main problem i have in Screen is, i can just mark the content in the Terminal window ... there is a scroll-bar but it not moves ... so i cant scroll up to copy the whole boot-log.
    http://www.computerhope.com/unix/screen.htm


  • administrators

    In most Linux terminal applications, if you select text and middle-click, it should automatically paste the selected text.

    Also, when connecting with SSH, run dmesg to see all of the messages from the kernel that are usually displayed when connected via serial.
    But yes, if there is no wifi, no SSH connection :)



  • @Lazar-Demin said in Serial connection with Linux and 'screen' aplication:

    In most Linux terminal applications, if you select text and middle-click, it should automatically paste the selected text.

    I made a test with putty, marking the whole log works now (even with the mouse)... and yess ... also paste in to a text-editor works (middle mouse key/wheel). From there i can copy and past as i like.

    As workaround this would be a solution.
    I just say this because in the getstarted tutorial on onion.io you propose to use screen as application to communicate with the Omega. Might be an idea to change it to putty to?! As screen mostly is not pre installed.


  • administrators

    @Luciano-S. Oh I didn't know Putty had been ported to Linux??
    Which distro are you running? I thought they all came with screen



  • @Lazar-Demin Linux Mint LMDE (Debian Version) i checked also with the live CD of the Ubuntu version of Linux. There i had to install it too.

    I just say, if you need a full boot screenshot, a beginner will have problem to give this with screen.


  • administrators

    @Luciano-S. Ok, I've updated the Get Started Linux instructions to include the installation of screen.
    Thanks for the heads up!



  • @Lazar-Demin Thx.
    I also made a proposal on github to make a change in the tutorial.
    Instead to change the user rights for every port, we can add the user to the group dialout to work with the serial ports. So we can connect indefinite Omegas without fiddling around on the rigths for /dev/ttyUSB*

    -sudo chmod 666 /dev/ttyUSB0
    +sudo usermod -a -G dialout $USER
    

    (You may need to logout and back in for the new group to take effect.)

    {The plus + and minus- sign just indicates what i removed an added in github, it is not part of the command ;) }


  • administrators

    @Luciano-S. merged into the Get Started page, thanks! :)


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.