SummaryThis document describes how to run CH Instruments Windows software on Linux or (Mac) OS X.
Last updated on: 2016-07-15
- Intel x86/x64-compatible CPU
- Operating system: Linux with cp210x.c, or (Mac) OS X
- CH Instruments Windows Software: 12.04 or newer
- Recommended: *nix command line familiarity
- Recommended: patience
Operating Systems Reported to Work
- (Mac) OS X
- To view version information, click Apple Icon > About This Mac
- 10.6.2 "Snow Leopard"
- 10.6.8 "Snow Leopard"
- 10.8 "Mountain Lion" - the operating system formerly known as Mac OS X
- 10.9 "Mavericks"
- Mac-only steps
- Download and install Wine
- Configure Wine
- Run our software using Wine
- Graphical artifacts
- Letters on the y-axis may be individually rotated 180 degrees.
- Letters on the y-axis may not be correctly spaced.
- Pop-up descriptions of toolbar buttons may be cut off.
- Legacy hlp files may not be formatted correctly.
- "Help" button may not work at all, especially in Linux.
Further investigation required
- Printing and Print Preview
- Reliability of individual techniques
- Simulation and fitting (CV and impedance)
Mac OS X users
- Download the USB driver here and install.
If you are running Linux, the community driver has been found to be more reliable than Silicon Labs'. Skip to Wine installation.
- If your kernel does not have cp210x.c baked in, then you could try compiling the Silicon Labs tarball from scratch, but the one time we got it to compile, the resulting kernel module would just totally hang our Linux box (virtual machine), so tell us how it goes for you...
- Alternatively, you could try to compile the community kernel module yourself and install it (using cp210x.c from the latest Linux kernel, not Silicon Labs'). I don't know how to do this, so please let me know if you do!
- Basically, you may need to try this step if USB enumeration is not working for you (see "Configure Wine").
Mac OS X users
- Check to see if you have X11 installed.
- Finder > Applications > Utilities
- Double-click "X11" to make sure it is installed (it might not be, e.g., for Mountain Lion).
- This may be listed as "XQuartz"; however, once you double-click it, the menu bar will display "X11" at the top-left.
- If necessary, download and install X11 from here. Check the "all available XQuartz releases" link for a compatible version if necessary.
Linux usersWhat? You're trying to run a graphical application without X11 installed? Do you have a command-line only distro? Is it even possible to run a desktop manager without X11? This is beyond my ken... Tell me more...
Mac OS X users
- Download and install Wine from winebottler.kronenberg.org/wine (third-party site).
- If presented with an adf.ly page, try waiting out the countdown, then clicking "SKIP AD" at the top right.
- Installation notes
- To determine your OS X version: Menu bar > Apple Icon > About This Mac
- 10.4 = Tiger
- 10.5 = Leopard
- 10.6 = Snow Leopard
- 10.7 = Lion
- 10.8 = Mountain Lion
- Other versions
- Other notes
- We had better success with "vanilla" Wine and not WineBottler.
- Alternative: Compile from source via MacPorts. More secure? But this requires downloading and installing Xcode (~3 GB as of Lion!), and the compile itself can take hours.
Use your favorite package manager to download and install Wine.
- For example, Debian-based distros (Ubuntu, Mint) can use Synaptic Package Manager.
- Here's the official Wine FAQ.
- For those more adventurous than the author, you can alternatively go and download the Wine source tarball and compile from scratch, downloading and compiling any dependencies as desired. We've never done this before, so please don't ask us how!
Random remarksIt's true, Wine Is Not an Emulator! Instead, it re-implements Windows API calls for the target operating system. However, it requires an Intel (x86-compatible) processor.
- Confirm Wine is installed correctly.
- Linux: Often there will be an installed link to notepad.exe or Control Panel; try that first.
- Mac OS X: Open Applications > Wine, then in the system menu bar click (the wine cup) > File Manager.
- In the worst case, you can dig up a Windows computer and migrate freecell.exe as needed.
- Open a terminal window.
- Mac OS X
- Spotlight: Command+Space, search for "Terminal"
- Alternative: Finder > Places > Applications > Utilities > Terminal
- Linux: Ctrl+Alt+T (GNOME only?)
- Mac OS X
- Find and enter your Wine configuration directory.
- Mac OS X
- cd ~/Wine\ Files ?
- Hmm if not, try ls -a ~ and go from there
- Linux: in all probability, cd ~/.wine
- Mac OS X
- Enter subdirectory dosdevices.
- If dosdevices exists: cd dosdevices
- Else: mkdir dosdevices && cd dosdevices
- Determine the path of your USB instrument.
- Before and after connecting your instrument (powered on): ls /dev
- The device that shows up after connecting is what you want (below: /dev/ttyUSB0)
- Easy procedure
- Note that this will erase any file named before or after in your current directory!
- Disconnect your instrument from the computer (USB)
- find /dev -maxdepth 1 > before
- Connect your instrument to the computer using USB
- find /dev -maxdepth 1 > after
- diff before after
- Mac OS X only: If more than one device shows up, try the "tty" device before the "cu" device (e.g., /dev/tty.SLAB_USBtoUART)
- Alternative: traditional serial port (no USB) OR USB-serial adapter (old models)
- Traditional serial: Connecting/disconnecting the serial cable will not give you any information.
- USB-serial adapter: You can use the USB connect/disconnect trick to determine the device path. You may need to install drivers; please consult the documentation included with your adapter.
- "Loopback" testing
- The purpose of "loopback" testing is to confirm that the serial port is installed correctly on your computer system.
- Short pins 2 and 3. (Search for a pinout using your favorite search engine.) For a male connector, use a jumper; for a female, use a paper clip.
Male 9-pin numbering (most USB-serial adapters will be 9-pin male):
1 2 3 4 5
6 7 8 9
- Linux: screen /dev/ttyS0, etc.
Mac: screen /dev/tty.serial1, etc. (try also cu)
Windows (for reference): Download PuTTY and open a Serial connection to your COM port
- Type anything. If no text shows up, then you have not found the right device. (Try /dev/ttyS1, etc.; ls /dev will help)
- If you have found the right device, then anything you type will be echoed back to you.
- To double check, remove the short (paper clip or jumper), and text should no longer be echoed.
- "Create" Wine's COM port.
- Suppose our device was /dev/ttyUSB0 from the step above.
- Suppose further the desired COM port number is 7, lucky 7.
- ln -sv /dev/ttyUSB0 com7
- To check: ls -l
- Hint: If you only have an "installer" like set600d.exe, simply rename to set600d.zip and extract.
- Sub-hint: In (Mac) OS X, double-clicking the .zip file may result in a "cpgz" file. (Thanks to Tom Reilly for pointing this out!)
- Workaround 1: Run "set600d.exe" in Wine
- Workaround 2: Open a Terminal window (Command+Space to open Spotlight), navigate to the folder (ls and cd), and unzip set600d.zip
- Open the executable using Wine.
- Mac OS X users: Right-click (Ctrl-click?) and choose to open the exe file with Wine.
- Linux users: wine chi600d.exe
- You may encounter various "stub" debug text when running from the command-line. Such messages generally indicate unimplemented Windows API functions in Wine, and can generally be ignored.
- Setup > System > COM 7 > OK
- System > Hardware Test. Hardware test results should display shortly.
- Use our software as you would on Windows (i.e., "go do some electroanalytical chemistry").
- Mac hint: use Command instead of Alt to access keyboard shortcut menus. If you are using a PC USB keyboard, Command may map to the Win key. Note that system shortcuts override ours, like Command+C = Copy
That's it! If you made it this far, congratulations! Have fun beta testing your instrument your instrument on Linux/Mac OS X.
Step 5: Enrichment (Optional Extra Credit)
- Running Wine from the command line in OS X
- First complete Steps 1-4, naturally.
- Upon completing this Step, you may have to redo COM port creation from Step 3, this time in ~/.wine
- Create the following script named startwine (no longer bundled with Wine.app? found here)
#hack to add some paths
# get current path
if test $(echo $0 | grep "Wine.app/Contents/MacOS/startwine"); then
# exports to ensure wine finds all libs in the bundle
# set Display properties for Tiger
if test $(echo $OSTYPE | grep darwin8); then
# start wine
exec "$WINE_DIRNAME/bin/wine" "$@"
- chmod +x startwine
- cp startwine /Applications/Wine.app/Contents/MacOS
- Example usage: /Applications/Wine.app/Contents/MacOS/startwine chi600d.exe /runmacro:test.txt
- Tested on Mac OS X 10.6.2 + Wine 1.4.1
- /runmacro requires CHI software version 13.11 or newer.
- Dead end: open -a Wine chi600d.exe --args /runmacro:test.txt. Couldn't get command line arguments to work even with Notepad...
If you have any feedback, please contact our software engineer directly at software«at»chinstruments«dot»com.
"Troubleshooting"Here are some other random things from my notes, but they haven't been tested very thoroughly...Maybe they will help you? Let me know...
download X11 (between 2.2.0 and 2.3.1 for Leopard 10.5.5 without OS disc)
- try increasing versions till a stable one is found
- 188.8.131.52 oh, an incompatibility issue? (unsupported color depth)
- http://www.ecimulti.org/blog/?p=26 - hackintoshes with a similar problem??
- The Fix: Open Terminal -> defaults write org.x.X11 depth 24
Wine does not open exe file? (Software with 3d visualization SECM or impedance)
- try updating to OS X 10.9 Mavericks - it's free!
DisclaimerThe instructions above are experimental and provided for beta testing purposes only. Please do not use them for mission-critical purposes.
THIS DOCUMENT IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL CH INSTRUMENTS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE ABOVE INSTRUCTIONS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.