Skip to content

Troubleshooting Spike

If you got problems with your hardware platform we first recommend to read our troubleshooting guide. Here are some hardware platform specific steps:

Enable Debugging

If you got problems with your platform try to enable debug first. As described in the general debugging section of our troubleshooting guide this is done by adding debug: true to your spike config section:

  debug: true

This will add a lot more debugging and might slow down MPF a bit. We recommend to disable/remove it after finishing debugging.

Debugging the MPF-Spike Bridge

To debug the bridge you can enable more logging to a USB drive. First open a shell to your serial port (the one connected to your Spike). Stick some USB drive to a USB port on Spike and mount it to /mnt/.

If you USB drive contains a partition use:

mount /dev/sda1 /mnt

Alternatively use:

mount /dev/sda /mnt

If you did not get an error your operation succeeded. You can have a look at the content of your stick using:

ls /mnt

Afterwards, add the following options to your spike config:

  debug: true
  bridge_debug: true
  bridge_debug_log: /mnt/spike.log

Now close your shell and start MPF. MPF will instruct the bridge to create a log file on your USB drive with more debug information about the nodebus and other things. This will be helpful to find issues with incorrect commands or responses.

To safely unmount your drive stop MPF, open the console again and type:

umount /mnt

You can now safely remove the USB drive and download the file on your PC.

Capturing the Bus Traffic of Your Game Using Interceptty

To understand what the game does it is sometimes helpful to capture what it sends and receives on netbus. Unfortunately, we don't know how to enable debugging or verbose mode in the game binary. (Please let us know if you find out.)

Instead, we redirect the serial in Linux and capture the bus this way. Unfortunately, this is not perfect and at least on Spike 1 causes timing issues. Nevertheless, this shows us how things work and also sometimes teaches us how error recovery works in Spike.

Get our interceptty binary and put it on your USB drive. Mount the USB drive as above and run the following command:

Spike 1

cd /mnt && chmod +x interceptty-arm
mv /dev/ttyS4 /dev/ttyS4_real; interceptty-arm -s 'ispeed 460800 ospeed 460800' -l /dev/ttyS4_real /dev/ttyS4 > /mnt/serial_dump &

Spike 2

cd /mnt && chmod +x interceptty-arm
mv /dev/ttymxc1 /dev/ttymxc1_real; interceptty-arm -s 'ispeed 460800 ospeed 460800' -l /dev/ttymxc1_real /dev/ttymxc1 > /mnt/serial_dump &

This command should return instantly and run in the background. Now start the game binary in the foreground:


Some versions of some games give you a nice service CLI here. Play the game and make sure you activate all relevant features. Flippers might not work some times. Just try again as this unfortunately sometimes messes up timings.

When you are done after a while stop the game using ctrl+c. Then type fg to get interceptty in the foreground and stop it using ctrl+c.

Restore the serial:

Spike 1

mv /dev/ttyS4_real /dev/ttyS4

Spike 2

mv /dev/ttymxc1_real /dev/ttymxc1

Now unmount the USB drive as above and you are done. Please share the capture on the MPF user forum.

Coils Are Not Firing

What to do if your coils are not working?

title: Coils Are Not Firing

Coils Are Not Firing

What to do if your coils are not working?

Check if Your Hardware is Working at all

Sounds stupid but this is a good start: Is the hardware working at all? Do you see switch hits in the logs? If not, check our section Your hardware is not working at all.

Check the Watchdog

If switches (or other features of the platform) are working but coils are not we have to dig deeper. Most hardware platforms have some kind of watchdog. Often there is some LED which indicates if the watchdog is received. The MPF log might also contain clues (especially if you have enabled debug and run MPF with verbose flags -v -V). If the watchdog is not received by your platform it will not enable coils.

In most cases watchdog related problems indicate wiring problems. Check if your boards are properly wired.

Test Your Coil Numbers using MPF Service CLI

Hardware is connected and generally working, watchdog is good but still your coils are not working? Maybe something with the numbering is odd. Lets tests that using the MPF Service CLI. Alternatively, you can also use service mode if you have already configured it. Both ways work similarly.

To use service cli:

  1. Open two consoles
  2. Start your game (e.g. using mpf both)
  3. Start the service cli from within your game folder using mpf service.
  4. Type list_coils and press ENTER to see a list of coils.
  5. Type coil_pulse your_coil and press ENTER to pulse it.

Does it work? If not check the log and try verify the coil number. If you do not specify default_pulse_ms MPF will use 10ms which might not be enough for some mechs. Try to increase that gently (maybe 20ms or 30ms).

Reducing light update rate

If you got a lot of lights you might run into bus contention issues. You can reduce the light update rate in MPF:

  default_light_hw_update_hz: 30   # defaults to 50

If you set this too low fades will be less smooth but otherwise it should not affect your game.

Your hardware is not working at all

If your hardware is not working at all make sure that you removed the options -X, -x and --vpx from your mpf both or mpf game command line. Those options will overwrite the settings in your hardware section and MPF will not even try to connect to your hardware. If you got config errors we suggest you add -X to figure things out without interfacing real hardware all the time. Just keep that option in mind.

Another stupid thing to check: Is your hardware connected to your PC? We know it is stupid but a loose USB connector has happened to most of us.

On Linux you might want to run the command lsusb which should show both of your micro controllers connected. You should see two lines similar to

Bus 002 Device 014: ID 0483:5740 STMicroelectronics Virtual COM Port
Bus 002 Device 015: ID 0483:5740 STMicroelectronics Virtual COM Port

If you are unsure about the output, run the command once with your controllers connected and once without. If there is no difference, then for sure the USB device is not properly connected.

If you got problems with some switches also add debug: true to those as it will give to more insights into the intentions of those devices. Same will work for flippers, coils, lights, servos, steppers and more. See general debugging section for details.

Run MPF with verbose flag

See general debugging section for details. TLDR: run mpf both -t -v -V.

Report Your Issue and Ask For Help

If you cannot find the issue yourself please prepare some information about your issue according to our troubleshooting guide and ask in our forum.

Consider Improving the Documentation

Did you solve your issue but found that some relevant information in the documentation is missing or should be linked/located elsewhere? Either tell us in the forum or consider improving the documentation yourself to save future users some troubles the same way others saved you some troubles by writing this documentation.

Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results