Skip to content

async serial server isn't explicitly started by StartAsyncSerialServer #1280

@alexrudd2

Description

@alexrudd2

Now my python modbus server isn't replying to the client talking to it on the serial port. It was working with 3.1.0, it fails with 3.1.1, and it's not because of the logging changes. I'll investigate...

Meanwhile, found a typo:
tcp.py line 213:
if self.params.host.startswith("unit:"):

"unit" should be "unix", since it's about unix sockets...

===

I found the issue, it works now.

In 3.1.0, StartAsyncSerialServer() calls server.start()
In 3.1.1 it does not and returns the server object.

So I added .start() in my code on the return value of StartAsyncSerialServer(), and now the server serves.

I wonder if this is a bug in my code, perhaps I was supposed to call .start(), but it feels weird that a function called StartAsyncSerialServer() does not actually start the server. Hmm...

Originally posted by @peufeu2 in #1279 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions