Skip to content

Concept2 PM5 Firmware Change In April 2023 Has Broken USB Functionality #5

@mlyonupdesigns

Description

@mlyonupdesigns

I am the developer of the PM5 firmware, and have been contacted by a user of PyRow indicating the firmware versions released on or about April 2023 no long work properly. The PM5 firmware versions affected are v34.000/173.000/212.000/257.000.

To summarize, I see in the source code (csafe_command.py) that there is logic to map messages to USB reports using length (snippet) below. The PM5 firmware change obsoleted the 63 byte report and added a 500 byte report in it's place. This change is reflected in the USB enumeration for the HID class, but since you have it hard-coded I suspect this is the source of the failure.

I think the easiest change is just to eliminate the the logic block relating to the 63 byte report and just support 21 byte and 121 byte report lengths. For your application it will have zero impact on performance. I sure your users would appreciate the fix so that they can move forward for current and future firmware versions.

Any questions, please reach out to me at mlyon@updesigns.com.

#report IDs
maxmessage = max(len(message) + 1, maxresponse)

if maxmessage <= 21:
    message.insert(0, 0x01)
    message += [0] * (21 - len(message))
elif maxmessage <= 63:
    message.insert(0, 0x04)
    message += [0] * (63 - len(message))
elif (len(message) + 1) <= 121:
    message.insert(0, 0x02)
    message += [0] * (121 - len(message))
    if maxresponse > 121:
        print "Response may be too long to recieve.  Max possible length " + str(maxresponse)
else:
    print "Message too long.  Message length " + str(len(message))
    message = []

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