Skip to content

Debug mode

Mark Green edited this page Jul 21, 2019 · 1 revision

Debug Mode is a hidden internal mode which replaces the battery meter after being enabled. Although it is referred to as "debug mode" inside libSnakeLib it appears to be more related to hardware test.

Many thanks to @Lrk who enabled this discovery by finding libSnakeLib.dylib in the Mac app.

Debug mode is enabled by sending a "text command" type Sysex message: F0 00 20 76 01 62 enable-debug F7. That corresponds to F0 00 20 76 01 62 65 6E 61 62 6C 65 2D 64 65 62 75 67 F7.

As soon as debug mode is enabled, the OP-Z begins offering a serial connection in the same way it does during Update mode. This appears to send logging information.

While debug mode is enabled, pressing and holding Screen will not display the battery level. Instead, it will play a drum sound and turn on the LEDs in an indicative format. Pressing the step select keys in this mode will have a number of functions, not all of which appear in libSnakeLib.

  • Track 1: outputs "set mode" followed by four numbers. The first number and third number cycle between: 2 / 0, 2 / 23, 1 / 23, and cycle. The color of the light also shows which of these states it's in: off, green, red, yellow. In the source code this updates a value called dtmMode. This may refer to "direct test mode", a method for testing Bluetooth communication; the documentation for direct test mode corresponds to the Nordic Semiconductor chip used in the OP-Z.

  • Pressing track 2 gives the same message, but the second number cycles between 0, 20, and 39, and color between green, red, and yellow.

  • Pressing track 3 flashes purple and gives the message "BLE advertising on" and turns lights 4 and 5 green. Provided track 1 and track 2 are both off, this causes the OP-Z to offer two BLE serial connections; connecting to each of these will turn the lights 4 and 5 white. One of these sends only numbers, the other sends messages - different messages to the USB serial. One of these channels does accept input, but giving any input gives the message "error: iterations above threshold. quitting." on the BLE serial out. There is no corresponding source code in snakelib.

  • Puttons 9, 10, 11: give the message "send debug flags to psoc" and a number. Button 9 toggles the first bit, 10 toggles the second, and 11 toggles the third. BEWARE: setting bit 1 or 2 here will cause all LEDs on the OP-Z to turn off and not turn on again until the bit is changed. Everything still works, there's just no LEDs. PSOC is a standard abbreviation for "Programmable System On Chip" which likely refers to the ADSP-BF703. There are no standard "debug flags" documented at the chip level. There is no corresponding source code in snakelib.

  • Button 12: LED test ("debugLedBlast"). Cycles all LEDs in all available colours until it is pressed again.

  • Button 13: sends "signal generator enabled", and a gain level. Pressing the button several times adjusts the gain level from -0 to -60dB in steps of 6, then turns it off. There is no corresponding source code in snakelib.

  • Button 15: makes the OP-Z become unresponsive while doing a LED test. Sometimes sends "key pressed go to standby".

Clone this wiki locally