Triggering button events through the USB port

For some applications, it may be desirable to trigger the buttons on a V2 Opal through an attached cable. For example, you may wish to push the buttons without moving the Opal or to annotate a logged recording without having to modify your gait. We have implemented a solution which enables a user to use a modified micro-USB cable. The micro-USB port fits into the Opals charging/data port. Grounding the cable's D-plus line to the cable's ground line will result in triggering button #1 (the one near the top of the display). Grounding the cable's D-minus line to the cable's ground line will result in triggering button #2. Any button or switch can be used. A figure is shown below and a schematic is attached that details this simple modification.

Note that a special setting will have to be made to the Opal's configuration to enable these external button presses. Here are the steps to enable this behavior:

  1. When the Opal is undocked, hold button #2 until the power menu is displayed (about 3s).
  2. Press button #1 until the selection (the > character on the left) is in front of the "Boot Menu" option.
  3. Press button #2 to select the "Boot Menu" option
  4. Press button #1 until the selection is in front of the "Enable MSD Write Mode" option.
  5. Press button #2 to select the "Enable MSD Write Mode" option. This option makes it so that you can edit the Opal's configuration file like any other text file.
  6. Dock the Opal. Once it is mounted as an external drive, look in the contents and open the "config.ini" file with a text editor.
  7. Change the line "EXTERNAL_COMUNICATIONS_MODE=0" to "EXTERNAL_COMUNICATIONS_MODE=3"
  8. Undock the Opal.

The Opal should now be configured to receive button events over the modified USB cable. These events will be equivalent to pressing the buttons on the Opal itself and are active in any screen.

After testing, it is recommended that you put the Opal's storage back into read-only mode to minimize the chance of the configuration settings getting deleted or corrupted. To be explicit:

  1. When the Opal is undocked, hold button #2 until the power menu is displayed (about 3s).
  2. Press button #1 until the selection (the > character on the left) is in front of the "Boot Menu" option.
  3. Press button #2 to select the "Boot Menu" option
  4. Press button #1 until the selection is in front of the "Enable MSD Write Mode" option.
  5. Press button #2 to select the "Disable MSD Write Mode" option.
  6. The Opal's storage should now be in read-only mode.

If you wish to disable this button mode, you can follow the first set of instructions, changing EXTERNAL_COMUNICATIONS_MODE=3" to "EXTERNAL_COMUNICATIONS_MODE=1" in the "config.ini" file.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.