Support » Jrk G2 Motor Controller User’s Guide » 3. Getting started »
3.2. Installing Linux software
To install the software for the Jrk G2 on a computer running Linux, follow these steps:
- Download the version for your system from this list:
- Jrk G2 Software for Linux (x86) (9MB xz) — works on 32-bit and 64-bit systems
- Jrk G2 Software for Linux (Raspberry Pi) (6MB xz) — works on the Raspberry Pi and might work on other ARM Linux systems
- In a terminal, use
cd
to navigate to the directory holding the downloaded file. For example, runcd ~/Downloads
if it was downloaded to the “Downloads” folder in your home directory. - Run
tar -xvf pololu-jrk-g2-*.tar.xz
to extract the software. If you downloaded multiple versions of the software, you should use an exact file name instead of an asterisk. - Run
sudo pololu-jrk-g2-*/install.sh
to install the software. You will need to have sudo privilege on your system and you might need to type your password at this point. Look at the output of the script to see if any errors happened. - After the installation has completed, plug the Jrk into your computer via USB. If you already connected the Jrk earlier, unplug it and plug it in again to make sure the newly-installed udev rules are applied.
- Run
jrk2cmd --list
to make sure the software can detect the Jrk. This command should print the serial number and product name of the Jrk. If it prints nothing, see the “USB troubleshooting for Linux” section below. - If you are using a graphical desktop environment, run
jrk2gui
to start the configuration utility. In the upper left corner of the window, where it says “Connected to:”, make sure that it shows something like “18v19 #01234567”. This indicates the version and serial number of the Jrk G2 that the software has connected to. If it says “Not connected”, see the troubleshooting section below.
This Jrk G2 software consists of two programs:
- The Jrk G2 Configuration Utility (jrk2gui) is a graphical user interface (GUI) for configuring the Jrk G2 and viewing its status. You can open a terminal and type
jrk2gui
to run it. - The Jrk G2 Command-line Utility (jrk2cmd) is a command-line utility that can do most of what the GUI can do, and more. You can open a terminal and type
jrk2cmd
with no arguments to a see a summary of its options.
The Jrk G2 software for Linux is statically linked; it does not depend on any shared libraries. The source code for the software is available. The Jrk G2 does not require any driver installation on Linux.
Software installation troubleshooting for Linux
If you do not have sudo privilege or you do not remember your password, you can skip running install.sh
and just run the programs directly from the directory you extracted them to. You should also consider moving the software to a more permanent location and adding that location to your PATH as described below.
If you get a “No such file or directory” error while running ./install.sh
, it is possible that your system is missing one of the directories that the install script assumes will be present. Please contact us to let us know about your system so we can consider supporting it better in the future.
If you get the error “command not found” when you try to run jrk2cmd
or jrk2gui
, then you should run echo $PATH
to see what directories are on your PATH, and then make sure one of those directories contains the Jrk executables or symbolic links to them. The installer puts symbolic links in /usr/local/bin
, so if that directory is not on your PATH, you should run export PATH=$PATH:/usr/local/bin
to add it. Also, you might want to put that line in your ~/.profile
file so the directory will be on your PATH in future sessions.
If you get the error “cannot execute binary file: Exec format error” when you try to run jrk2cmd
or jrk2gui
, then it is likely that you downloaded the wrong version of the software from the list above. If all of the listed versions give you this error, you will probably need to compile the software from source by following the instructions in BUILDING.md in the source code. Please contact us to let us know about your system so we can consider supporting it better in the future.
If the Jrk G2 Configuration Utility window is too big to fit on your screen properly, try setting the JRK2GUI_FONT_SIZE
environment variable to “6” before running the software. You can do this by running the command JRK2GUI_FONT_SIZE=6 jrk2gui
in your terminal. You can experiment with font sizes other than 6 to see if they work for you. You could also add the line export JRK2GUI_FONT_SIZE=6
to your ~/.profile
to make the change permanent.
USB troubleshooting for Linux
If the Jrk G2 software cannot connect to your Jrk after you plug it into the computer via USB, the tips here can help you troubleshoot the Jrk’s USB connection.
If you are using the Jrk G2 Configuration Utility, try opening the “Connected to:” drop-down box to see if there are any entries in the list. If there is an entry, try selecting it to connect to it.
Make sure you have a Jrk G2. The Jrk G2 software does not work with the older Jrk 21v3 or Jrk 12v12. If you have one of those products, you should refer to its user’s guide instead of this user’s guide.
Make sure you are using software that supports the Jrk G2. The original Jrk Configuration Utility does not work with the Jrk G2. The Jrk G2 controllers have new USB product IDs. Third-party software for the older Jrk 21v3 and Jrk 12v12 controllers might need to be updated, depending on how the software works. If you are a developer of such software, see Section 1.2.
If you have connected any electronic devices to your Jrk besides the USB cable, you should disconnect them.
You should look at the LEDs of the Jrk. If the LEDs are off, then the Jrk is probably not receiving power from the USB port. If the green LED is flashing very briefly once per second, then the Jrk is receiving power from USB, but it is not receiving any data. These issues can be caused by using a broken USB port, using a broken USB cable, or by using a USB charging cable that does not have data wires. Using a different USB port and a different USB cable, both of which are known to work with other devices, is a good thing to try. Also, if you are connecting the Jrk to your computer via a USB hub, try connecting it directly.
If the Jrk’s green LED is on all the time or flashing slowly, but you can’t connect to it in the Jrk software, then there might be something wrong with your computer. A good thing to try is to unplug the Jrk from USB, reboot your computer, and then plug it in again.
If you get a “Permission denied” error when trying to connect to the Jrk, you should make sure to copy the 99-pololu.rules
file into /etc/udev/rules.d
and then unplug the Jrk and plug it back in again. The install script normally takes care of installing that file for you.
If that does not help, you should try running lsusb
to list the USB devices recognized by your computer. Look for the Pololu vendor ID, which is 1ffb. You should also try running dmesg
right after plugging in the Jrk to see if there are any messages about it.