Using asyncio for serial port

J

james.time4tea

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
 
P

Phil Connell

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
 
M

Marko Rauhamaa

(e-mail address removed):
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top