• Re: Reading serial port with BASH only

    From Juan Antonio Bacallado@21:1/5 to All on Thu Feb 17 06:51:06 2022
    El miércoles, 22 de abril de 2009 a las 14:28:31 UTC+1, Tomáš Kavalek escribió:
    Hi all,
    the solutions was very simple, and here it is:
    #!/bin/bash
    # Port setting
    stty -F /dev/ttyS1 raw speed 9600
    # Loop
    while [ 1 ]; do
    READ=`dd if=/dev/ttyS1 count=1`
    echo $READ
    done

    Hi Tomas,

    really works to read from serial, could you help me I want to do something on bash to read and act like a daemon all the time like keyboard input, read what nfc near and enter character... And also bash script to write on it, i have tried

    WRITE=`dd if=code of=/dev/ttyS0 count=1`

    in code file is the number for example 051755F

    thank you in advance.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)