|
From: <py...@lo...> - 2005-04-16 10:50:33
|
Hi Thanks, I started playing with it. > My advice: > 1. look at the usb data when nothing happens (no effect played, joystick > not moving) Well, I get some "init", than nothing happens. > 2. look at the data when the joystick moves > 3. Identify packets describing the state of the stick. Those are not the > packets you are interested in. Well it's lots of data, trying to find a method for not (at least not fully) manual searchigh through URB-s, however joystick after startup emulates spring, dou You remember (or have it written) if there are any force - related information sent for this reason ? > 4. look at the data when effects are played I thought there was some effect tester/modeller with directX (direct input). I guess I was wrong (at least about directx9c), do You know anything (but plain C programs I could write) that allows playing custom effects ? > 5. Identify the packets that were not there in 2 and 1. Those are > probably force-feedback packets > 6. Change the parameters of the effects, look at the data, guess what > bytes encode what parameters Well, I'll try;). > I've already done 1 to 5, I was trying to do 6 for spring/friction > effects when my stick stopped working. > The packets for condition effects use the same pipe as packets for > constant force, they have a similar structure as well. > > You might want to install cygwin so that you get access to grep, sort... > they are usefull to sort and filter large anounts of data automatically. > 1. Well, I've done some sniffing fo far but results are not yet very clear, I'll have to find some reasonable method not using logitech - provided tester (since it does not generate custom effects - i guess - just shots, crashes and so on). Is there a ready-made tool to send custom packets/sequences of packets to the device, or I will have to write my own one ? (preferably linux one - not to interfere with windows drivers which seem to go crazy with just the sniffer). Correct me if I'm wrong, I started looking through the linux driver, to find (at leas more or less what to look for). In the kernel (source), in hid-lgff.c what stores effects is called "private". It's declared as a void pointer in input.h and it is allocated as lgff_devices structure in hid-lgff.c. When/(or maybe if) I find something useful I should fill this structure's fields with propper data (like it is done int privete->constant->field[0]...). lgff_device has (among other) elements: constant and rumble, but what about ramp, sine and so on? are they "struct lgff_effect effects[8]" ? (or at the moment there is just no room for them ? Well, I'm just starting to look through the source code to find out what and how is done, so my questions might be quite silly for now ;) ) Michal |