͋sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget1/translations/zh_CN/input/devices/iforce-protocolmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/zh_TW/input/devices/iforce-protocolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/it_IT/input/devices/iforce-protocolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ja_JP/input/devices/iforce-protocolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ko_KR/input/devices/iforce-protocolmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/sp_SP/input/devices/iforce-protocolmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hIforce Protocolh]hIforce Protocol}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhK/var/lib/git/docbuild/linux/Documentation/input/devices/iforce-protocol.rsthKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h(Johann Deneux h]h paragraph)}(h'Johann Deneux h](hJohann Deneux <}(hhhhhNhNubh reference)}(hjohann.deneux@gmail.comh]hjohann.deneux@gmail.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:johann.deneux@gmail.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hJHome page at ``_h](h Home page at }(hjhhhNhNubh)}(h=``_h]h8http://web.archive.org/web/*/http://www.esil.univ-mrs.fr}(hjhhhNhNubah}(h]h ]h"]h$]h&]name8http://web.archive.org/web/*/http://www.esil.univ-mrs.frrefurij&uh1hhjubhtarget)}(h:h]h}(h]2http-web-archive-org-web-http-www-esil-univ-mrs-frah ]h"]8http://web.archive.org/web/*/http://www.esil.univ-mrs.frah$]h&]refurij&uh1j( referencedKhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh]h)}(hhh](h)}(h Additionsh]h Additions}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhKubh)}(hby Vojtech Pavlik. h]h)}(hby Vojtech Pavlik.h]hby Vojtech Pavlik.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjRubah}(h]h ]h"]h$]h&]uh1hhjAubeh}(h]h ]h"]h$]h&]uh1hhhhK hj>hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Introductionh]h Introduction}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhhhhhK ubh)}(hXThis document describes what I managed to discover about the protocol used to specify force effects to I-Force 2.0 devices. None of this information comes from Immerse. That's why you should not trust what is written in this document. This document is intended to help understanding the protocol. This is not a reference. Comments and corrections are welcome. To contact me, send an email to: johann.deneux@gmail.comh](hXThis document describes what I managed to discover about the protocol used to specify force effects to I-Force 2.0 devices. None of this information comes from Immerse. That’s why you should not trust what is written in this document. This document is intended to help understanding the protocol. This is not a reference. Comments and corrections are welcome. To contact me, send an email to: }(hjhhhNhNubh)}(hjohann.deneux@gmail.comh]hjohann.deneux@gmail.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:johann.deneux@gmail.comuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjvhhubhwarning)}(hI shall not be held responsible for any damage or harm caused if you try to send data to your I-Force device based on what you read in this document.h]h)}(hI shall not be held responsible for any damage or harm caused if you try to send data to your I-Force device based on what you read in this document.h]hI shall not be held responsible for any damage or harm caused if you try to send data to your I-Force device based on what you read in this document.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjvhhhhhNubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hPreliminary Notesh]hPreliminary Notes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hAll values are hexadecimal with big-endian encoding (msb on the left). Beware, values inside packets are encoded using little-endian. Bytes whose roles are unknown are marked ??? Information that needs deeper inspection is marked (?)h]hAll values are hexadecimal with big-endian encoding (msb on the left). Beware, values inside packets are encoded using little-endian. Bytes whose roles are unknown are marked ??? Information that needs deeper inspection is marked (?)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(hGeneral form of a packeth]hGeneral form of a packet}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK#ubh)}(hGThis is how packets look when the device uses the rs232 to communicate.h]hGThis is how packets look when the device uses the rs232 to communicate.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubhtbody)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h2Bh]h2B}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjOubah}(h]h ]h"]h$]h&]uh1jMhjJubjN)}(hhh]h)}(hOPh]hOP}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjfubah}(h]h ]h"]h$]h&]uh1jMhjJubjN)}(hhh]h)}(hLENh]hLEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj}ubah}(h]h ]h"]h$]h&]uh1jMhjJubjN)}(hhh]h)}(hDATAh]hDATA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jMhjJubjN)}(hhh]h)}(hCSh]hCS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jMhjJubeh}(h]h ]h"]h$]h&]uh1jHhjEubah}(h]h ]h"]h$]h&]uh1jChj ubeh}(h]h ]h"]h$]h&]colsKuh1j hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hACS is the checksum. It is equal to the exclusive or of all bytes.h]hACS is the checksum. It is equal to the exclusive or of all bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubh)}(hWhen using USB:h]hWhen using USB:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubj)}(hhh]j )}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubjD)}(hhh]jI)}(hhh](jN)}(hhh]h)}(hOPh]hOP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jMhjubjN)}(hhh]h)}(hDATAh]hDATA}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hj.ubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]colsKuh1j hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hThe 2B, LEN and CS fields have disappeared, probably because USB handles frames and data corruption is handled or insignificant.h]hThe 2B, LEN and CS fields have disappeared, probably because USB handles frames and data corruption is handled or insignificant.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hEFirst, I describe effects that are sent by the device to the computerh]hEFirst, I describe effects that are sent by the device to the computer}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubeh}(h]general-form-of-a-packetah ]h"]general form of a packetah$]h&]uh1hhjhhhhhK#ubeh}(h]preliminary-notesah ]h"]preliminary notesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDevice input stateh]hDevice input state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK9ubh)}(hUThis packet is used to indicate the state of each button and the value of each axis::h]hTThis packet is used to indicate the state of each button and the value of each axis:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubh literal_block)}(hXOP= 01 for a joystick, 03 for a wheel LEN= Varies from device to device 00 X-Axis lsb 01 X-Axis msb 02 Y-Axis lsb, or gas pedal for a wheel 03 Y-Axis msb, or brake pedal for a wheel 04 Throttle 05 Buttons 06 Lower 4 bits: Buttons Upper 4 bits: Hat 07 Rudderh]hXOP= 01 for a joystick, 03 for a wheel LEN= Varies from device to device 00 X-Axis lsb 01 X-Axis msb 02 Y-Axis lsb, or gas pedal for a wheel 03 Y-Axis msb, or brake pedal for a wheel 04 Throttle 05 Buttons 06 Lower 4 bits: Buttons Upper 4 bits: Hat 07 Rudder}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK>hjhhubeh}(h]device-input-stateah ]h"]device input stateah$]h&]uh1hhhhhhhhK9ubh)}(hhh](h)}(hDevice effects statesh]hDevice effects states}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKKubj)}(hX\OP= 02 LEN= Varies 00 ? Bit 1 (Value 2) is the value of the deadman switch 01 Bit 8 is set if the effect is playing. Bits 0 to 7 are the effect id. 02 ?? 03 Address of parameter block changed (lsb) 04 Address of parameter block changed (msb) 05 Address of second parameter block changed (lsb) ... depending on the number of parameter blocks updatedh]hX\OP= 02 LEN= Varies 00 ? Bit 1 (Value 2) is the value of the deadman switch 01 Bit 8 is set if the effect is playing. Bits 0 to 7 are the effect id. 02 ?? 03 Address of parameter block changed (lsb) 04 Address of parameter block changed (msb) 05 Address of second parameter block changed (lsb) ... depending on the number of parameter blocks updated}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKOhjhhubh)}(hhh](h)}(h Force effecth]h Force effect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKZubj)}(hXzOP= 01 LEN= 0e 00 Channel (when playing several effects at the same time, each must be assigned a channel) 01 Wave form Val 00 Constant Val 20 Square Val 21 Triangle Val 22 Sine Val 23 Sawtooth up Val 24 Sawtooth down Val 40 Spring (Force = f(pos)) Val 41 Friction (Force = f(velocity)) and Inertia (Force = f(acceleration)) 02 Axes affected and trigger Bits 4-7: Val 2 = effect along one axis. Byte 05 indicates direction Val 4 = X axis only. Byte 05 must contain 5a Val 8 = Y axis only. Byte 05 must contain b4 Val c = X and Y axes. Bytes 05 must contain 60 Bits 0-3: Val 0 = No trigger Val x+1 = Button x triggers the effect When the whole byte is 0, cancel the previously set trigger 03-04 Duration of effect (little endian encoding, in ms) 05 Direction of effect, if applicable. Else, see 02 for value to assign. 06-07 Minimum time between triggering. 08-09 Address of periodicity or magnitude parameters 0a-0b Address of attack and fade parameters, or ffff if none. *or* 08-09 Address of interactive parameters for X-axis, or ffff if not applicable 0a-0b Address of interactive parameters for Y-axis, or ffff if not applicable 0c-0d Delay before execution of effect (little endian encoding, in ms)h]hXzOP= 01 LEN= 0e 00 Channel (when playing several effects at the same time, each must be assigned a channel) 01 Wave form Val 00 Constant Val 20 Square Val 21 Triangle Val 22 Sine Val 23 Sawtooth up Val 24 Sawtooth down Val 40 Spring (Force = f(pos)) Val 41 Friction (Force = f(velocity)) and Inertia (Force = f(acceleration)) 02 Axes affected and trigger Bits 4-7: Val 2 = effect along one axis. Byte 05 indicates direction Val 4 = X axis only. Byte 05 must contain 5a Val 8 = Y axis only. Byte 05 must contain b4 Val c = X and Y axes. Bytes 05 must contain 60 Bits 0-3: Val 0 = No trigger Val x+1 = Button x triggers the effect When the whole byte is 0, cancel the previously set trigger 03-04 Duration of effect (little endian encoding, in ms) 05 Direction of effect, if applicable. Else, see 02 for value to assign. 06-07 Minimum time between triggering. 08-09 Address of periodicity or magnitude parameters 0a-0b Address of attack and fade parameters, or ffff if none. *or* 08-09 Address of interactive parameters for X-axis, or ffff if not applicable 0a-0b Address of interactive parameters for Y-axis, or ffff if not applicable 0c-0d Delay before execution of effect (little endian encoding, in ms)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK^hjhhubeh}(h] force-effectah ]h"] force effectah$]h&]uh1hhjhhhhhKZubh)}(hhh](h)}(hTime based parametersh]hTime based parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(hAttack and fadeh]hAttack and fade}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hOP= 02 LEN= 08 00-01 Address where to store the parameters 02-03 Duration of attack (little endian encoding, in ms) 04 Level at end of attack. Signed byte. 05-06 Duration of fade. 07 Level at end of fade.h]hOP= 02 LEN= 08 00-01 Address where to store the parameters 02-03 Duration of attack (little endian encoding, in ms) 04 Level at end of attack. Signed byte. 05-06 Duration of fade. 07 Level at end of fade.}hj+sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubeh}(h]attack-and-fadeah ]h"]attack and fadeah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h Magnitudeh]h Magnitude}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhKubj)}(h4OP= 03 LEN= 03 00-01 Address 02 Level. Signed byte.h]h4OP= 03 LEN= 03 00-01 Address 02 Level. Signed byte.}hjRsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjAhhubeh}(h] magnitudeah ]h"] magnitudeah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h Periodicityh]h Periodicity}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhKubj)}(hOP= 04 LEN= 07 00-01 Address 02 Magnitude. Signed byte. 03 Offset. Signed byte. 04 Phase. Val 00 = 0 deg, Val 40 = 90 degs. 05-06 Period (little endian encoding, in ms)h]hOP= 04 LEN= 07 00-01 Address 02 Magnitude. Signed byte. 03 Offset. Signed byte. 04 Phase. Val 00 = 0 deg, Val 40 = 90 degs. 05-06 Period (little endian encoding, in ms)}hjysbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhhubeh}(h] periodicityah ]h"] periodicityah$]h&]uh1hhj hhhhhKubeh}(h]time-based-parametersah ]h"]time based parametersah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hInteractive parametersh]hInteractive parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hOP= 05 LEN= 0a 00-01 Address 02 Positive Coeff 03 Negative Coeff 04+05 Offset (center) 06+07 Dead band (Val 01F4 = 5000 (decimal)) 08 Positive saturation (Val 0a = 1000 (decimal) Val 64 = 10000 (decimal)) 09 Negative saturationh]hOP= 05 LEN= 0a 00-01 Address 02 Positive Coeff 03 Negative Coeff 04+05 Offset (center) 06+07 Dead band (Val 01F4 = 5000 (decimal)) 08 Positive saturation (Val 0a = 1000 (decimal) Val 64 = 10000 (decimal)) 09 Negative saturation}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hThe encoding is a bit funny here: For coeffs, these are signed values. The maximum value is 64 (100 decimal), the min is 9c. For the offset, the minimum value is FE0C, the maximum value is 01F4. For the deadband, the minimum value is 0, the max is 03E8.h]hThe encoding is a bit funny here: For coeffs, these are signed values. The maximum value is 64 (100 decimal), the min is 9c. For the offset, the minimum value is FE0C, the maximum value is 01F4. For the deadband, the minimum value is 0, the max is 03E8.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]interactive-parametersah ]h"]interactive parametersah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hControlsh]hControls}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hOP= 41 LEN= 03 00 Channel 01 Start/Stop Val 00: Stop Val 01: Start and play once. Val 41: Start and play n times (See byte 02 below) 02 Number of iterations n.h]hOP= 41 LEN= 03 00 Channel 01 Start/Stop Val 00: Stop Val 01: Start and play once. Val 41: Start and play n times (See byte 02 below) 02 Number of iterations n.}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubeh}(h]controlsah ]h"]controlsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hInith]hInit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hQuerying featuresh]hQuerying features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hOP= ff Query command. Length varies according to the query type. The general format of this packet is: ff 01 QUERY [INDEX] CHECKSUM responses are of the same form: FF LEN QUERY VALUE_QUERIED CHECKSUM2 where LEN = 1 + length(VALUE_QUERIED)h]hOP= ff Query command. Length varies according to the query type. The general format of this packet is: ff 01 QUERY [INDEX] CHECKSUM responses are of the same form: FF LEN QUERY VALUE_QUERIED CHECKSUM2 where LEN = 1 + length(VALUE_QUERIED)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hhh](h)}(hQuery ram sizeh]hQuery ram size}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhKubj)}(hQUERY = 42 ('B'uffer size)h]hQUERY = 42 ('B'uffer size)}hj4sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj#hhubh)}(hThe device should reply with the same packet plus two additional bytes containing the size of the memory: ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available.h]hThe device should reply with the same packet plus two additional bytes containing the size of the memory: ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#hhubeh}(h]query-ram-sizeah ]h"]query ram sizeah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hQuery number of effectsh]hQuery number of effects}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhhhKubj)}(h QUERY = 4e ('N'umber of effects)h]h QUERY = 4e ('N'umber of effects)}hjisbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjXhhubh)}(hThe device should respond by sending the number of effects that can be played at the same time (one byte) ff 02 4e 14 CS would stand for 20 effects.h]hThe device should respond by sending the number of effects that can be played at the same time (one byte) ff 02 4e 14 CS would stand for 20 effects.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXhhubeh}(h]query-number-of-effectsah ]h"]query number of effectsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Vendor's idh]h Vendor’s id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hQUERY = 4d ('M'anufacturer)h]hQUERY = 4d ('M'anufacturer)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hQuery the vendors'id (2 bytes)h]h Query the vendors’id (2 bytes)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] vendor-s-idah ]h"] vendor's idah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Product idh]h Product id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj)}(hQUERY = 50 ('P'roduct)h]hQUERY = 50 ('P'roduct)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(hQuery the product id (2 bytes)h]hQuery the product id (2 bytes)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] product-idah ]h"] product idah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h Open deviceh]h Open device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj)}(hQUERY = 4f ('O'pen)h]hQUERY = 4f ('O'pen)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(hNo data returned.h]hNo data returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] open-deviceah ]h"] open deviceah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h Close deviceh]h Close device}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhMubj)}(hQUERY = 43 ('C')loseh]hQUERY = 43 ('C')lose}hj=sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj,hhubh)}(hNo data returned.h]hNo data returned.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,hhubeh}(h] close-deviceah ]h"] close deviceah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h Query effecth]h Query effect}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahhhhhMubj)}(hQUERY = 45 ('E')h]hQUERY = 45 ('E')}hjrsbah}(h]h ]h"]h$]h&]jjuh1jhhhM hjahhubh)}(h8Send effect type. Returns nonzero if supported (2 bytes)h]h8Send effect type. Returns nonzero if supported (2 bytes)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjahhubeh}(h] query-effectah ]h"] query effectah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hFirmware Versionh]hFirmware Version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM&ubj)}(hQUERY = 56 ('V'ersion)h]hQUERY = 56 ('V'ersion)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM*hjhhubh)}(h+Sends back 3 bytes - major, minor, subminorh]h+Sends back 3 bytes - major, minor, subminor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjhhubeh}(h]firmware-versionah ]h"]firmware versionah$]h&]uh1hhjhhhhhM&ubeh}(h]querying-featuresah ]h"]querying featuresah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hInitialisation of the deviceh]hInitialisation of the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM/ubh)}(hhh](h)}(h Set Controlh]h Set Control}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM2ubhnote)}(h7Device dependent, can be different on different models!h]h)}(hjh]h7Device dependent, can be different on different models!}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX.OP= 40 [] LEN= 2 or 3 00 Idx Idx 00 Set dead zone (0..2048) Idx 01 Ignore Deadman sensor (0..1) Idx 02 Enable comm watchdog (0..1) Idx 03 Set the strength of the spring (0..100) Idx 04 Enable or disable the spring (0/1) Idx 05 Set axis saturation threshold (0..2048)h]hX.OP= 40 [] LEN= 2 or 3 00 Idx Idx 00 Set dead zone (0..2048) Idx 01 Ignore Deadman sensor (0..1) Idx 02 Enable comm watchdog (0..1) Idx 03 Set the strength of the spring (0..100) Idx 04 Enable or disable the spring (0/1) Idx 05 Set axis saturation threshold (0..2048)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM9hjhhubeh}(h] set-controlah ]h"] set controlah$]h&]uh1hhjhhhhhM2ubh)}(hhh](h)}(hSet Effect Stateh]hSet Effect State}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhMDubj)}(htOP= 42 LEN= 1 00 State Bit 3 Pause force feedback Bit 2 Enable force feedback Bit 0 Stop all effectsh]htOP= 42 LEN= 1 00 State Bit 3 Pause force feedback Bit 2 Enable force feedback Bit 0 Stop all effects}hj5sbah}(h]h ]h"]h$]h&]jjuh1jhhhMHhj$hhubeh}(h]set-effect-stateah ]h"]set effect stateah$]h&]uh1hhjhhhhhMDubh)}(hhh](h)}(h Set overallh]h Set overall}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhMPubj)}(hLOP= 43 LEN= 1 00 Gain Val 00 = 0% Val 40 = 50% Val 80 = 100%h]hLOP= 43 LEN= 1 00 Gain Val 00 = 0% Val 40 = 50% Val 80 = 100%}hj\sbah}(h]h ]h"]h$]h&]jjuh1jhhhMThjKhhubeh}(h] set-overallah ]h"] set overallah$]h&]uh1hhjhhhhhMPubeh}(h]initialisation-of-the-deviceah ]h"]initialisation of the deviceah$]h&]uh1hhjhhhhhM/ubeh}(h]initah ]h"]initah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hParameter memoryh]hParameter memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM\ubh)}(hEach device has a certain amount of memory to store parameters of effects. The amount of RAM may vary, I encountered values from 200 to 1000 bytes. Below is the amount of memory apparently needed for every set of parameters:h]hEach device has a certain amount of memory to store parameters of effects. The amount of RAM may vary, I encountered values from 200 to 1000 bytes. Below is the amount of memory apparently needed for every set of parameters:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjhhubh block_quote)}(hI- period : 0c - magnitude : 02 - attack and fade : 0e - interactive : 08 h]h bullet_list)}(hhh](h list_item)}(h period : 0ch]h)}(hjh]h period : 0c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hmagnitude : 02h]h)}(hjh]hmagnitude : 02}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hattack and fade : 0eh]h)}(hjh]hattack and fade : 0e}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hinteractive : 08 h]h)}(hinteractive : 08h]hinteractive : 08}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhhhMbhjhhubeh}(h]parameter-memoryah ]h"]parameter memoryah$]h&]uh1hhjhhhhhM\ubeh}(h]device-effects-statesah ]h"]device effects statesah$]h&]uh1hhhhhhhhKKubh)}(hhh](h)}(h$Appendix: How to study the protocol?h]h$Appendix: How to study the protocol?}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhMhubh)}(hX{1. Generate effects using the force editor provided with the DirectX SDK, or use Immersion Studio (freely available at their web site in the developer section: www.immersion.com) 2. Start a soft spying RS232 or USB (depending on where you connected your joystick/wheel). I used ComPortSpy from fCoder (alpha version!) 3. Play the effect, and watch what happens on the spy screen.h]hX{1. Generate effects using the force editor provided with the DirectX SDK, or use Immersion Studio (freely available at their web site in the developer section: www.immersion.com) 2. Start a soft spying RS232 or USB (depending on where you connected your joystick/wheel). I used ComPortSpy from fCoder (alpha version!) 3. Play the effect, and watch what happens on the spy screen.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhj)hhubh)}(hA few words about ComPortSpy: At first glance, this software seems, hum, well... buggy. In fact, data appear with a few seconds latency. Personally, I restart it every time I play an effect. Remember it's free (as in free beer) and alpha!h]hA few words about ComPortSpy: At first glance, this software seems, hum, well... buggy. In fact, data appear with a few seconds latency. Personally, I restart it every time I play an effect. Remember it’s free (as in free beer) and alpha!}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj)hhubeh}(h]"appendix-how-to-study-the-protocolah ]h"]$appendix: how to study the protocol?ah$]h&]uh1hhhhhhhhMhubh)}(hhh](h)}(hURLSh]hURLS}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hhhhhMwubh)}(h\Check http://www.immerse.com for Immersion Studio, and http://www.fcoder.com for ComPortSpy.h](hCheck }(hjohhhNhNubh)}(hhttp://www.immerse.comh]hhttp://www.immerse.com}(hjwhhhNhNubah}(h]h ]h"]h$]h&]refurijyuh1hhjoubh for Immersion Studio, and }(hjohhhNhNubh)}(hhttp://www.fcoder.comh]hhttp://www.fcoder.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjoubh for ComPortSpy.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhj^hhubh)}(h'I-Force is trademark of Immersion Corp.h]h'I-Force is trademark of Immersion Corp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hj^hhubeh}(h]urlsah ]h"]urlsah$]h&]uh1hhhhhhhhMwubeh}(h]iforce-protocolah ]h"]iforce protocolah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjMfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjj3j0jjjjjj|jjj&j#jjjjj>j;jejbjjjjjjjj|jjjUjRjjjjjjj)j&j^j[jjjjjwjtj!jjHjEjojljjj[jXjju nametypes}(jj3jjjjj&jjj>jejjjjjjUjjjj)j^jjjwj!jHjojj[juh}(jhj0j*jjvjjj|jjjj#jjjjj j;jjbjAjjhjjjjj|jjjjRj#jjXjjjjj&jj[j,jjajjjtjjjjEj$jljKjjjXj)jj^u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.