Hi, apologize, I have inverted the outputs in the original post.
Here the message formulated correctly:
I try to use the joystick in a patch. The joystick is a hid peripheral and the relative driver comes loaded in the system, this is dmesg:
input: USB HID v1.10 Joystick [Mega World Inter. USB GAME DEVICE CONTROLLER ] on usb-0000:03:0b.0-1
When I insert the "hid" object in the patch all is OK in fact the pd output print:
[hid] 0.4, written by Hans-Christoph Steiner hans@eds.org [hid] opened device 0 (/dev/input/event0): Mega World Inter. USB GAME DEVICE CONTROLLER
But when I touch the joystick, pd prints: "Segmentation fault" and quit itself.
pd-0.38-4 slackware with kernel 2.6.11.5
Lazzaro
Hmm, I can't think of anything immediately. Have you tried using the
joystick with any other program? Do other devices work, like the
mouse?
It would also be helpful if you used a version with the debug messages
on. You can do that in hid.c by swapping these two:
#define DEBUG(x) //#define DEBUG(x) x
to
//#define DEBUG(x) #define DEBUG(x) x
and recompiling. If you aren't set up to compile pd objects, I'll try
to compile one for you when I get a chance.
.hc
On Mar 31, 2005, at 4:04 AM, Lazzaro Nicolò Ciccolella wrote:
Hi, apologize, I have inverted the outputs in the original post.
Here the message formulated correctly:
I try to use the joystick in a patch. The joystick is a hid peripheral and the relative driver comes loaded
in the system, this is dmesg:input: USB HID v1.10 Joystick [Mega World Inter. USB GAME DEVICE
CONTROLLER ] on usb-0000:03:0b.0-1When I insert the "hid" object in the patch all is OK in fact the pd
output print:[hid] 0.4, written by Hans-Christoph Steiner hans@eds.org [hid] opened device 0 (/dev/input/event0): Mega World Inter. USB GAME
DEVICE CONTROLLERBut when I touch the joystick, pd prints: "Segmentation fault" and
quit itself.pd-0.38-4 slackware with kernel 2.6.11.5
Thanks for every aid
Lazzaro
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://iem.at/cgi-bin/mailman/listinfo/pd-list
http://at.or.at/hans/
Hans-Christoph Steiner ha scritto:
Hmm, I can't think of anything immediately. Have you tried using the
joystick with any other program?
yes, I use it with "torcs" (a game :) ) and all is OK.
It would also be helpful if you used a version with the debug messages
on. You can do that in hid.c by swapping these two:#define DEBUG(x) //#define DEBUG(x) x
to
//#define DEBUG(x) #define DEBUG(x) x
and recompiling.
Ok, in the next wek I try it and post the output.
.hc
Lazzaro
On Mar 31, 2005, at 4:04 AM, Lazzaro Nicolò Ciccolella wrote:
Hi, apologize, I have inverted the outputs in the original post.
Here the message formulated correctly:
I try to use the joystick in a patch. The joystick is a hid peripheral and the relative driver comes loaded
in the system, this is dmesg:input: USB HID v1.10 Joystick [Mega World Inter. USB GAME DEVICE
CONTROLLER ] on usb-0000:03:0b.0-1When I insert the "hid" object in the patch all is OK in fact the pd
output print:[hid] 0.4, written by Hans-Christoph Steiner hans@eds.org [hid] opened device 0 (/dev/input/event0): Mega World Inter. USB GAME DEVICE CONTROLLER
But when I touch the joystick, pd prints: "Segmentation fault" and
quit itself.pd-0.38-4 slackware with kernel 2.6.11.5
Thanks for every aid -- Lazzaro
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://iem.at/cgi-bin/mailman/listinfo/pd-list
http://at.or.at/hans/
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hans-Christoph Steiner ha scritto:
It would also be helpful if you used a version with the debug messages
on. You can do that in hid.c by swapping these two:#define DEBUG(x) //#define DEBUG(x) x
to
//#define DEBUG(x) #define DEBUG(x) x
and recompiling.
Hi, I have rebuilded following your instructions. I have created a patch with only the object "HID 3" and three messages "start" "stop" and "print".
when I open the patch:
" hid_setup hid_new [hid] 0.5, written by Hans-Christoph Steiner hans@eds.org hid_open [hid] opened device 3 (/dev/input/event3): Mega World Inter. USB GAME DEVICE CONTROLLER "
when I push the message "print":
" Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0' Device 1: 'ImPS/2 Generic Wheel Mouse' on '/dev/input/event1' Device 2: 'saa7134 IR (LifeView FlyVIDEO20' on '/dev/input/event2' Device 3: 'Mega World Inter. USB GAME DEVICE CONTROLLER ' on '/dev/input/event3'
Supported events:
syn syn_report Synchronization syn syn_config Synchronization syn ? Synchronization syn ? Synchronization
key btn_0 btn_trigger key btn_1 btn_thumb key btn_2 btn_thumb2 key btn_3 btn_top
abs abs_x Absolute Axis abs abs_y Absolute Axis abs abs_misc Absolute Axis
msc ? Miscellaneous
Detected: 4 Sync types 4 Key/Button types 3 Absolute Axis types 1 Misc types "
When I push the message "start":
" hid_start [hid] polling started "
When I touch the joystick, pd quit itself with the output "Segmentation fault" in consolle.
Now I am enough sure that the joystick comes managed correctly from linux becouse I have compiled the small test program "read example" (the example 10) from "http://www.frogmouth.net/hid-doco/c537.html" and it work fine:
bash-3.00# ./esempio /dev/input/event3 Event: time 1112609421.288484, type 4, code 4, value 65584 Event: time 1112609421.288486, type 3, code 0, value 72 Event: time 1112609421.288487, type 0, code 0, value 0 Event: time 1112609423.752072, type 4, code 4, value 65584 Event: time 1112609423.752074, type 3, code 0, value 70 Event: time 1112609423.752075, type 0, code 0, value 0 Event: time 1112609423.928042, type 4, code 4, value 65584 Event: time 1112609423.928043, type 3, code 0, value 72 Event: time 1112609423.928044, type 0, code 0, value 0 Event: time 1112609423.960036, type 4, code 4, value 65584 Event: time 1112609423.960037, type 3, code 0, value 74 Event: time 1112609423.960038, type 0, code 0, value 0 Event: time 1112609424.183998, type 4, code 4, value 65584 Event: time 1112609424.183999, type 3, code 0, value 72 Event: time 1112609424.184000, type 0, code 0, value 0 etc.. "
Lazzaro
Thanks for the full bug report, that will be very handy. On first
glance, I would guess that the problem is related to your joystick
reporting "sync" and "msc" event types. That's quite unusual for a
joystick. Is [hid] reporting the axes and buttons correctly?
If you could also send me the "lsusb -v" output for that device and the
Make/Model (or even better, a link to the product page).
.hc
On Apr 4, 2005, at 6:17 AM, Lazzaro Nicolò Ciccolella wrote:
Hans-Christoph Steiner ha scritto:
It would also be helpful if you used a version with the debug
messages on. You can do that in hid.c by swapping these two: #define DEBUG(x) //#define DEBUG(x) x to //#define DEBUG(x) #define DEBUG(x) x and recompiling.Hi, I have rebuilded following your instructions. I have created a patch with only the object "HID 3" and three messages "start" "stop" and "print".
when I open the patch:
" hid_setup hid_new [hid] 0.5, written by Hans-Christoph Steiner hans@eds.org hid_open [hid] opened device 3 (/dev/input/event3): Mega World Inter. USB GAME
DEVICE CONTROLLER "when I push the message "print":
" Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0' Device 1: 'ImPS/2 Generic Wheel Mouse' on '/dev/input/event1' Device 2: 'saa7134 IR (LifeView FlyVIDEO20' on '/dev/input/event2' Device 3: 'Mega World Inter. USB GAME DEVICE CONTROLLER ' on
'/dev/input/event3'Supported events:
TYPE CODE EVENT NAME
syn syn_report Synchronization syn syn_config Synchronization syn ? Synchronization syn ? Synchronization
TYPE CODE EVENT NAME
key btn_0 btn_trigger key btn_1 btn_thumb key btn_2 btn_thumb2 key btn_3 btn_top
TYPE CODE EVENT NAME
abs abs_x Absolute Axis abs abs_y Absolute Axis abs abs_misc Absolute Axis
TYPE CODE EVENT NAME
msc ? Miscellaneous
Detected: 4 Sync types 4 Key/Button types 3 Absolute Axis types 1 Misc types "
When I push the message "start":
" hid_start [hid] polling started "
When I touch the joystick, pd quit itself with the output
"Segmentation fault" in consolle.Now I am enough sure that the joystick comes managed correctly from
linux becouse I have compiled the small test program "read example"
(the example 10) from "http://www.frogmouth.net/hid-doco/c537.html"
and it work fine:bash-3.00# ./esempio /dev/input/event3 Event: time 1112609421.288484, type 4, code 4, value 65584 Event: time 1112609421.288486, type 3, code 0, value 72 Event: time 1112609421.288487, type 0, code 0, value 0 Event: time 1112609423.752072, type 4, code 4, value 65584 Event: time 1112609423.752074, type 3, code 0, value 70 Event: time 1112609423.752075, type 0, code 0, value 0 Event: time 1112609423.928042, type 4, code 4, value 65584 Event: time 1112609423.928043, type 3, code 0, value 72 Event: time 1112609423.928044, type 0, code 0, value 0 Event: time 1112609423.960036, type 4, code 4, value 65584 Event: time 1112609423.960037, type 3, code 0, value 74 Event: time 1112609423.960038, type 0, code 0, value 0 Event: time 1112609424.183998, type 4, code 4, value 65584 Event: time 1112609424.183999, type 3, code 0, value 72 Event: time 1112609424.184000, type 0, code 0, value 0 etc.. "
many thanks
Lazzaro
"Computer science is no more related to the computer than astronomy is
related to the telescope."
-Edsger Dykstra
Hans-Christoph Steiner ha scritto:
Thanks for the full bug report,
many thanks for your time !
that will be very handy. On first glance, I would guess that the problem is related to your joystick
reporting "sync" and "msc" event types. That's quite unusual for a
joystick.
Is [hid] reporting the axes and buttons correctly?
yes, it seems me
If you could also send me the "lsusb -v" output for that device and the
Make/Model (or even better, a link to the product page).
The joystick is a "made in China", low cost, device. http://www.mega-world.com Product Code: X7-35U Product Name: 4-BUTTON WITH THROTTLE USB JOYSTICK the link at the product page is: http://www.mega-world.com/zaspx/productd.aspx?productid=95&productcode=X...
This is the "lsusb -v" Bus 002 Device 002: ID 07b5:9904 Mega World International, Ltd Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x07b5 Mega World International, Ltd idProduct 0x9904 bcdDevice 3.00 iManufacturer 1 Mega World Inter. iProduct 2 USB GAME DEVICE CONTROLLER iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 Remote Wakeup MaxPower 20mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Devices bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 bytes 8 once bInterval 20 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 62 Report Descriptor: (length is 62) Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x04 ] 4 Joystick Item(Main ): Collection, data= [ 0x01 ] 1 Application Item(Global): Usage Page, data= [ 0x02 ] 2 Simulation Controls Item(Local ): Usage, data= [ 0xbb ] 187 Throttle Item(Global): Logical Minimum, data= [ 0x81 ] 129 Item(Global): Logical Maximum, data= [ 0x7f ] 127 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0x01 ] 1 Item(Main ): Input, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x01 ] 1 Pointer Item(Main ): Collection, data= [ 0x00 ] 0 Physical Item(Local ): Usage, data= [ 0x30 ] 48 Direction-X Item(Local ): Usage, data= [ 0x31 ] 49 Direction-Y Item(Global): Report Count, data= [ 0x02 ] 2 Item(Main ): Input, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Main ): End Collection, data=none Item(Global): Usage Page, data= [ 0x09 ] 9 Buttons Item(Local ): Usage Minimum, data= [ 0x01 ] 1 Button 1 (Primary) Item(Local ): Usage Maximum, data= [ 0x04 ] 4 (null) Item(Global): Logical Minimum, data= [ 0x00 ] 0 Item(Global): Logical Maximum, data= [ 0x01 ] 1 Item(Global): Report Size, data= [ 0x01 ] 1 Item(Global): Report Count, data= [ 0x04 ] 4 Item(Global): Unit Exponent, data= [ 0x00 ] 0 Item(Global): Unit, data= [ 0x00 ] 0 Item(Main ): Input, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Global): Report Size, data= [ 0x01 ] 1 Item(Global): Report Count, data= [ 0x04 ] 4 Item(Main ): Input, data= [ 0x03 ] 3 Constant Variable Absolute No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield Item(Main ): End Collection, data=none
.hc
Lazzaro