Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #803

Re: Reading serial port with BASH only

X-Received by 2002:a5d:64ac:0:b0:1e7:1415:2548 with SMTP id m12-20020a5d64ac000000b001e714152548mr2644016wrp.267.1645109467352; Thu, 17 Feb 2022 06:51:07 -0800 (PST)
X-Received by 2002:a25:1954:0:b0:61e:2bc:2ed7 with SMTP id 81-20020a251954000000b0061e02bc2ed7mr2730317ybz.507.1645109466778; Thu, 17 Feb 2022 06:51:06 -0800 (PST)
Path csiph.com!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups comp.os.linux.development.system
Date Thu, 17 Feb 2022 06:51:06 -0800 (PST)
In-Reply-To <ab090783-7175-47b9-bb4f-505eb831c046@y9g2000yqg.googlegroups.com>
Injection-Info google-groups.googlegroups.com; posting-host=194.224.76.242; posting-account=5Y2j8wkAAAA_zaZx888aB7VB8tQfvHpc
NNTP-Posting-Host 194.224.76.242
References <e5ca5159-aee4-4c0c-acdb-350568f124f2@f19g2000yqo.googlegroups.com> <gs1gvn$502$1@daniel-new.mch.sbs.de> <yKidna89bfSwA3nUnZ2dnUVZ_qKdnZ2d@posted.visi> <ab090783-7175-47b9-bb4f-505eb831c046@y9g2000yqg.googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <c5ca8a3f-672c-4776-8eed-e270f6d09b42n@googlegroups.com> (permalink)
Subject Re: Reading serial port with BASH only
From Juan Antonio Bacallado <juanantonio@centrosturisticos.com>
Injection-Date Thu, 17 Feb 2022 14:51:07 +0000
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.os.linux.development.system:803

Show key headers only | View raw


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.

Back to comp.os.linux.development.system | Previous | Next | Find similar


Thread

Re: Reading serial port with BASH only Juan Antonio Bacallado <juanantonio@centrosturisticos.com> - 2022-02-17 06:51 -0800

csiph-web