vhusbdarmpi 3.6.1 on RaspberryPi-1B not working

Hi,

after updating to vhusbdarmpi 3.6.1 on RaspberryPi-1B the server does not start properly.

"service vhusbdarm status" says:

vhusbdpin.service - LSB: Start VirtualHere USB Sharing on boot
Loaded: loaded (/etc/init.d/vhusbdpin)
Active: active (exited) since Tue 2018-04-17 17:34:29 BST; 2s ago
Process: 9245 ExecStop=/etc/init.d/vhusbdpin stop (code=exited, status=0/SUCCESS)
Process: 9259 ExecStart=/etc/init.d/vhusbdpin start (code=exited, status=0/SUCCESS)

Apr 17 17:34:29 minibian vhusbdarmpi[9263]: >>> Starting VirtualHere USB Server v3.6.1 (Built: Apr 10 2018, 18:00:13)<<<
Apr 17 17:34:29 minibian systemd[1]: Started LSB: Start VirtualHere USB Sharing on boot.
Apr 17 17:34:29 minibian vhusbdarmpi[9264]: >>> Shutdown <<<

earlier versions work fine!

Thanks,
Oliver

#2

I just tested it then, it all works fine on my raspberry pi 1b using jessie raspbian lite.

I think you are mixing systemd and init.d scripts. I dont think you should do that. You should move to systemd scripts if thats what your linux supports. See below:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.30+ #1102 Mon Mar 26 16:20:05 BST 2018 armv6l GNU/Linux
pi@raspberrypi:~ $ cat /etc/systemd/system/virtualhere.service
[Unit]
Description=VirtualHere USB Sharing
Requires=avahi-daemon.service
After=avahi-daemon.service
[Service]
ExecStartPre=/bin/sh -c 'logger VirtualHere settling...;sleep 1s;logger VirtualH                                                                                                             ere settled'
ExecStart=/home/pi/vhusbdarmpi
Type=idle
[Install]
WantedBy=multi-user.target
pi@raspberrypi:~ $ systemctl status virtualhere.service
● virtualhere.service - VirtualHere USB Sharing
   Loaded: loaded (/etc/systemd/system/virtualhere.service; enabled; vendor pres
   Active: active (running) since Wed 2018-04-18 01:59:30 UTC; 1min 42s ago
  Process: 261 ExecStartPre=/bin/sh -c logger VirtualHere settling...;sleep 1s;l
 Main PID: 311 (vhusbdarmpi)
   CGroup: /system.slice/virtualhere.service
           └─311 /home/pi/vhusbdarmpi

Apr 18 01:59:35 raspberrypi root[307]: VirtualHere settling...
Apr 18 01:59:37 raspberrypi root[309]: VirtualHere settled
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: >>> Starting VirtualHere USB Serve
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: Using configuration /home/pi/confi
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: Server licensed to=unlicensed max_
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: Using large URB's
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: VirtualHere USB Server is running.
Apr 18 01:59:37 raspberrypi vhusbdarmpi[311]: Listening on all network interface
Apr 18 01:59:38 raspberrypi vhusbdarmpi[311]: 192.168.0.36 connected as connecti
Apr 18 02:00:20 raspberrypi vhusbdarmpi[311]: 192.168.0.36 connected as connecti
#3

Thanks Michael,

i switched from init.d to systemd and set the /etc/systemd/system/virtualhere.service as you posted. (with "ExecStart=/usr/sbin/vhusbdarmpi" in my case)
i installed the avahi-daemon which wasnt installed yet and the server 3.6.1. startet working:

root@minibian:~/vh# systemctl status virtualhere.service
● virtualhere.service - VirtualHere USB Sharing
Loaded: loaded (/etc/systemd/system/virtualhere.service; disabled)
Active: active (running) since Wed 2018-04-18 13:54:38 BST; 1s ago
Process: 1181 ExecStartPre=/bin/sh -c logger VirtualHere settling...;sleep 1s;logger VirtualH ere settled (code=exited, status=0/SUCCESS)
Main PID: 1187 (vhusbdarmpi)
CGroup: /system.slice/virtualhere.service
└─1187 /usr/sbin/vhusbdarmpi

Apr 18 13:54:39 minibian logger[1184]: VirtualH ere settled
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: >>> Starting VirtualHere USB Server v3.6.1 (Built: Apr 10 2018, 18:00:13)<<<
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Using configuration /usr/sbin/config.ini
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Server licensed to=unlicensed max_devices=1
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Using large URB's
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Listening on all network interfaces at TCP port 7575
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [1547:1000] "SG-Lock, SG-Lock USB Key" at address 1121
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [064f:0bd8] "WIBU-SYSTEMS AG, www.wibu.com, WIBU-BOX/RU " at address 1122
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [0529:0001] "SafeNet Inc., Sentinel HL" at address 1123
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: VirtualHere USB Server is running...press CTRL-C to stop

if i enter the licence-code in the client the server runs with unlimited devices and in "/usr/sbin/config.ini" the line "License=..." is added:

root@minibian:~/vh# systemctl status virtualhere.service
● virtualhere.service - VirtualHere USB Sharing
Loaded: loaded (/etc/systemd/system/virtualhere.service; disabled)
Active: active (running) since Wed 2018-04-18 13:54:38 BST; 12min ago
Process: 1181 ExecStartPre=/bin/sh -c logger VirtualHere settling...;sleep 1s;logger VirtualH ere settled (code=exited, status=0/SUCCESS)
Main PID: 1187 (vhusbdarmpi)
CGroup: /system.slice/virtualhere.service
└─1187 /usr/sbin/vhusbdarmpi

Apr 18 13:54:40 minibian vhusbdarmpi[1187]: >>> Starting VirtualHere USB Server v3.6.1 (Built: Apr 10 2018, 18:00:13)<<<
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Using configuration /usr/sbin/config.ini
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Server licensed to=unlicensed max_devices=1
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Using large URB's
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Listening on all network interfaces at TCP port 7575
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [1547:1000] "SG-Lock, SG-Lock USB Key" at address 1121
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [064f:0bd8] "WIBU-SYSTEMS AG, www.wibu.com, WIBU-BOX/RU " at address 1122
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: Found Full speed device [0529:0001] "SafeNet Inc., Sentinel HL" at address 1123
Apr 18 13:54:40 minibian vhusbdarmpi[1187]: VirtualHere USB Server is running...press CTRL-C to stop
Apr 18 13:54:48 minibian vhusbdarmpi[1187]: 192.168.0.18 connected as connection 1

but if i now stop-start the service or reboot it crashes:

root@minibian:~/vh# systemctl stop virtualhere.service
root@minibian:~/vh# systemctl start virtualhere.service
root@minibian:~/vh# systemctl status virtualhere.service
● virtualhere.service - VirtualHere USB Sharing
Loaded: loaded (/etc/systemd/system/virtualhere.service; disabled)
Active: failed (Result: exit-code) since Wed 2018-04-18 14:10:05 BST; 600ms ago
Process: 1287 ExecStart=/usr/sbin/vhusbdarmpi (code=exited, status=9)
Process: 1280 ExecStartPre=/bin/sh -c logger VirtualHere settling...;sleep 1s;logger VirtualH ere settled (code=exited, status=0/SUCCESS)
Main PID: 1287 (code=exited, status=9)

Apr 18 14:10:04 minibian systemd[1]: Started VirtualHere USB Sharing.
Apr 18 14:10:04 minibian logger[1281]: VirtualHere settling...
Apr 18 14:10:05 minibian logger[1283]: VirtualH ere settled
Apr 18 14:10:05 minibian vhusbdarmpi[1287]: >>> Starting VirtualHere USB Server v3.6.1 (Built: Apr 10 2018, 18:00:13)<<<
Apr 18 14:10:05 minibian vhusbdarmpi[1287]: Using configuration /usr/sbin/config.ini
Apr 18 14:10:05 minibian vhusbdarmpi[1287]: >>> Shutdown <<<
Apr 18 14:10:05 minibian systemd[1]: virtualhere.service: main process exited, code=exited, status=9/n/a
Apr 18 14:10:05 minibian systemd[1]: Unit virtualhere.service entered failed state.

-> if i now delete the line "License=..." in "/usr/sbin/config.ini" the server is able to start again in unlicensed-mode:

root@minibian:~/vh# systemctl start virtualhere.service
root@minibian:~/vh# systemctl status virtualhere.service
● virtualhere.service - VirtualHere USB Sharing
Loaded: loaded (/etc/systemd/system/virtualhere.service; disabled)
Active: active (running) since Wed 2018-04-18 14:15:27 BST; 1s ago
Process: 1302 ExecStartPre=/bin/sh -c logger VirtualHere settling...;sleep 1s;logger VirtualH ere settled (code=exited, status=0/SUCCESS)
Main PID: 1308 (vhusbdarmpi)
CGroup: /system.slice/virtualhere.service
└─1308 /usr/sbin/vhusbdarmpi

Apr 18 14:15:27 minibian systemd[1]: Started VirtualHere USB Sharing.
Apr 18 14:15:27 minibian logger[1303]: VirtualHere settling...
Apr 18 14:15:28 minibian logger[1305]: VirtualH ere settled
Apr 18 14:15:28 minibian vhusbdarmpi[1308]: >>> Starting VirtualHere USB Server v3.6.1 (Built: Apr 10 2018, 18:00:13)<<<
Apr 18 14:15:28 minibian vhusbdarmpi[1308]: Using configuration /usr/sbin/config.ini

What is going on there?

Thanks
Oliver

#4

Loaded: loaded (/etc/systemd/system/virtualhere.service; disabled)

The server is not crashing, you are trying to run it when its disabled. You need to read up on systemd scripts i think.

Try

sudo systemctl enable virtualhere

And just paste the license into the client dont direclty put it in. It seems you have not put it in correctly

#5

Ok, just updated to vhusbdarmpi v3.6.5 and all works fine!
Service now can be restartet in licenesed-mode without problems.

Thanks
Oliver