Skip to content

Problem with SDO Block Transfer (+workaround) #618

Description

@DrJMH

Hi, if i try a SDO download with block transfer like in the docs, but without crc, i.e.

FIRMWARE_PATH = '/path/to/firmware.bin'
FILESIZE = os.path.getsize(FIRMWARE_PATH)

with open(FIRMWARE_PATH, 'rb') as infile,
        node.sdo['Firmware'].open('wb', size=FILESIZE, block_transfer=True, request_crc_support=False) as outfile:

  # Iteratively transfer data without having to read all into memory
  while True:
      data = infile.read(1024)
      if not data:
          break
      outfile.write(data)

the transfer ends after one or two sub blocks. The last SDO from the client has the invalid payload=DD 00 00 00 00 00 00 00. The transfer is working without the 1024 chunk. Just use data = infile.read() or a chunk size of 7*1024.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions