I think I am starting to get somewhere. I think that hid should be looking for Device with a capital D
Code: Select all
>>> hid.Device(vid, pid)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/hid/__init__.py", line 132, in __init__
raise HIDException('unable to open device')
hid.HIDException: unable to open device
then upon importing board:
Code: Select all
File "<stdin>", line 1, in <module>
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/board.py", line 323, in <module>
from adafruit_blinka.board.qt2040_trinkey_u2if import *
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/adafruit_blinka/board/qt2040_trinkey_u2if.py", line 17, in <module>
pin.GP0._u2if_open_hid(0x239A, 0x0109)
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/adafruit_blinka/microcontroller/rp2040_u2if/pin.py", line 29, in _u2if_open_hid
rp2040_u2if.open(vid, pid)
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/adafruit_blinka/microcontroller/rp2040_u2if/rp2040_u2if.py", line 119, in open
self._hid = hid.Device()
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/hid/__init__.py", line 129, in __init__
raise ValueError('specify vid/pid or path')
ValueError: specify vid/pid or path
>>> vid = 0x239a
>>> pid = 0x0109
Code: Select all
>>> vid = 0x239a
>>> pid = 0x0109
>>> device = hid.Device(vid=vid, pid=pid)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/hid/__init__.py", line 132, in __init__
raise HIDException('unable to open device')
hid.HIDException: unable to open device
tried to pass as params but no dice... yet
I also tried this:
Code: Select all
>>> device_path = '/dev/tty.usbmodem14301'
>>> device = hid.Device(path=device_path)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dpuerto/Library/Python/3.9/lib/python/site-packages/hid/__init__.py", line 122, in __init__
self.__dev = hidapi.hid_open_path(path)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
Thinking that I will need to learn and invoke the Mac OSX Ventura equivalent of this:
1. sudo mkdir -p /etc/udev/rules.d/
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666", TAG+="uaccess", TAG+="udev-acl"' | sudo tee /etc/udev/rules.d/92-viia.rules
2. sudo udevadm control --reload-rules
3. sudo udevadm trigger