Trying to add startup parameter to client ISSUE OSX Monterey

47 posts / 0 new
Last post
bassmagnetic
Trying to add startup parameter to client ISSUE OSX Monterey

I'm trying to add a startup parameter to the client on OSX, the FAQ says that there is a file I can add it to at:

/Users/Username/Library/Preferences/vhui Preference

However this directory doesn't exist on OSX Monterey, I can't seen to find the file.... (in fact the directory /Users/Username/Library doesn't seem to exist)

I want to add -a for adminstrator mode...

another question, is administrator mode the only way to "use device" if it was previously being used on another client... is there no way that when the client is closed (computer is shutdown) that it automatically disconnects from using the device? Seems strange even if the client isn't running (computer is switched off) its still hogging the device and the device can't be used on another computer without kicking them off in adminstrator mode, is this correct?

Thanks!

Michael
.

If the client machine is switched off, then the device will not be used. It will be automatically disconnected after 12 seconds and be available to grab by another client.

To start the client in administrator mode do this:

/Applications/VirtualHereUniversal.app/Contents/MacOS/VirtualHereUniversal -a

bassmagnetic
The device (an ilok) is not

The device (an ilok) is not getting disconnected when client machine is switched off. I'm using a Synology NAS and 2 clients, one on a windows machine and another mac....
When I try and 'use' the ilok on the mac I'm getting an 'Ilok Sharing Error : An ilok cannot be shared across etc etc', that error is when the windows machine is not switched on. Also running VH in administrator mode doesn't give me the option to kick off the other client (even tho that computer is switched off) to be able to use the Ilok, the only option that makes it work is to keep physically pulling the ilok out of the NAS and reinserting it.

Michael
.

OK no thats not what is happening, iLok needs to be power-cycled between uses. See here https://www.virtualhere.com/comment/5695#comment-5695

bassmagnetic
ah ok, so if I get one of the

ah ok, so if I get one of the hubs listed I won't have this problem? thx

Michael
.

Correct

bassmagnetic
It’s literally impossible to

It’s literally impossible to source any of those hubs (most of them years old) listed, I’ve purchased and returned 5 usb hubs. Are there any other options to make an Ilok work with your software over a network?
Atm it feels like wasted $50 spent for Virtual Here which specifically said it works for Iloks but it doesn’t, at least not without physically pulling the Ilok out every time, may as well pull it out and take it with me. I feel your documentation should be clearer about how it’s (not) working with iloks.

Michael
.

Yes it driving me crazy too, i want a hub i can definitely recommend for this.

I was researching some more and today i discovered this hub https://www.uugear.com/news/new-product-mega4-usb-3-1-ppps-hub-for-raspb...

So i have ordered one. When that gets here (on 28th Feb) i will standardize on this hub and get it working with virtualhere. I will let you know when its ready...

bassmagnetic
Great thanks Michael... does

Great thanks Michael... does a normal Raspberry Pi (3b/4b) without a shield not work?

Thought I had a genius idea, so I tried cutting the live wire for USB2 on a powered hub so that I could powerdown the hub with a wifi plug... It didn't work, I guess there is more than just power going down the VCC cable with USB... darn, not so genius!

The sheild looks like the ticket...

MarkoD
.

I've had good experience with the Amazon Basics 4 port USB 3.0 hub (HU3641V1). It's sometimes out of stock, but often becomes available again:

https://www.amazon.com/AmazonBasics-Port-2-5A-power-adapter/dp/B00DQFGH80
https://www.amazon.de/-/en/AmazonBasics-USB-Hub-Ports-Eurostecker/dp/B00...

bassmagnetic
Thanks for the info...

Thanks for the info... managed to order one from Germany.... hope it does the trick!

Michael
.

I have also ordered this hub https://www.yepkit.com/products/ykush for testing because it seems like its easier to power on/off the ports..and no need for weird plugs.

The uugear has very awkward plug as you need a usb 3 to 3 extender cable which are rare to find.

MarkoD
@bassmagnetic: I've been

@bassmagnetic: I've been using this hub for over 1 year and it works excellent with VirtualHere. It solved the power issues I've been having and I've written a script that power-cycles the USB ports via VirtualHere commands. It's working like a charm and I haven't had any issues since.

@Michael: That HUB looks promising, will you add support for it into VirtualHere later on?

Michael
.

Yes probably, if it works well and is easy to use

bassmagnetic
@michael thanks for the info…

@michael thanks for the info… ah ok maybe it’s not going to be plug and play…. What scripts did you need to write, is it possible to share?

bassmagnetic
Oops that should have been

Oops that should have been @MarkoD

bassmagnetic
Got the hub @MarkoD... VH

Got the hub @MarkoD... VH still has the ilok sharing problem, any help to make the hub work, if that is through scripting, greatly appreciated!

MarkoD
Script

Here is the Windows command line script I've written that restart the port:


@echo off
set port=21
if not "%2"=="" set "port=%2"
pushd "%PROGRAMFILES%\VirtualHere"
echo Disconnecting USB...
vhui64.exe -t "STOP USING,%1.%port%"
timeout /t 1 /nobreak > NUL
echo Power-cycling USB port...
vhui64.exe -t "CUSTOM EVENT,%1.%port%,power_cycle_port"
timeout /t 13 /nobreak > NUL
echo Reconnecting USB...
vhui64.exe -t "AUTO USE DEVICE,%1.%port%"
popd

You can save the script in a .cmd (or .bat) file and run it like this:

script.cmd

You can see the server name and port number in the VirtualHere client GUI.

MarkoD
Errata

I can't edit my previous post, so here is a follow-up:

The script presumes that vhui64.exe is located in C:\Program Files\VirtualHere.
Here's the correct way to run the script:

script.cmd server_name port_number

The first parameter is required, the second one is optional and defaults to "21".

You can write your own script, these are the commands that you should use:

vhui64.exe -t "STOP USING,server_name.port_number" (notice the dot between the server and port)
vhui64.exe -t "CUSTOM EVENT,server_name.port_number,power_cycle_port"
vhui64.exe -t "AUTO USE DEVICE,server_name.port_number"

More info on the client API here: https://www.virtualhere.com/client_api

MarkoD
More info

PS: The script is not fully automated, because after every command sent to VirtualHere, you have to close a small window showing the result of that action.

bassmagnetic
@MarkoD, just wanted to say

@MarkoD, just wanted to say thank you so much for this, I'm out of the studio atm but gonna try it when I'm back, thanks for sharing!

bassmagnetic
tried it out, but when the

tried it out, but when the script runs its says "Disconnecting USB" FAILED... "Power Cycling Port" OK, then when it tries to Use Device I get the Ilok sharing error.... any ideas?

MarkoD
I guess the first command isn

I guess the first command isn't needed for you, so the FAILED message can be ignored. Do you wait a couple of seconds after power-cycling the port? I have a 13 second pause in the script before I try to use the device again.

MarkoD
PS: Double-check whether you

PS: Double-check whether you are power-cycling the correct port. If the iLok has a LED light or something similar, make sure it goes dark for a second.

MarkoD
PS2: Michael wrote in the

PS2: Michael wrote in the topic he linked that a script isn't needed and VirtualHere should restart the port automatically. So perhaps Michael can chime in and give you more instructions.

Michael
.

Actually the port is automatically powercycled by the virtualhere (linux) server if it knows an iLok has just been used. It will power off then wait 5 seconds then power back on so there is no scripts required.

I received both those hubs above i mentioned above, but they arent suitable for different reasons.

So ive ordered the cypress CY4608 hub and Ill see how that goes...

bassmagnetic
Any idea why the hub would

Any idea why the hub would work for MarkoD and not for me?

Michael
.

My guess is its probably a new hardware 'revision' of the hub, where the manufacturer takes out "unnecessary" features from the original. You can see on the uhubctl site the different revisions. Im going to try the cypress early next week (that has been manufactured since 2011 so i think it will be stable, but i need to test it first)

MarkoD
@Michael: The AmazonBasics

@Michael: The AmazonBasics hub on the uhubctl page does not state any specific revisions, so all versions should work?

@bassmagnetic: Can you try plugging some other USB device into the same USB port (insteda of the iLok) and see it that device get its power cut (i.e. by turning a LED off) when running the script? That way you can make sure that the power_cycle command works as expected.

Michael
.

Well in theory yes but someone needs to discover that and report it , maybe they just havent reported it yet.

I think USB 3 power switching hubs are a bad idea and too unreliable. This is why im trying to standardize on a usb 2 hub on. Im really hoping the cypress works...

Michael
.

I received the CY4608 HX2VL development kit and it does work, but only one port 1. The other 3 ports dont support PPPS (even though they say they do)

You can get that hub (it is cheap US49 and free shipping) but only port 1 will power-cycle correctly. Here is my feedback https://github.com/mvp/uhubctl/issues/404

bassmagnetic
@Michael... I got the hub but

@Michael... I got the hub but it isn't power cycling... I assume Port 1 is J7? It isn't marked... Should it work out of the box?

Michael
.

Yes it most definately powercycles on port 1. Port 1 is the one closest to the upstream connector. Plug the ilok in there. Plug the hub into your synology. Then use the ilok via virtualhere. Stop using it, the ilok light will poweroff for about 3 seconds and then power on. Then try using the ilok on another client machine.

bassmagnetic
Ah ha it was in the wrong

Ah ha it was in the wrong port... indeed it works!!! thanks Michael and Marko!

bassmagnetic
weird tho... the ilok light

weird tho... the ilok light does switch off for a couple of seconds, but when I run VH on the mac I still get ilok sharing error.... wondering if it's not switching the port off to long enough?

Michael
.

ok I'm away on holidays until the 21st and will modify the period after that

bassmagnetic
i've done a little testing as

i've done a little testing as it was just a complete guess about needing to switch off for longer...
when I disconnect the device with VH it switches the blue light off the ilok for about 2 seconds which then comes back on solid blue
if I pull the ilok out of the port and quickly plug it straight back in, so probably about 2 seconds too, the ilok, when plugged back in flashes on and off the blue light a few times for a second before becoming solid blue light, the same as when u initially plug in the dongle....
so it seems maybe the power switching isn't doing the same as removing the dongle? I have no idea how usb works so all this is guesswork for me!

Michael
.

I was doing more investigation today and the server will power off the ilok wait 5 seconds then power on the ilok.

So the light should go off for 5 seconds. I tested again like this

1. Install ilok manager and virtualhere client on my win11 pc
2. Plug my 2nd gen ilok into the cypress usb hub port 1 connected to my ds120j synology nas
3. Plug my 3rd gen ilok into the cypress usb hub port 4
4. Install the ilok manager on my mac mini m1 and the virtualhere client
5. Use the 2nd gen ilok on the windows pc via virtualhere, rename the 2nd gen ilok, click synchronize
6. Stop using the ilok, the ilok(s) disappear from the list then come back 5 seconds later (For some reason the ilok on port 4 disappears as well but comes back)
7. Use the 2nd gen ilok on my mac mini. Click sync and rename using iLok manager
8. There are no sharing issues
9. Repeat steps 5-7 with the 3rd gen ilok instead which is on port 4 (which doesnt power cycle properly) and i get the sharing error.

So im pretty sure it works ok.

bassmagnetic
ah ok... i've got a 3rd gen

ah ok... i've got a 3rd gen ilok... so i guess thats the issue, will only the 2nd gen ones work?

Michael
.

I tried with the 3rd Gen iLok (the metal one) as well, and that works fine.

When i stop using , there is a delay of 5 seconds while the iLok drops off and comes back and it can be used on another client with no sharing error.

This is with the iLok plugged into port 1 which is the closest to the upstream port on the cypress hub.

bassmagnetic
Is the rename and sync

Is the rename and sync important thru Ilok manager? That’s the only thing in your process that I haven’t tried… Do you have to do this each time u use the Ilok?
I will try and see if it makes any difference

Michael
.

I rename and sync to make sure the ilok is used and communicated with during my testing.

bassmagnetic
In VH when I stop using the

In VH when I stop using the device the ilok doesn't ever disappear, all that changes is just (in use by you) disappears... so you no.6 doesn't happen in my case
........
6. Stop using the ilok, the ilok(s) disappear from the list then come back 5 seconds later

Michael
.

Sorry for 6. i should clarify

When i click stop using: actually i can still see the ilok connected but its light goes out on the hub for 5 seconds, then it comes back on

bassmagnetic
I've timed the off time and

I've timed the off time and its 3 seconds on my system... I don't know if it needs more time to properly power cycle.... is there a way to extend the off time so at least we can discount that before anything else... very strange it power cycles on your system to not get the ilok sharing issue but not on mine, as we both using synology nas....

bassmagnetic
i can send you a video so you

i can send you a video so you can see what is going on if you like, the power only seems to switch off for 2 to 3 seconds and the blue light doesn't flash a few times like it does when plugged in for the first time so its not properly power cycling

Michael
.

Sure, send it to mail@virtualhere.com, also can you reboot your NAS and see if that is enough to power-cycle?

Log in or register to post comments