• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
netPI as USB-Device-Server based on raspbian
#1
Hey there,

we are trying to set up the netPi as an USB-Device-Server to share USB devices over ethernet. The server software we want to use is called VirtualHere and works great on a RaspberryPi3. But after setting up a container with raspbian and installing the server software we got some problems with the connected USB devices. The virtualhere server is not able to  open the devices. We get this error message:

"LOG_ERR     Error 1 opening device (/usr/sbin/bus_usb_001_005) file descriptor, Operation not permitted"


It seems that the container doesn't have enough permissions to use the USB devices. The same happens with USB mass storage devices. By configuring the container, the devices were linked to the container (/dev/ttyUSB0)

Is there any option to get is working on a netPi, maybe witch more permissions for the docker container?


Regards, daice
  Reply
#2
Hey Armin,

the software version of the netpi is V.1.1.2.0. I tried to use the container witch the enabled privileged mode. But the same error comes up. Any other ideas?
Frank
  Reply
#3
Hello,

first question is which software version are you running on netPI? You should make sure V1.1.2.0 is running. If not download it from here.

Indeed netPI has some Docker restrictions cause of security that does not allow full access to the Host Linux. There is the priviledge mode you can enable. Have you enabled privileged mode in your container start settings?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#4
The software "VirtualHere" seems to be interesting for other netPI users too.

Can I check it myself in the office too? I read a documentation for Raspberry Pi installation https://www.virtualhere.com/usb_server_software

Is this the software you are using?

Which kind of USB device have you connected? Maybe I have a similar here.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
I searched on google for Virtualhere support under Docker and I found this example here and I watched the parameters the developer is setting.

I see he sets the --network=host option too, that shares the netPI host network with the container. You can enable this setting during container start too under the network/network/host settings. Give it a try please.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#6
Yes this is the software we want to use. The name of the binary is "vhusbdarm". You just have to download it, no installation needed. We want to share some USB-Serial-Converters. But as i said Mass-Storage-Devices are not working, too. You can check it yourself. Without registration of the virtualhere software you can only share one device. For test purposes this might work.
  Reply
#7
I tried it witch the option "host" under Network, but i still get the same error messages.

Frank
  Reply
#8
Frank, it works perfectly with me on my netPI.

I plugged into my netPI a USB to Serial RS232 device.

Then I loaded our hilschernetpi/netpi-debian-stretch container with host network shared and privileged mode enabled.

Then I called in the container in the ssh console:

apt-get update
apt-get install wget
wget http://www.virtualhere.com/sites/default.../vhusbdarm
chmod +x ./vhusbdarm
./vhusbdarm -b

Then I downloaded the client, started it under windows ... and by a miracle it found the virtual USB com port and I can access to it. Perfect!



You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
I see that after starting the server on netPI it has created the files bus_usb_001_002 bus_usb_001_003 bus_usb_001_004 config.ini in the server's folder.

Could it be that you are not root on your debian when you tried to start the server and this is why you get no permission?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#10
I tried exactly the same:
Image: hilschernetpi/netpi-debian-stretch
Port mapping: 22:22 , 7575:7575
Runtime: Privileged mode "On"
Restart policy: Always
Network: host

I still get the same error messages:
Tue Jul 3 11:18:16 2018 LOG_ERR Error 1 opening device (//bus_usb_001_019) file descriptor, Operation not permitted

The VirtualHere Client connects to the Server, but doesn't show any devices. dmesg shows:
[ 6463.121131] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected
[ 6463.121312] usb 1-1.4: Detected FT232RL
[ 6463.122321] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6482.179799] usb 1-1.3: new full-speed USB device number 9 using dwc_otg
[ 6482.318611] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[ 6482.318621] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6482.318626] usb 1-1.3: Product: BioShake TRAY 5x3
[ 6482.318631] usb 1-1.3: Manufacturer: FTDI
[ 6482.318635] usb 1-1.3: SerialNumber: 000002_B4
[ 6482.324954] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 6482.325130] usb 1-1.3: Detected FT232RL
[ 6482.325864] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB1
[ 6616.026911] usb 1-1.4: USB disconnect, device number 8
[ 6616.027420] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 6616.027482] ftdi_sio 1-1.4:1.0: device disconnected
[ 6616.282911] usb 1-1.3: USB disconnect, device number 9
[ 6616.283416] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[ 6616.283476] ftdi_sio 1-1.3:1.0: device disconnected
[ 6708.229796] usb 1-1.2: new high-speed USB device number 10 using dwc_otg
[ 6708.360697] usb 1-1.2: New USB device found, idVendor=1a40, idProduct=0101
[ 6708.360707] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 6708.360712] usb 1-1.2: Product: USB 2.0 Hub
[ 6708.361410] hub 1-1.2:1.0: USB hub found
[ 6708.361591] hub 1-1.2:1.0: 4 ports detected
[ 6708.679789] usb 1-1.2.1: new full-speed USB device number 11 using dwc_otg
[ 6708.819711] usb 1-1.2.1: New USB device found, idVendor=0403, idProduct=6001
[ 6708.819720] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6708.819725] usb 1-1.2.1: Product: DockingStation4 A01
[ 6708.819730] usb 1-1.2.1: Manufacturer: QInstruments
[ 6708.819735] usb 1-1.2.1: SerialNumber: 000004_A1
[ 6708.824617] ftdi_sio 1-1.2.1:1.0: FTDI USB Serial Device converter detected
[ 6708.824783] usb 1-1.2.1: Detected FT232RL
[ 6708.825520] usb 1-1.2.1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6708.919800] usb 1-1.2.2: new full-speed USB device number 12 using dwc_otg
[ 6709.059169] usb 1-1.2.2: New USB device found, idVendor=0403, idProduct=6001
[ 6709.059179] usb 1-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6709.059184] usb 1-1.2.2: Product: DockingStation4 A02
[ 6709.059189] usb 1-1.2.2: Manufacturer: QInstruments
[ 6709.059194] usb 1-1.2.2: SerialNumber: 000003_A1
[ 6709.063445] ftdi_sio 1-1.2.2:1.0: FTDI USB Serial Device converter detected
[ 6709.063735] usb 1-1.2.2: Detected FT232RL
[ 6709.064417] usb 1-1.2.2: FTDI USB Serial Device converter now attached to ttyUSB1
[ 6709.169804] usb 1-1.2.3: new full-speed USB device number 13 using dwc_otg
[ 6709.309557] usb 1-1.2.3: New USB device found, idVendor=0403, idProduct=6001
[ 6709.309567] usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6709.309572] usb 1-1.2.3: Product: DockingStation4 A03
[ 6709.309588] usb 1-1.2.3: Manufacturer: QInstruments
[ 6709.309593] usb 1-1.2.3: SerialNumber: 000002_A1
[ 6709.314052] ftdi_sio 1-1.2.3:1.0: FTDI USB Serial Device converter detected
[ 6709.314187] usb 1-1.2.3: Detected FT232RL
[ 6709.314922] usb 1-1.2.3: FTDI USB Serial Device converter now attached to ttyUSB2
[ 6709.409802] usb 1-1.2.4: new full-speed USB device number 14 using dwc_otg
[ 6709.549310] usb 1-1.2.4: New USB device found, idVendor=0403, idProduct=6001
[ 6709.549321] usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6709.549326] usb 1-1.2.4: Product: DockingStation4 A04
[ 6709.549330] usb 1-1.2.4: Manufacturer: QInstruments
[ 6709.549335] usb 1-1.2.4: SerialNumber: 000002_A2
[ 6709.553961] ftdi_sio 1-1.2.4:1.0: FTDI USB Serial Device converter detected
[ 6709.554193] usb 1-1.2.4: Detected FT232RL
[ 6709.555522] usb 1-1.2.4: FTDI USB Serial Device converter now attached to ttyUSB3

Have you linked all ttyUSB devices to your container by adding it?

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  netPI opc ua server pull image error wswitula 3 3,114 August-27th-2021, 10:47 AM
Last Post: wswitula
  OPC UA server with NetPi RTE DSongra 9 4,213 July-27th-2021, 12:01 PM
Last Post: Armin@netPI
  REST API server data communication MGharat 2 2,442 July-21st-2021, 07:01 AM
Last Post: MGharat
  [SOLVED]DHCP server not working m-yoshikawa 24 13,629 June-11th-2021, 07:04 AM
Last Post: tad
  Raspbian OS version of the latest hilschernetpi/netpi-raspbian tad 2 2,259 March-5th-2021, 11:25 AM
Last Post: tad
  missing the menu items from IO Device Configurator tad 5 3,221 November-20th-2020, 07:41 AM
Last Post: Armin@netPI
  netPI profinet device name WalterSchaefer 2 2,491 October-7th-2020, 11:10 AM
Last Post: WalterSchaefer
  Accessing a modbus device connected to RTE port from Node-RED tad 10 7,908 October-2nd-2020, 07:21 AM
Last Post: Armin@netPI
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 5,584 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  PM - develope OPC UA Server using the Codesys Lingyue 5 4,016 January-17th-2020, 11:12 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 3 Guest(s)