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


Groups > comp.lang.python > #65697 > unrolled thread

Using asyncio for serial port

Started byjames.time4tea@gmail.com
First post2014-02-08 15:42 -0800
Last post2014-02-11 18:42 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Using asyncio for serial port james.time4tea@gmail.com - 2014-02-08 15:42 -0800
    Re: Using asyncio for serial port Phil Connell <pconnell@gmail.com> - 2014-02-11 08:12 +0000
    Re: Using asyncio for serial port Marko Rauhamaa <marko@pacujo.net> - 2014-02-11 18:42 +0200

#65697 — Using asyncio for serial port

Fromjames.time4tea@gmail.com
Date2014-02-08 15:42 -0800
SubjectUsing asyncio for serial port
Message-ID<be970b74-f6a8-4d75-81d0-078c4ff681c7@googlegroups.com>
Hiya

I'm looking at using asyncio for creating an socket <-> serial protocol bridge, but looking at the current implementation of asyncio it looks to be quite socket specific.

I can't see any way to get it to support a simple serial device.

Any advice on where to proceed would be very much appreciated!

Thanks!

James

[toc] | [next] | [standalone]


#65894

FromPhil Connell <pconnell@gmail.com>
Date2014-02-11 08:12 +0000
Message-ID<mailman.6654.1392106337.18130.python-list@python.org>
In reply to#65697

[Multipart message — attachments visible in raw view] — view raw

On 8 Feb 2014 23:45, <james.time4tea@gmail.com> wrote:
>
>
> Hiya
>
> I'm looking at using asyncio for creating an socket <-> serial protocol
bridge, but looking at the current implementation of asyncio it looks to be
quite socket specific.
>
> I can't see any way to get it to support a simple serial device.
>
> Any advice on where to proceed would be very much appreciated!

You might have more luck on the python-tulip list/group.

Asyncio is still very new for most people :)

Cheers,
Phil

>
> Thanks!
>
> James
> --
> https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#65928

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-02-11 18:42 +0200
Message-ID<87d2itd2ii.fsf@elektro.pacujo.net>
In reply to#65697
james.time4tea@gmail.com:

> I'm looking at using asyncio for creating an socket <-> serial
> protocol bridge, but looking at the current implementation of asyncio
> it looks to be quite socket specific.
>
> I can't see any way to get it to support a simple serial device.

Never tried it, but if you can open the serial device and get its file
descriptor, you should be able to use

  http://docs.python.org/3.4/library/asyncio-eventloop.html#watch-file-descriptors

BTW, the specification doesn't indicate if the reader/writer callbacks
are level-triggered or edge-triggered. I'm afraid they are
level-triggered.

At any rate, asyncio looks like a real positive development in
Pythonland.


Marko

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web