Simple HID communication with concept2 PM3 (macOS)

Post questions and issues with Concept2 PM3 SDK
Post Reply
arjun_d3v
Paddler
Posts: 1
Joined: December 26th, 2023, 1:03 pm

Simple HID communication with concept2 PM3 (macOS)

Post by arjun_d3v » December 26th, 2023, 1:11 pm

I've tried a few commands without success to interface between my mac and a concept 3 PM3 connected to it. I can succesfully retrieve manufacturer, product, serial number but writing a command like 0x80 or 0x91 seems to return nothing. Am I missing something trivial? This is my code:

Code: Select all

import hid
from time import sleep

# List all connected HID devices
for device_dict in hid.enumerate():
    keys = list(device_dict.keys())
    keys.sort()
    for key in keys:
        print(f"{key}: {device_dict[key]}")
    print()


vendor_id = 0x17a4
product_id = 0x0001
data = [0x91]
try:
    with hid.Device(vendor_id, product_id) as h:
        print(f'Device manufacturer: {h.manufacturer}')
        print(f'Product: {h.product}')
        print(f'Serial Number: {h.serial}')
        h.write(bytes(data))
        sleep(0.1)
        data = h.read(64, timeout=1000)
        if data:
            print(data)

except Exception as e:
    print(e)


kingpeterking
Paddler
Posts: 13
Joined: September 11th, 2022, 10:07 am

Re: Simple HID communication with concept2 PM3 (macOS)

Post by kingpeterking » April 13th, 2024, 3:01 pm

Hi Arjun

An old post, maybe you have fixed already?

You have to also send a report ID at the start of the frame, a start frame indicator, checksum and end frame indicator

To send 0x91 - which is the get version command you should send
01 : F1 : 91 : 91 : F2
(colons only to show separation between values and not sent to PM)

Here
01 = Report ID
F1 = Start Frame
91 = Command
91 = Checksum (same as command for simple commands - see manual for how to calc for complex commands)
F2 = End Frame

Hope this helps and isn't too late.

Pete

Post Reply