public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Josh Hammond" <jhammond-qGaTmy9+pjn8wb0/L2CcF0B+6BGkLq7r@public.gmane.org>
To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: Accessing USB thermometer sensor
Date: Tue, 24 Jun 2008 09:18:01 +0200 (CEST)	[thread overview]
Message-ID: <c2b560bd4b1cb112f2ca096ee6858dc2.squirrel@webmail.vp44.net> (raw)

On Mon, June 23, 2008 9:20 am, Tosoni wrote:
>> the right direction to be able to read the temperature from command line?
>> Josh
>>
> Reading a serial device from the commannd line is not easy.
> First because each command you type closes the port after running and so it
> flushes buffers.
>
> I would suggest using shell parenthesis to group the commands
> Use stty to set the port to raw mode etc.
> Use 'echo' and 'dd' which is like 'cat' but much more configurable for
buffer sizes
> something like:
> ( stty 9600 raw; echo 'request'; dd bs=1 count=10 >response.out)
</dev/serialusb >&0
>
>

Unfortunately it doesn't seem to work.
This is the general output (I tried several tty speeds):

osmosis:/home/josh# ( stty 9600 raw; echo 'request'; dd bs=1 count=10
>response.out) < /dev/ttyUSB0 >&0

bash: echo: write error: Bad file descriptor
0+0 records in
0+0 records out
0 bytes (0 B) copied, 32.3506 s, 0.0 kB/s



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2008-06-24  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24  7:18 Josh Hammond [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-06-20 13:28 Accessing USB thermometer sensor Josh Hammond
2008-06-20 16:44 ` Glynn Clements
     [not found]   ` <18523.56941.116797.23150-o3XtBhA/DwwNEGAfyhIZ+pATpRlcFRyyAL8bYrjMMd8@public.gmane.org>
2008-06-20 16:50     ` Josh Hammond
     [not found]       ` <1f60185ec2ee200f67d7a12ee6cbf2fb.squirrel-2RFepEojUI3piBo0p4lDPw@public.gmane.org>
2008-06-21  9:02         ` Glynn Clements
2008-06-20 21:32 ` Chris Doré
2008-06-23  7:20 ` Tosoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2b560bd4b1cb112f2ca096ee6858dc2.squirrel@webmail.vp44.net \
    --to=jhammond-qgatmy9+pjn8wb0/l2ccf0b+6bgklq7r@public.gmane.org \
    --cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox