Skip to content

error in scan with pyhon 3.7.2  #93

@RiccardoBa

Description

@RiccardoBa

When I try to connect an RTU device during the scan I get an error because the instruction does not work. data[:4] is a string and then also if the base_addr is right systems not recognize it.
if data[:4] == b'SunS': self.base_addr = addr # print('device base address = %d' % self.base_addr) break

I've tried to change b'Suns' in 'Suns' but I get an error in a following statement.
This is my python code
import sunspec.core.client as client d = client.SunSpecClientDevice(client.RTU, 1, 'com9', baudrate=19200, timeout=10)

address, Com, baudrate and timeout and connection using sunspec dashboard works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions