[python-win32] Python - connexion to serial port
Paul.Koning at dell.com
Paul.Koning at dell.com
Thu Jan 11 12:30:38 EST 2018
> On Jan 11, 2018, at 11:36 AM, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Thu, 11 Jan 2018 15:12:33 +0000, "Schoeni, Yann"
> <Yann.Schoeni at moutier.ch> declaimed the following:
>
>> I've a web application which needs to send data to a serial port. The webserver uses ajax to send data to a python script.
>>
>> The Python script uses the serial module to open, send data, and close the serial port.
>>
>> Is there a way to keep the serial port open ?
>>
>> Because for now, I open/close it between each transaction and I need to be 100% sure the data package will be send .. which is not the case with my actual python script.
I'd add one observation: while you can be reasonably sure that data is sent if you ask the serial port to send it, that does NOT mean it will be received. I suspect what is actually needed is a guarantee that the data is received.
A serial port does not offer that guarantee. If the hardware is clean, it only offers a high probability. If you want guarantees, you need a data checking and acknowledgement protocol, like DDCMP or TCP or DECnet.
paul
More information about the python-win32
mailing list