How do I solve the LEGO NXT clicking brick syndrome?

March 4, 2012 in Hardware, LEGO, NXT Brick, Recipes

In a nutshell, just read this excellent post by Brian Davis.

However, since one important piece of information might be hard to find inside the email thread that follows Brian’s post, I will outline here the steps that helped me solving the clicking brick syndrome specifically for my Mac Book Pro running OS X Snow Leopard.

First, let’s prepare the brick. These steps are very similar to those outlined by Brian:

  • Make sure the brick is disconnected from the Mac.
  • Make sure the Bluetooth is off.
  • Remove a battery from the NXT Brick for a few seconds and reinsert it.
  • Push and hold the reset button on the brick for about 5 seconds. The button can be accessed from the leftmost hole of the brick located behind the USB connector. To access it just unfold a paper clip and use it to reach the button down the hole. This is going to put the brick in the firmware update mode
  • Make sure that the brick starts clicking (this sound indicates that we are in the firmware update mode).

Now we can proceed to upload the firmware. Connect the brick to the Mac via USB. Launch MINDSTORM NXT, go to the menu Tools and select the Update NXT Firmware… item. In this post I assume that your system is set up with the appropriate drivers and that you have your favorite firmware ready (if this is not the case you may shoot a question here). Select the firmware file and proceed to download it onto the brick.

At this point you may either be successful and proceed to build your next great invention or you my run into troubles and get the following message:

Cannot locate NXT device to download firmware

even if the NXT brick is hooked up to your Mac via USB). This is exactly what happend to me. And this is when the post by nano solved the issue. The problem is that an internal driver (USB CDC) will be triggered by the NXT brick and will hold control of the NXT device thinking it is a modem
The solution proposed by nano is to momentarily turn off such driver, update the firmware and turn back on the USB CDC driver. This can be accomplished by the following steps:

  • Open a terminal.
  • Temporarily remove the kernel extension associated to the USB CDC driver: sudo mv /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDC.kext ~/Documents/.
  • Make sure the change is felt by the system on the next reboot (forcing the system to update all necessary kernel-extensions caches): sudo touch /System/Library/Extensions.
  • Reboot the Mac.
  • Proceed to the firmware download as described before, using the MINDSTORM NXT application
  • Restore the driver: sudo mv ~/Documents/AppleUSBCDC.kext /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/ .
  • Make sure the change is felt by the system on the next reboot: sudo touch /System/Library/Extensions.
  • Reboot the Mac. The system will be back to its original status.

NB: Fiddle with the drivers at your own risk.

Cover image by Christian Reitter