Planet-9 Porsche Forum banner

PIWIS 2 virtual machine troubleshooting

20975 Views 46 Replies 23 Participants Last post by  John_987
The following is to be read in relation to the PIWIS 2 setup using a virtual machine as described in this thread link.

PIWIS 2 setup as a virtual machine

I’ve always had issues getting the PIWIS interface to connect consistently to the virtual machine. In addition to the problems I already was having, Rob997 discovered and came up with the solution to the black menu issue that occurs after about a year.

I decided to do a bunch of poking around to see if I could nut out exactly what indications I needed to see when it was connecting correctly. I now seem to have a method that consistently ensures the interface connects to the VM so it will then interact with the PIWIS program. If you are having issues, below is some stuff to check that might help. If people have seen other issues and found a fix, please add below.

Connection Procedure

Connection method seems to be critical. Do it in the order below. I’ve put additional items in italics that aren’t essential but that give you indications along the way that it is connecting correctly.

  • Start Virtualbox.
  • Connect both leads to the interface.
  • Connect interface to car. Should have flashing ‘power’ LED on the interface once it has been connected to the car.
  • If you have a red ‘status’ LED, continue with the procedures below. If it is recognised by Virtualbox as described in the next step, once you start the virtual machine it should update the firmware on the interface when the VM boots, which should turn off the red status LED.
  • Once the interface has been connected to car, wait a few moments and then connect the interface USB to your computer. Should get the ‘connecting device’ sound from host. Check the device is recognised by Virtualbox. Go to VirtualBox, Settings, USB. Click the small USB button on the right with the +, and check the Samtec device is listed. All the USB devices currently recognised by the host should be listed. To the left of this button the Samtec device should be listed to automatically mount when you start the VM as described in the linked thread above.
  • Start VM. As the host boots, you should get a single flash of the ‘USB’ LED when you hear the ‘disconnecting device’ sound from the host.
  • When VM has booted, go to Device Manager (Control Panel, System, Hardware) and check you can see ‘HSX Interface’ device under ‘LibUSB-Win32 devices’. Sometimes I’ve seen ‘unknown USB’ under LibUSB-Win32 devices and the PIWIS won’t connect to it correctly. If you are seeing this, right click on ‘unknown USB’ and then click ‘update driver’. It will then take you to the wizard. Allow it to automatically search for the driver and load it. Once this is done ‘HSX interface’ should replace ‘unknown USB’.
  • Start PIWIS program. Check the validity of imprint isn’t blank. If not, use the imprint procedure below. If you don’t do this you will most likely have the blank menu problem the next time you open the program.
  • You should see 8 options in the black menu on the left. If you only see 4 (diagnostics won’t be one of the 4 options), immediately complete the imprint procedure below. If you have no options on the black menu, you will need to completely reinstall the original PIWIS.ova file (as described in the linked thread above) to create a new virtual machine in Virtualbox and then imprint the device again.
  • Turn on ignition and then start diagnostics. Should see a solid ‘USB’ LED when the diagnostics connects. If it doesn’t connect, sometimes due to it updating firmware on interface, close diagnostics and open again.
  • When the connection is good, the green ‘power’ LED should be flashing and the green ‘USB’ LED should be on solidly.
Disconnection Procedure

I’ve seen issues when I haven’t disconnected the interface in the way described below. It seems to affect the firmware on the interface, which resulted in a red ‘status’ LED when you connect it to the car next time. The fix to this red status light is above in step 5.

  • Shutdown diagnostics. The ‘USB’ LED should go out when you do this.
  • Shutdown virtual machine. The ‘power’ LED should flash throughout this.
  • Remove interface USB plug from computer.
  • Disconnect interface plug from car.
Imprint procedure


1. Open PIWIS 2

2. Go to -- SETTINGS--> Tester Imprint

3. Go to "Licence" tab – The boxes should be greyed out and empty. If the imprint is valid, these boxes should be greyed but have the correct licence key visible. Go to "KEY" tab and click 'Create Key' (will generate a requirement code)

4. Enter any key and press save, keep repeating it until it says "too many faulty attempts"

5. go to "KEY" tab and click 'Create Key' (will generate a requirement code)

6. Exit PIWIS II with task manager. To exit PIWIS without shutting down the VM, right click on taskbar (at bottom), open task manager, then go to 'desktop' and end task.

7. Go to the folder "c:\user data" and locate the file "praegung.xml" (this is the 'praegung.xml' on the desktop) edit it with notepad and locate the part "demand key", delete the existing number and enter 4032546358 to replace the one in the file - save the file and close.

8. Start the piwis again, Go to -- SETTINGS--> Tester Imprint in the "KEY" tab you should see the key you have entered before.

9. go to "license" tab and enter the key below and click SAVE. This is the same key that is in the licence.txt file on the desktop that can be copy/pasted into the key.

s3nT IfSX sytP rDFo 1TRM Gw==

10. Now it should say "Tester was successfully imprinted" and validity should show 30 days. Close PIWIS with task manager.

11. Go to the folder (use the shortcut on the desktop) "c:\user data" and locate the file "praegung.xml" edit it with notepad and locate the part "validationstring" replace the 30 by unlimited OR enter "X" number of days (eg-9999)

Video below of how to stop the black menu problem. The batch file startup stopped working for some reason. Easy workaround shown.

See less See more
  • Like
Reactions: 2
1 - 20 of 47 Posts
Something else I'll mention that had me stumped.

I needed to delete the VM and re-install the PIWIS.ova file to create a new VM. It kept giving me an error in Virtualbox when I tried to created the VM. The reason was the original files for the first VM hadn't been deleted correctly. They should have been, but the folder was still there.

If you get this problem, go to C/User/Username/Virtualbox VMs and delete the old PIWIS folder. If it's there, Virtualbox won't allow you to created another VM of the same name.
I'm impressed; really.
As a child of the 60's that's way above my pay grade
With regard to the black menu problem, I was handed some information from PV997 at rennlist (there's a thread over there about the PIWIS VM) saying they has seen this issue appear earlier this year. They had found a few other solutions to the issue.

The one that seemed to be the simplest was when exiting PIWIS, don't click the blue 'close' button on the PIWIS program. Click the red 'x' at the top right of the window (this is the standard 'x' that shuts down a program), which shuts down the VM. You will immediately get a window pop up asking what type of shut down you want. Click 'power off machine', and it will immediately shut down. This then seems to stop some update from occurring when you shutdown the PIWIS program that in turn creates the black menu problem.
EDIT: this is an issue with my Host/Manjaro. Everything worked first try in about 5 minutes including importing the VM on a Windows 10 Host. Thank you.

Hello,

I have the XP VM imported and running in Virtualbox 6.1.12 on Manjaro Linux 20. Kernel 5.7. Guest Editions CD downloaded (not needed) extension pack 6.1.12 (needed). The XP VM boots and I can access all menus and use the PIWIS2 software in simulation.

After verifying the VM image and software functions I ordered a VCI. Powers on from the car great and semtec device is detected by Linux (dmesg -w when plug). Here is the order I am using:

1. Car ignition on (tried started engine as well)
2. Plug VCI to OBD port (powers on)
3. 15 sec wait, plug VCI USB port on Manjaro Host laptop
4. dmesg -w detects the device no errors
5. (with filter applied for semtec) boot VM.
6. VM mounts the VCI and detects it under Device Manager on boot (usb host controller drivers were taken care of on initial import/use)
7. Launch PIWIS2 -> Diagnostics -> 911 -> 997.
8. Diag window opens: 99010: diagnostic system could not be initialised. 99011 Comm. module not connected. Please check.
9. I retry with F8 multiple times and either receive the same message indefinitely OR it pops the progress window 'applying firmware (3.3.2 I believe) to VCI'
10. Once it applies firmware and 'resets the VCI' it just disconnects and won't reconnect. (I manually re connect it via 'Devices' in VBox and press F8 again.
11. (loop steps 9->10). I cannot get past these 'not found' or 'applying firmware' steps.

I have performed the imprint steps again in the software with the VCI connected (and without) no change. I have tried USB 1.1/2.0 and 3.0 (doesnt work native XP id have to patch in some drivers for that). I have disconnected and reconnected it at least 20-30 times in various combinations and have closed/reopened the software (through task manager) before/after 'firmware updates' etc, and it can never recognize the unit to poll the car.

If it 'applies the firmware' (which i don't believe is completing because it keeps repeating it..) and 'disconnects' and I hit F8 it will load the next screen and say unable to verify model 997 please check, and when i scan the avail modules none are highlighted/show any info. I'm surprised it 'goes through' like this as it obviously doesnt detect the VCI/car at that point, but that's the furthest I have gotten as far as screens go.

On the host:
With USB 1.1 selected I get: Process <PID> (USBDevIo--1) called USBDEVFS_CLEAR_HALT for active endpoint <hex address>. 6x when I press F8 and it attempts to communicate. (solid USB light, blinking pwr).

With 2.0 selected I get: vboxdrv messages as it detects it (VBoxEhciR0.r0 being the most relevant here I'd assume) and then when it tries to communicate (F8) it pops reset high-speed USB device number <#> using xhci_hcd.

3.0 (xhci) isnt supported/wont mount or anything in XP.

Looks like my host is having an issue 'downgrading' the native usb3 bus to 2 (ehci) for some reason? vbox ehci proxy/version issue? I think it is failing to 'reset' after the firmware update which is why it never takes and can never communicate. I have tried various linux kernels/host additions and vbox versions. all seem to exhibit the same issue of not communicating or finishing firmware updates.

TLDR: VCI 'reset' after seemingly mandatory 'firmware update' doesn't seem to complete from inside the VM, issue resetting on host?

Any help would be appreciated. I unfortunately don't have an old laptop around otherwise I'd just install the VM image straight to bare metal and negate the VM translations all together. May still be the way I end up going.

Thank you for reading.
See less See more
Yesterday I started having an issue with my PIWIS computer - when I selected a model under Diagnostics it would run through all 10 steps in the pop-up fine but get stuck on "Loading ODX Data" when bringing up the workspace (tried several models; 987, 996, 997). As a workaround I set up the VM on another laptop. Worked great but I'm having exactly the same issue here!! Anyone else seen this? Solutions?
I have been having problems with my PIWIS over the past few days as well. I may have made some progress but was getting stuck at the "Loading ODX Data" stage (which should only last for a few seconds) too. It occurred to me to wonder about the date. I have found that if I set the date of my VM back to 2020 (I set it back exactly 1 year to Jan. 2020) then PIWIS will complete loading! If you are using the VirtualBox VM method I followed steps from this link to stop the VM time from being the same as the host machine time:
Prevent VirtualBox Guest Syncing Time with Host

Then I manually set the time back inside the VM by one year and PIWIS worked again. I tested a few times and it really does seem to be calendar related. With the steps above the VM will be back to the real (after 2020) time following each boot and will need to have the time manually set back to 2020 or earlier. There is probably a tidier approach to fixing this, but you can try disabling the VM-to-host time sync and manually changing the year and see if that lets you use your PIWIS again.

Happy New Year.
See less See more
  • Like
Reactions: 2
I have been having problems with my PIWIS over the past few days as well. I may have made some progress but was getting stuck at the "Loading ODX Data" stage (which should only last for a few seconds) too. It occurred to me to wonder about the date. I have found that if I set the date of my VM back to 2020 (I set it back exactly 1 year to Jan. 2020) then PIWIS will complete loading! If you are using the VirtualBox VM method I followed steps from this link to stop the VM time from being the same as the host machine time:
Prevent VirtualBox Guest Syncing Time with Host

Then I manually set the time back inside the VM by one year and PIWIS worked again. I tested a few times and it really does seem to be calendar related. With the steps above the VM will be back to the real (after 2020) time following each boot and will need to have the time manually set back to 2020 or earlier. There is probably a tidier approach to fixing this, but you can try disabling the VM-to-host time sync and manually changing the year and see if that lets you use your PIWIS again.

Happy New Year.
That's it! I figured it would be date related. Being a VM rookie I tried changing the date in the VM but that didn't do it. Running the command from the link you referenced did it though.

Thank you very much!
thanks for sharing guys. i havent fired up piwis in 21 yet so this is a good FYI
I have been having problems with my PIWIS over the past few days as well. I may have made some progress but was getting stuck at the "Loading ODX Data" stage (which should only last for a few seconds) too. It occurred to me to wonder about the date. I have found that if I set the date of my VM back to 2020 (I set it back exactly 1 year to Jan. 2020) then PIWIS will complete loading! If you are using the VirtualBox VM method I followed steps from this link to stop the VM time from being the same as the host machine time:
Prevent VirtualBox Guest Syncing Time with Host

Then I manually set the time back inside the VM by one year and PIWIS worked again. I tested a few times and it really does seem to be calendar related. With the steps above the VM will be back to the real (after 2020) time following each boot and will need to have the time manually set back to 2020 or earlier. There is probably a tidier approach to fixing this, but you can try disabling the VM-to-host time sync and manually changing the year and see if that lets you use your PIWIS again.

Happy New Year.
Yup, I just had the same issue. This will pose an issue as time goes on as the service resets on later cars use the date from the computer. If anyone finds a solution be sure to share.
Yup, I just had the same issue. This will pose an issue as time goes on as the service resets on later cars use the date from the computer. If anyone finds a solution be sure to share.
really? i hope not. whats considered "later cars"
Yo .. also hit by the Y2K21 PIWIS Bug .. thanks to this forum and here is the easy way out for the non tec inclined .. As long as your system is Windows based and your PIWIS VM is named PIWIS this should be smooth sailing .. Just copy this into any batch file (i.e. piwis.bat) on the system your Piwis is running from, start it, enjoy, Thanks ;)

@echo off

rem 2021 PIWIS VM Configuration - Should work on Windows + VM named PIWIS
rem Thx to www.andysblog.de/virtualbox-zeit-synchronisation-deaktivieren

set VMname=PIWIS
set VMdate=09/11/2019

set VBoxPath=C:\Program Files\Oracle\VirtualBox

rem Date-Difference today to defined date

powershell ([datetime]'%VMdate%' - [datetime]::Now) | find "TotalMilliseconds :" > temp.txt

set /p MS=< temp.txt
del temp.txt /q

rem cut Variable ("TotalMilliseconds :" and delete after,)

set MS=%MS:~20,-5%

rem Time-Sync with host disable

"%VBoxPath%\VBoxManage" setextradata "%VMname%" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

rem set Offset

"%VBoxPath%\VBoxManage" modifyvm "%VMname%" --biossystemtimeoffset "%MS%"

rem start virtual machine

"%VBoxPath%\VBoxManage" startvm "%VMname%"
See less See more
  • Like
Reactions: 3
I am clearly less 'non tech inclined' than you assume. Can you explain exactly where the batch file needs to go. I've never dealt with batch files before, but I have an little understanding of what you are trying to do.

Also, for my own understanding, is this batch file read by Virtualbox when it starts or when the PIWIS virtual machine starts.

Cheers
Copy and paste his script into notepad and name it piwis.bat or anything .bat then just click on the file and the script will run on your PC.
Much appreciated.

Do you need to do this only once or every time the VM is used?
"%VBoxPath%\VBoxManage" setextradata "%VMname%" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

This line should disable the VM from getting the date from your computer. You can always check the date on the VM and in the program when you log in.
jjrichar, no offence intended, probably my wording came across as unfriendly, my apologies, I am actually very thankful to you as without your thread I am sure I would still be without PIWIS and much less happy ;)

The batch file is intended as a replacement to start Virtualbox/Piwis instead of directly executing Virtualbox
You can place it anywhere on your drive and just click on it, things should just run beautifully, at least on my system thats it, no other date setting inside or outside PIWIS is necessary anymore. One click, done.

It does not only tell the Virtualbox to not sync the hosts time, but also sets a vmvariable and overrides the hardware clock it seemed at least my installation was still updating from even after setting the setextradata

Also from here and other places and my own testing one still needed to set the date every time when newly starting the VM / Piwis, which made me think like .. well .. no .. digg deeper ... so I found this little gem on some german blog, translated some of the remarks, made it PIWIS specific to safe some other Porsche enthusiasts the hassle .. I will probably upload it as a file over the weekend for ease of use.

Laters
Klaus
See less See more
  • Like
Reactions: 1
Klaus, no offence taken at all. I was just having a dig at my own lack of computer knowledge. I feel pretty competent turning a wrench, but computers have always been a bit of a mystery. Thanks for the information.

With regard to starting the VM from just clicking this bat file, how does this go with the start sequence of connecting the interface, car connection etc that is critical for getting everything to work. Do you start Virtualbox first to check everything or just connect the interface to the car and computer and click the bat file?

Cheers.
  • Like
Reactions: 1
I answered my own question. I went and had a play and it seems the connection procedure doesn't change from what I've posted above except that starting the PIWIS VM can be done from the batch file only after connection is made and the Virtualbox application is already open. Otherwise it seems the interface won't connect.
  • Like
Reactions: 1
Yo .. also hit by the Y2K21 PIWIS Bug ..
Yes, Klaus - you rock! Thanks for fixing this so elegantly.
  • Like
Reactions: 1
1 - 20 of 47 Posts
Top