MAC Service -> Cannot see USB devices when Run as Background Service

So when starting the Mac service in reverse mode via config file,
if I set it to run as background service it does not report attached devices.

Im starting the service as :/ sudo executableBinary -c configFile -b

Only if I run the server as a GUI app on Mac, can I see the devices and use them on the client (which Im already aware of cannot be a service to connect to devices.)

I run the client as :/ sudo client

Is this a known limitation because I could swear it worked last week :D

#2

so in a nutshell

sudo ./server -c configFile.ini -b ---> Starts the Mac daemon, client cannot get list though?

sudo ./server -c configFile.ini ----> Starts the Mac server GUI, client can get and use the remote devices.

Client is run as sudo ./client (No service since cannot connect without licence )

#3

When you install the server in the background with the -b argument it will say "Log file can be found at ", can post the contents of that file here.

#4

Hi Michael, thank you for your awesome support!

I have the logs, and will post shortly, but what I notice is happening is on my computer:

1) The server when started as a daemon is not reading the -c path/to/configFile.ini and is reading it's config from a default location? Where this is I do not know. It is defaulting to "listen" letting the clients auto find the device OK. But I require the server to be in ReverseClients mode. Hence the need for it to read the USB config file I specify.

2) When un-installing the server as a service using -b --> I cannot re-start the server with the same. -b command, I need to reboot my machine. Then it starts OK again. But alas, not using the config file I specify.

Here are the logs:
Tue Feb 27 06:41:17 2018 LOG_INFO >>> Shutdown <<<
Tue Feb 27 06:43:22 2018 LOG_INFO >>> Starting VirtualHere USB Server v3.5.4 (Built: Feb 1 2018, 20:32:47)<<<
Tue Feb 27 06:43:22 2018 LOG_WARNING Warning, cannot lookup the exe path, 2 (No such file or directory) (defaulting to HOME)
Tue Feb 27 06:43:22 2018 LOG_WARNING Warning, tried finding HOME directory but that also failed, config.ini will be loaded from pwd
Tue Feb 27 06:43:22 2018 LOG_INFO Using configuration config.ini
Tue Feb 27 06:43:25 2018 LOG_INFO Server licensed to=unlicensed max_devices=1
Tue Feb 27 06:43:25 2018 LOG_INFO Disabling usbmuxd
Tue Feb 27 06:43:25 2018 LOG_INFO Listening on all network interfaces at TCP port 7575 (IPv6 dual-stack)
Tue Feb 27 06:43:25 2018 LOG_INFO Registration called
Tue Feb 27 06:43:25 2018 LOG_INFO Found High speed device [12d1:14dc] "HUAWEI_MOBILE, HUAWEI_MOBILE" at address 4195565568
Tue Feb 27 06:43:25 2018 LOG_INFO Found Low speed device [0c45:7603] "0x0c45, USB Keyboard" at address 4195561472
Tue Feb 27 06:43:25 2018 LOG_INFO Found Full speed device [258a:1007] "SINOWEALTH, Game Mouse" at address 4195557376
Tue Feb 27 06:43:25 2018 LOG_INFO Found Full speed device [05ac:821a] "Apple Inc., Bluetooth USB Host Controller" at address 4195430400
Tue Feb 27 06:43:25 2018 LOG_INFO Found Full speed device [05ac:0246] "Apple Inc., Apple Internal Keyboard / Trackpad" at address 4195483648
Tue Feb 27 06:43:25 2018 LOG_INFO Found Low speed device [05ac:8242] "Apple Computer, Inc., IR Receiver" at address 4245749760
Tue Feb 27 06:43:25 2018 LOG_INFO Found High speed device [05ac:8509] "Apple Inc., FaceTime HD Camera (Built-in)" at address 4196401152
Tue Feb 27 06:45:59 2018 LOG_INFO Re-enabling paceap (iLok)
Tue Feb 27 06:45:59 2018 LOG_INFO Unmanaging device 4195565568 [12d1:14dc]
Tue Feb 27 06:45:59 2018 LOG_INFO Unmanaging device 4195561472 [0c45:7603]
Tue Feb 27 06:46:00 2018 LOG_INFO Unmanaging device 4195557376 [258a:1007]
Tue Feb 27 06:46:00 2018 LOG_INFO Unmanaging device 4195430400 [05ac:821a]
Tue Feb 27 06:46:00 2018 LOG_INFO Unmanaging device 4195483648 [05ac:0246]
Tue Feb 27 06:46:00 2018 LOG_INFO Unmanaging device 4245749760 [05ac:8242]
Tue Feb 27 06:46:00 2018 LOG_INFO Unmanaging device 4196401152 [05ac:8509]
Tue Feb 27 06:46:01 2018 LOG_INFO >>> Shutdown <<<
Tue Feb 27 06:46:34 2018 LOG_INFO >>> Starting VirtualHere USB Server v3.5.4 (Built: Feb 1 2018, 20:32:47)<<<
Tue Feb 27 06:46:34 2018 LOG_WARNING Warning, cannot lookup the exe path, 2 (No such file or directory) (defaulting to HOME)
Tue Feb 27 06:46:34 2018 LOG_WARNING Warning, tried finding HOME directory but that also failed, config.ini will be loaded from pwd
Tue Feb 27 06:46:34 2018 LOG_INFO Using configuration config.ini
Tue Feb 27 06:46:37 2018 LOG_INFO Server licensed to=unlicensed max_devices=1
Tue Feb 27 06:46:37 2018 LOG_INFO Disabling usbmuxd
Tue Feb 27 06:46:37 2018 LOG_INFO Listening on all network interfaces at TCP port 7575 (IPv6 dual-stack)
Tue Feb 27 06:46:37 2018 LOG_INFO Registration called
Tue Feb 27 06:46:37 2018 LOG_INFO Found Full speed device [258a:1007] "SINOWEALTH, Game Mouse" at address 4195557376
Tue Feb 27 06:46:37 2018 LOG_INFO Found High speed device [12d1:14dc] "HUAWEI_MOBILE, HUAWEI_MOBILE" at address 4195565568
Tue Feb 27 06:46:37 2018 LOG_INFO Found Low speed device [0c45:7603] "0x0c45, USB Keyboard" at address 4195561472
Tue Feb 27 06:46:37 2018 LOG_INFO Found Full speed device [05ac:821a] "Apple Inc., Bluetooth USB Host Controller" at address 4195430400
Tue Feb 27 06:46:37 2018 LOG_INFO Found Full speed device [05ac:0246] "Apple Inc., Apple Internal Keyboard / Trackpad" at address 4195483648
Tue Feb 27 06:46:37 2018 LOG_INFO Found Low speed device [05ac:8242] "Apple Computer, Inc., IR Receiver" at address 4245749760
Tue Feb 27 06:46:37 2018 LOG_INFO Found High speed device [05ac:8509] "Apple Inc., FaceTime HD Camera (Built-in)" at address 4196401152

#5

When specifying the service I'musing FQ file names so I'm confused about why it cannot find the config file:

sudo ./virthmac -b -c /Users/David/Hyve/node.app.usbipserver/dist/assets/_virth/vhconfig.ini

#6

Config FIle:

ServerName=MacBookDev
UseAVAHI=0
ReverseClients=localhost:7573
It=1519460818

#7

Ok i checked, and the osx server running as a daemon will not yet support the -c argument. So it will use the default path to the config.ini file. To find this file do this

sudo find / -name "config.ini" 2>/dev/null

That is the file you need to edit but ideally you shouldn't need to directly edit the config.ini file. You need to stop the launchd daemon first then edit the config.ini file then start the launchd daemon.

To Stop sudo launchctl stop com.virtualhere.vhusbd
To Startsudo launchctl load -w /Library/LaunchDaemons/com.virtualhere.vhusbd.plist

#8

Thanks for the configuration and the hint!
Still quite new to the unix shells.
So seeing a find command teaches me more the just how to cook the fish!

#9

Okay so I found the config file that was created and used is the one in the / directory.

Thanks again.