Author Topic: Experiments 1: Running RailPro software on Linux using Wine - Part 1  (Read 97778 times)

G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Part 1: Introduction, the install and first tests

Obligatory disclaimer

This is not a step by step how-to but rather a commentary of the experiments journey. I don't think I've missed anything in the steps taken that doesn't affect the outcome but I've not included any links etc as it's not supposed to be a step by step how to.
. . .
Ok, so why?

Given it seems the there will not be native versions of RailPro software for Linux and Mac anytime in the foreseeable future, and I had a lot of time on my hands due to the Covid-19 pandemic I decided to do some experimentation. I've done experimentation on running RailPro software on alternate operating systems before, both with Wine on Linux and ReactOS but these were failures; Wine had no support for HID devices and ReactOS is based on a version of Windows that RailPro software no longer runs on (I could possibly workaround for that but that's another day).

What started this round of experiments was finding out Wine had come a long way since those early days experiments and now had support for HID devices. I had to try it! For this experiment I ran a 32bit version of Lubuntu (based on Ubuntu 18.04) in a virtual machine (VM) on a old host with not much RAM. By far not the best setup but it's all I had to work with at the time.
. . .
The experiment begins...

After setting up Lubuntu in the VM and updating everything I started the journey. Visiting the download page for Wine at WineHQ, the first thing I had to do was to find out which version of Ubuntu my installation of LUbuntu was matched to so I could download the correct version on Wine.

WineHQ download part screen.png

After a little bit of mucking around I found out the version and started the installation process.

In the Lubuntu terminal I downloaded and added the repository key for Wine.

Code: [Select]
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

and then added the apt repository for the correct Ubuntu version for my copy of LUbuntu.

Code: [Select]
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

A note at the top of the installation page mentioned that the version of Wine I needed to use required some extra packages that they didn't include so I had to download them separately. Given the choice of two ways to do this I opted to add the repository to Apt the same way as for Wine.

After updating the packages in apt we can then install Wine. For this I chose the stable branch (there is also the development and staging branches, which for non techies basically means beta), also installing the recommend packages.

Code: [Select]
sudo apt install --install-recommends winehq-stable

After this Wine should be ready to go. I had already downloaded the installers for RailPro Assistant and HC Simulator to the desktop. As they were automatically associated with Wine it was just a matter of double clicking the installers.

Lubuntu Wine prefix updating 322x132.jpg
Lubuntu Wine extra packages install 412x207.jpg
Well not quite ready to go

When first run, Wine will update it's prefix (configuration). It's at this point some not so well written words made me do the opposite of what I should have done. Wine will look for a couple of packages (Gecko and Mono) and after not finding them ask if it should fetch and install them. According to the installation guide at the WineHQ website you should answer YES here. The way I read the wording in the messagebox made me select no. This resulted in me having to install them later after working out which versions of each I actually needed; another not straight forward exercise because it wasn't specified anywhere.Once the prefix is updated the installation will continue.

Click to enlarge
Lubuntu Wine RPA Install.jpg
Looking good. You can ignore the admin notice and just click YES, Windows administrator permissions don't matter here

Click to enlarge
Lubuntu Wine RPA finished install.jpg
Installation Done!

Will it run? Yes it does, and is connected to the Internet too!.

Click to enlarge
Lubuntu Wine RPA running no HC connected.jpg

Ok, so it wasn't quite that simple. When I first ran it Railpro Assistant didn't connect to the internet. I had forgotten to change the network adapter type in the VM from NAT to Bridge. For some reason RailPro Assistant doesn't work in NAT mode. I spent more  minutes than I'd like to admit pondering why it wouldn't connect in Wine before I remembered about the network adapter in the VM So, with RailPro Assitant able to connect to the internet it was time to see if RailPro Assistant could see HC Simulator when it was running.

Click to enlarge
Lubuntu Wine RPA HCSim running together.jpg
Success!

Being quite pleased at this point it came to the first real test; can we download anything?

Click to enlarge
Lubuntu Wine HC Simulator downloading from internet.jpg
Yes we can!

More success. Knowing how RailPro Assistant and HC Simulator communicate to each other this was a pretty big deal to see this work right off the bat running in Wine. So we had gotten Wine installed and confirmed that the software runs in Wine. We we're off to a good start. Next in Part 2; The CI-1, the HC-2b, and getting them working

- Tim

G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Experiments 1: Running RailPro software on Linux using Wine - Part 2
« Reply #1 on: June 08, 2020, 08:58:44 AM »
Part 2: The CI-1, the HC-2b and getting them working

With both RPA and HC Simulator running it under Wine it was time to find out the answer to the BIG question; can the software see the hardware; and does it work? I did a lot of research from this point as I knew from previous experiments that HC Simulator would not be able to see the CI-1 (or RPA see the HC-2b) with the way Linux permissions work with USB devices, and also that I'd likely have to help Wine know about the devices. Plugging in the CI-1 and passing it though to the VM Linux can see the CI-1 and identify it.

Lubuntu CI-1 dmesg and lsusb 666x453.jpg
lsusb and dmesg output showing the CI-1

The information given by the dmesg and lsusb commands gave me the information to know which device in Linux was the CI-1, which was Hidraw1 in this case. Changing the permissions for it  is easy.

Code: [Select]
sudo chmod 0666 /dev/hidraw1

No, that isn't a bad reference but just the way *nix permissions work, each number represents a user type on the system and the number relates to a set of permissions that the user has in relation to reading, writing and executing (running) a file, directory or device. The number 6 is read and write permissions which is what we need to be able to access the device.

With the permissions changed lets try HC Simulator. Can it see the CI-1?

Click to enlarge
 [ Attachment ]
Nope, no luck there

I figured as much would happen but it was worth the shot. Now came the "fun" part. Previous study from years ago when I identified a bug in both RailPro Assistant and HC Simulator  that prevented the CI-1 and HC-2b from being detected by RailPro Assistant and HC Simulator on some computers I knew how they both got the information they needed to locate and use the CI-1 and HC-2b. This information was in the Windows Registry and was called from a Windows DLL file.  I'd have to duplicate this registry information into Wine manually and hope that the Wine version of that Windows DLL file implemented the functions needed to retrieve the information. Starting off in the Windows Registry I'd had to find where all this information relevant to the CI-1 and HC-2b was. Thankfully that previous knowledge came in handy again. Knowing that USB devices have a vendor id and product id and knowing what they were I was about to search quickly for them.

 [ Attachment ]
One of the registry entries for the CI-1

One thing to note about this is that for every different port you plug the same USB device into an entry is created in the registry for it. You can see that I've had the CI-1  plugged into different ports over time. Because there are entries in different places of the registry and the different entries are tied together I'd have to find which entries matched which. In the beginning I did not do this and just duplicated all the entries for the CI-1 and HC-2b (or so I  thought) but this was not a good approach and it was messy and didn't work. After some more research to work out how the entries were tied together I redid the exercise methodologically and made a registry file each for the CI-1 and HC-2b that I could import into Wine.

Registry file for the CI-1
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}]
"DeviceInstance"="HID\\Vid_04d8&Pid_f321\\6&24b60e9&0&0000"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{4d1e55b2-f16f-11cf-88cb-001111000030}\##?#HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\#]
"SymbolicLink"="\\\\?\\HID#Vid_04d8&Pid_f321#6&24b60e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000]
"Capabilities"=dword:000000e0
"UINumber"=dword:00000000
"ConfigFlags"=dword:00000000
"HardwareID"=hex(7):48,00,49,00,44,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,31,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,48,00,49,00,44,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,31,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,00,56,\
  00,49,00,43,00,45,00,5f,00,55,00,50,00,3a,00,46,00,46,00,30,00,30,00,5f,00,\
  55,00,3a,00,30,00,30,00,30,00,31,00,00,00,48,00,49,00,44,00,5f,00,44,00,45,\
  00,56,00,49,00,43,00,45,00,00,00,00,00
"CompatibleIDs"=hex(7):00,00,00,00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0011"
"Mfg"="(Standard system devices)"
"DeviceDesc"="HID-compliant device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000\Device Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\Vid_04d8&Pid_f321\6&24b60e9&0&0000\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8]
"DeviceDesc"="USB Human Interface Device"
"LocationInformation"="CI-1"
"Capabilities"=dword:00000084
"UINumber"=dword:00000000
"HardwareID"=hex(7):55,00,53,00,42,00,5c,00,56,00,69,00,64,00,5f,00,30,00,34,\
  00,64,00,38,00,26,00,50,00,69,00,64,00,5f,00,66,00,33,00,32,00,31,00,26,00,\
  52,00,65,00,76,00,5f,00,30,00,30,00,30,00,32,00,00,00,55,00,53,00,42,00,5c,\
  00,56,00,69,00,64,00,5f,00,30,00,34,00,64,00,38,00,26,00,50,00,69,00,64,00,\
  5f,00,66,00,33,00,32,00,31,00,00,00,00,00
"CompatibleIDs"=hex(7):55,00,53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,\
  5f,00,30,00,33,00,26,00,53,00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,\
  00,30,00,30,00,26,00,50,00,72,00,6f,00,74,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,26,00,53,\
  00,75,00,62,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,30,00,00,00,55,00,\
  53,00,42,00,5c,00,43,00,6c,00,61,00,73,00,73,00,5f,00,30,00,33,00,00,00,00,\
  00
"ClassGUID"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
"Class"="HIDClass"
"Driver"="{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\\0010"
"Mfg"="(Standard system devices)"
"Service"="HidUsb"
"ConfigFlags"=dword:00000000
"ParentIdPrefix"="6&24b60e9&0"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8\Device Parameters]
"ExtPropDescSemaphore"=dword:00000001
"SymbolicName"="\\??\\USB#Vid_04d8&Pid_f321#5&269a58e2&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_04d8&Pid_f321\5&269a58e2&0&8\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0010]
"InfPath"="input.inf"
"InfSection"="HID_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="usb\\class_03"
"DriverDesc"="USB Human Interface Device"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0011]
"InfPath"="input.inf"
"InfSection"="HID_Raw_Inst"
"InfSectionExt"=".NT"
"ProviderName"="Microsoft"
"DriverDateData"=hex:00,80,62,c5,c0,01,c1,01
"DriverDate"="7-1-2001"
"DriverVersion"="5.1.2600.5512"
"MatchingDeviceId"="hid_device"
"DriverDesc"="HID-compliant device"

I imported the registry entries into Wine and called the "fun" part of the exercise done. Will we be successful with HC Simulator being able to detect the CI-1 now?

Click to enlarge
Lubuntu Wine still no CI-1 detected.jpg
Still no luck

At this point I figured that those dll functions that were needed weren't implemented in the wine version of the dll file. As I had run a debug trace on that dll while HC Simulator loaded when I checked the debug output I could see that the calls were being made and the information from the registry was being loaded. So what could be wrong? Some more research picked up a clue hidden away in a single blog post from years ago. With Wine there are three ways to detect HID devices; hidraw, evdev and SDL. The blog post was from a user who was seeking help on a game being broken by a Wine update. The solution was to disable SDL as it was being used as the default detection method since the update, which stopped the game working. After disabling SDL the game worked again.

Click to enlarge
Lubuntu Wine registry disable SDL.jpg
Disabling SDL in the Wine registry


Running HC Simulator again we have a Winner!!!

Click to enlarge
Lubuntu HC Simulator CI-1 recognised.jpg

But does it work?

Click to enlarge
Lubuntu Wine CI-1 found LM2-S.jpg
Throw your arms in the air and say yes! We can control RailPro devices.

With the CI-1 worked out and working, what about the HC-2b? After unplugging the CI-1 and plugging in the HC-2b and passing it to the VM running the dmesg and lsusb commands again gives us the same device identifier in Linux, hidraw1. Because we created a new hidraw1 device we need to change the permissions on it as we did for the CI-1. Loading up RailPro Assistant the HC-2b is detected so it was time for the big test, selecting a file to download would the HC-2b download the file?

Click to enlarge
Lubuntu Wine HC-2 downloading from internet.jpg

The file downloaded to the HC-2b without any problems.

Next in Part 3, The HC-1, the old HC-2 and wrapping the experiment up.

- Tim
« Last Edit: June 08, 2020, 12:25:34 PM by G8B4Life »

G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Experiments 1: Running RailPro software on Linux using Wine - Part 3
« Reply #2 on: June 08, 2020, 08:59:07 AM »
Part 3: The HC-1, the old HC-2 and wrapping the experiment up.

There's a lot less pictures in this part.

I had actually started this experiment with an old HC-2 because it should have been easier to get this working in Wine than the CI-1 and HC-2b but it proved to be around the other way around. The amount of text and pictures for this part do not do the amount of head scratching, research and typing in commands into the terminal justice.

Plugging in the old HC-2 (the HC-1 would be exactly the same for this) and running the dmesg and lsusb commands gives us a device on ttyUSB0 and not hidraw. This is because the HC-1 and old HC-2 are not USB HID devices like the CI-1 and HC-2b but present to the operating system as a serial device on a Com port, or to put that in a finer detail, a virtual Com port. This is due to them having what's called a usb to serial converter built into them.

Lubuntu FTDI HC-2 dmesg and lsusb 666 x 455.jpg

It was at this point I had some head scratching to do. There are two methods of accessing FTDI usb to serial converters, a way directly via the virtual com port, and another using the functions in FTDI's third party DLL file, ftd2xx.dll. Both ways seem to have a lot of propriety drivers on Windows to make this happen, which can not be used in Wine.Now if Ring Engineering had chosen to use the directly via the virtual com port method to talk to the old HC's this likely would have been quicker and much easier but they chose the ftd2xx.dll method for RailPro Assistant to access the old HC's. I knew it was highly unlikely that I'd be able to use this Windows dll in Wine, and trying it on the chance confirmed that to be the case so off I was to do more research, starting with FTDI themselves.

FTDI make drivers for many operating systems, and so make the functions in ftd2xx.dll available for Linux in a Linux library as well. This is now the reverse of the issue because RailPro Assisant being a Windows program would not be able to use the Linux version of the ftd2xx.dll. What was needed was a way for Wine to pass those ftd2xx.dll functions calls from RailPro Assistant to the Linux ftd2xx library. The web is littered with posts on various websites from people who want to get serial to usb working on wine and failed but I found a couple of "wrappers" amongst the litter to do the passing but they were all quite old and the instructions likely to be well out of date, if they would even work with the much newer version of Wine that I was using.

To save myself from having to compile code, and running in a virtual machine so security wasn't much of an issue I chose a compiled version wrapper that made reference to the latest Linux ftd2xx library to work with. Starting out, the instructions were definitely out of date, with the file locations wrong for then the files are located today

Lubuntu ftd2xx_dll libwine_so_1 not found 667x456.jpg
libwine.so.1 not found, it's no longer in the place that the old ftd2xx.dll.so thinks it should be

Once I had located the location to put the files and created a link from the old location to the new location all was ready to go.

Code: [Select]
ln -s /opt/wine-stable/lib/libwine.so.1.0 /usr/lib/libwine/libwine.so.1

Success. RailPro Assistant was able to detect the old HC-2 through the Wine wrapper to the Linux ftd2xx library. All that was left to do was to try downloading something.This was a failure. While RailPro Assistant could see the old HC-2 the HC-2 gave that old message "Can not connect" when trying to download. Back to square one.

As I couldn't see what was going on I tried a different wrapper. This one had debug information in it which allowed me to see what was going on. The debug output indicated that ftd2xx could not get a handle on the file, meaning the HC-2. Some more research led me to an old  technical note from FTDI that stated that the virtual com port driver and ftd2xx were not compatible on Linux, and to use ftd2xx the virtual com port driver needs to be unloaded.

Code: [Select]
rmmod ftdi_sio
rmmod usbserial

After doing this the ttyUSB0 device disappears however when running RailPro Assistant the HC-2 can still be detected. Will it download now?

Click to enlarge
Lubuntu Wine HC-2 downloading from internet.jpg
Yes, it now downloads!

This was finally successful, with the old HC-2 downloading the file without issue.
. . .
Wrap up

The experiment was a success, I was able to successfully run RailPro Windows software on Linux using Wine, and communicate and use all the hardware as well. This means that there is a viable way to run RailPro on Linux until native Linux versions become available, if ever. I know that probably only interests me but...

It also means that there is likely another free way to run RailPro software on a Mac as well, Wine is available for Mac (some versions excepted) and Mac OS is really just an expensive Linux (both Linux and Mac OS are Unix derived).

While the experiment was a success there is more to do to make the experience better for a ready to go solution that I didn't bother to do for the experiment, like creating rules so one would not have to change the permissions of the hidraw every time a CI-1, HC-2b was plugged in, compiling a new version of ftd2xx and also making a script to do many parts of the setup automatically instead of having to type out every command needed.

I hope you enjoyed Experiment 1. Experiment 1 was a precursor for Experiment 2; hopefully coming in a couple of weeks.

Final thought? There were a lot of dead ends in this experiment. The internet is littered with out of date information on using HID and serial to USB converters. A lot of reading and testing went into extracting the still relevant parts from all the outdated stuff to put together into a working solution.

... and lastly, trying to do this a virtual machine running only 1 GB of RAM is painful to say the least!

- Tim
« Last Edit: June 09, 2020, 03:10:03 AM by G8B4Life »

William Brillinger

  • Dispatcher (Admin)
  • Conductor
  • *****
  • Posts: 1345
    • Precision Design Co.
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #3 on: June 08, 2020, 12:01:00 PM »
That is great work Tim, I can't wait to see where this goes in the next experiment!
- Bill Brillinger, RPUG Admin

Modeling the BNML in HO Scale, owner of Precision Design Co., and RailPro Dealer.


G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #4 on: June 08, 2020, 12:39:23 PM »
Thanks Bill,

Some light reading for your Sunday morning ?  ;) Unfortunately no matter what I did the forum just won't put two of those pictures inline in part 2.

Anyway, Experiment 2 (and 3) is on it's way to me. I still have to get a couple of things to do it though but I do have high hopes for the next experiment, and it should be a much more interesting subject for the group should it be a success.

- Tim

atsfguy

  • Conductor
  • ****
  • Posts: 112
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #5 on: June 08, 2020, 12:49:36 PM »
 Your computer knowledge astounds me , Tim! I wish I understood a fraction of what you did but don’t have the background for it. We are extremely fortunate that we have such knowledgeable individuals in this group who can lead we who lack such knowledge.
 
Cecil
ATSF

Alan

  • Conductor
  • ****
  • Posts: 1073
    • LK&O Railroad
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #6 on: June 08, 2020, 04:40:16 PM »
Tim, I tried to use Google translate to convert your Greek into English but no luck.  :P

Clueless what you are doing but sounds like some serious sleuthing going on. I'm still hunting for the "any" key.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #7 on: June 09, 2020, 12:47:34 AM »
Ok, so I mucked that comment to Bill up, it was not Sunday morning there but Monday morning. Public holidays on a Monday always throw me off on what day of the week it is. I feel so stupid  :-[

Cecil, I wasn't expecting anyone to get the technical side of what was in the experiment but hopefully you were able to follow the journey on the things I had to do to get it to work, even if you didn't understand it. That was my aim anyway.

Tim, I tried to use Google translate to convert your Greek Geek into English but no luck.  :P

I fixed it for you Alan  ;D

As to what I'm doing, Well not everyone has a PC with MS Windows to run RailPro Assistant and HC Simulator on. I just made it run on Linux. That should give you some clues.

- Tim

faithie999

  • Conductor
  • ****
  • Posts: 165
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #8 on: June 09, 2020, 06:52:08 AM »
Tim, I tried to use Google translate to convert your Greek into English but no luck.  :P

Clueless what you are doing but sounds like some serious sleuthing going on. I'm still hunting for the "any" key.
I spent some time in Kenya and learned that the idiom used there is "you're speaking French!"

faithie999

  • Conductor
  • ****
  • Posts: 165
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #9 on: June 09, 2020, 07:00:05 AM »
Tim:

I keep a PC laptop in my train room solely to use for RP. should I be excited about experiments 2 and 3?   it would be nice to use my Mac for RP and then get rid of the PC!

I really enjoyed the documentary on your travels through Wine country.  I'm an engineer (likely you are, too) and all the detail, as well as the obvious enjoyment of the journey as well as the destination, rang true to me.

ken




G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #10 on: June 09, 2020, 10:04:28 AM »
Ken,

No not an engineer. My job title has the word technician in it but it's a totally unrelated field.

Depending on what your an engineer of I can't say if you should be excited or not about experiment 2 but if your an engineer in the field of electronic devices then I think you'll certainly appreciate it, if not be excited.

Experiment 2, if successful, would allow you to get rid of the PC, but it's not a Mac experiment. Unfortunately I don't have access to a Mac to do experimenting with. I suspect it would be the same, or at least very similar to making it work under Linux with Wine but I just don't know for sure.

- Tim

blbruhn

  • Fireman
  • **
  • Posts: 3
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #11 on: June 30, 2020, 01:54:47 PM »
Thanks for the information!  I am trying to duplicate your results under Ubuntu 16.04 and Wine 5, but I have gotten stuck at the Registry settings for the HC-2b.  The Registry settings you published are good for your computer only, and I am not sure how to do it for myself.  Can you point me to a good resource to understand how to build the Registry keys correctly?

Wine prepopulated an HID and HIDRAW keys, but not USB.  The second identifier you have under USB is outside my limited understanding..Yet!

Thanks!!

TrainBrain

G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1241
  • I'll think of a catchy tag line one day
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #12 on: June 30, 2020, 10:53:16 PM »
Welcome to the forum Trainbrain.

I'm really happy to see you trying to duplicate what I did but as it was just a "journal" of the experiment and not a proper how-to there is possibly steps I missed writing down, though I don't think I missed any steps, and one thing I didn't post at all. I always intended to go back and finish it up (make it so a person doesn't have to change the permissions every time, a desktop icon etc) and write a proper how-to but I got distracted by experiment 2 (which isn't going so well). I'll try and do a proper how-to tonight.

So, back to where you are stuck, the registry information I posted is only for the CI-1, there is a whole separate set of registry entries for the HC-2b which I didn't post in the experiment (remember, was going to come back and write a proper how-to). I've attached them to this post for the time being. Download them and import them in the Wine registry editor.

The registry files should be good for anyone, not just me. As to find a resource to understand the registry to be able to build keys? it's black magic and even I don't understand it! The registry information was extracted from a Windows PC that had already seen a CI-1 and HC-2b.

- Tim

*CI-1.reg CI-1 registry entries
*HC-2b.reg HC-2b registry entries

« Last Edit: June 30, 2020, 10:59:51 PM by G8B4Life »

blbruhn

  • Fireman
  • **
  • Posts: 3
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #13 on: July 01, 2020, 09:55:56 AM »
Thank you G8B4Life!  I added that reg section and it worked on the first try!  I will need to go back and try to figure out what was different in my attempt compared to yours.  I know that I did not have a Windows example available, and I was trying to logic my way through the registry.  Logic does not apply to Windows.

I do find it a little disappointing that most groups do not create software for their hardware that runs outside the Windows universe.  Being primarily a Linux person (and not necessarily good at it), these situations force me to learn more about Linux.

When you get a draft of the How-to made, I will be glad to proof read it and test it out on a clean Linux install to see if everything works like you expect in a separate computer with a less informed user.

Thank you for your efforts and help.  Time to install my first Railpro Receiver and figure out how to make directional ditch lighting on a switcher! 

Smoke

  • Fireman
  • **
  • Posts: 31
Re: Experiments 1: Running RailPro software on Linux using Wine - Part 1
« Reply #14 on: July 01, 2020, 01:32:03 PM »
Thank you for your efforts and help.  Time to install my first Railpro Receiver and figure out how to make directional ditch lighting on a switcher!

Check out this thread:
https://rpug.pdc.ca/index.php/topic,1021.0.html

I haven't built any boards yet, but I do have the components and have a PC board design. PM for more info, don't want to clog this thread.
-Andrew