Python API for OS X

Post questions and issues with Concept2 PM3 SDK

Python API for OS X

Postby scuerda » December 2nd, 2016, 9:59 am

Hello all,

I am looking to hack around with data from my PM5 c2 and am running into a few problems.

First, I'm primarily a web developer and work mostly with python and javascript. I did a bit of C/C++ work about 20 years ago, but not enough to be very comfortable w/ the various C/C++ libraries/wrappers.

Second, I was playing around w/ PyRow. On my Ubuntu laptop it works great. However, on my mac desktop, I run into a number of usb permissions issues:

Code: Select all
Unable to claim interface: Access denied (insufficient permissions)


Some digging around indicated that the PyUSB library doesn't work on more recent OS X versions due to the way that USB devices are captured by the HID Manager. The canonical recommendation is to use the HIDAPI. I've been able to build it and use it to list and connect to the machine in Python using cython-hidapi.

However, the issues that I'm running into are that I cannot send / receive CSAFE commands. I've been trying to hack the PyRow scripts to use HID instead of PyUSB but without luck. I was able to use angrytongan's c2api command line tool to interface with the c2, so I know that it is possible to pass and receive commands. I suspect I'm just not facile enough w/ the HIDAPI to structure things correctly.

Has anyone else out there successfully communicated w/ pm5 on OS X using the HIDAPI?
scuerda
Paddler
 
Posts: 1
Joined: December 2nd, 2016, 9:18 am

Return to SDK Questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron