Wednesday 14 November 2018

Workshop life - running Ignitech software under Linux with WINE

Hardware has got the unpleasant habit of failing. Even more so, if we're talking about rather old hand-me-down laptops. Recently my trusty (and by my standards) almost new T60 thinkpad, decided it wouldn't want to boot anymore. I fixed it later on, but this made me think about setting up another old laptop for workshop use and made me rethink using virtual box for running a simple, single application. So I decided to give WINE a shot as the "new" laptop in question is an Asus eeePC 1005p, named minimus. It's not exactly a powerhouse with an Atom N450 and 2GB fo RAM, but it sports a very small form factor, which fits rather easily into my backpack and a battery that will actually last about 5hrs in a realistic usage scenario.

In order to get going, there's two things we'll need:
  1. the windows executables from the Ignitech website (can be found under downloads)
  2. a wine install
Depending on which bike and as such which ignition box you install the software for, you have to download the correct executable. For my dad's CX500 with a CDI-ignition, it would DCCDI-P2, in the case of my old TR1s, we're talking about TCI-p4.

As I am running LUbuntu on this laptop, installing wine is a simple case of running apt-get install wine-stable or if you're more graphically inclined, simply use one of the many graphical package managers.


I suppose some of the more modern and elegant window managers will allow you to link a certain file-type with a program more easily, but in OpenBox this works by right-click, choosing "open-with" and then "custom command line", in which you enter "wine %f", the lower box should be filled out as well, e.g. "wine" or the link will not be permanent.


The thing that got me in the past was the fact, that I simply couldn't get my laptop to talk over the serial connection with the ignition box. This was down to my user not being member of the usergroup dialout and thus not being able to access the serial devices.


The next stop, unless you're running a serial cable on your laptop directly, is to access your $home/.wine/dosdevices directory and create a symbolic link from one of the (higher) COM-ports to the correct USB-serial device. Plug in your USB to serial cable and run lsusb in a terminal. If that's the only USB-device you use it should show up as USB0. Then replace the symbolic link com30 pointing to /dev/ttyS30 with one point to /dev/ttyUSB0. 


It turns out, while the above is certainly possible, there's a more elegant way introduced after upgrading to wine 3.0 (and above). If you run "wine regedit" and then create a new string under HKEY_LOCAL_MACHINE\Software\Wine\Ports and link it to the correct USB-device, e.g. USB0, this works fine even after reboots or upgrades.


I chose COM30, because it's easy to remember in ignitech (highest port) and because I sometimes use traditional nullmodem- and serial cables as well and don't want my USB-port mapped on COM1.


Fire up your ignitech software and it will just work and find your bike on COM30. Admittedly, I am not entirely sure how you would do the same on a Mac running OS X, mainly because I am not sure if the serial USB device would be named in the same fashion or some weird BSD-way. If you just came here to find a simple way how to run Ignitech on Linux, follow the steps above and you should be fine.

Addendum: I altered the config to point COM1 to /dev/ttyUSB0 as that made it a lot quicker to find the TCI.


And there you have it: Connecting to the ignition like an absolute boss and no more overhead with a full blown Windows XP or Win7 install.


 Oh and there's a little outlook for you: also working on a native OS X application.


But that one still needs a bit of the old tweaking here and there to work and be "a tad" more lightweight as currently it weighs in at a healthy 590MB.

No comments:

Post a Comment