JoyWarrior56FR1 Kommunikation unter Raspberry OS mit pyUSB

Dies ist das deutsche Forum für alle Themen um den JoyWarrior. Beiträge bitte nur in Deutsch.

Moderator: Guido Körber

Post Reply
M.T.E
Posts: 1
Joined: Fri Aug 13, 2021 1:33 pm

JoyWarrior56FR1 Kommunikation unter Raspberry OS mit pyUSB

Post by M.T.E »

Hallo,

ich möchte den JoyWarrior56FR1 mit meinem Raspberry ansprechen und den Beschleunigungssensor auslesen. Dazu verwende ich die Bibliothek PyUsb für Python 3.7.
Der Sensor wird erkannt und gibt ein Konfigurationsbericht zurück.
finding idVendor = 1984, idProduct= 4371
setting configuration
config set
trying to claim device
claimed device
device claimed
***********
intf= INTERFACE 0: Human Interface Device ====================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x1
bInterfaceClass : 0x3 Human Interface Device
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x5 Joystick
ENDPOINT 0x81: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x7 (7 bytes)
bInterval : 0xa
intf= INTERFACE 1: Human Interface Device ====================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x1
bAlternateSetting : 0x0
bNumEndpoints : 0x1
bInterfaceClass : 0x3 Human Interface Device
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x6 EP2IntPipe
ENDPOINT 0x82: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x82 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x8 (8 bytes)
bInterval : 0xa
***********
Es wird allerdings kein Output Endpoint erkannt, laut Datenblatt verstehe ich es so, dass Endpoint sich um den Beschleunigungsensor kümmert und Endpoint 4 um den Gyro.
Verstehe ich das Falsch oder müssen die Endpoints erst über die input Endpoints konfiguriert werden, ich kenne mich nicht besonders gut mit HID aus und bitte mein Unwissen zu entschuldigen.

Grüße
Martin
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: JoyWarrior56FR1 Kommunikation unter Raspberry OS mit pyUSB

Post by Guido Körber »

Der JW56FR1 gibt von sich aus die Daten über die Joystickschnittstelle aus, mit den abgespeicherten Parametern. Dafür muss nichts konfiguriert werden.
Post Reply