[android/bug] sharing hotplugged USB

2 posts / 0 new
Last post
kaweks
[android/bug] sharing hotplugged USB

Hi,

Today I stared to play with USB over IP as I needed to scan something when having only Android device and scanner (wthout support for android). I managed to scan document using windows on remote machine, and well USB Server/Client its great piece of software. But I found bug that might cause me problems in future. USB Device (or at least USB OTG cable) that I want to share must be connected to Android before starting USB server.

It seams that if there is nothing connected to my phone, there is no usb hubs visible ( 'lsusb' returns nothing) USB server will fail to share usb devices plugged after start (there is no usb hubs on system). But when I connect USB OTG cable without any usb device (only cable) 'lsusb' return two usb devices , if on that point I will start USB server, everything will work, usb devices can be plugged, unplugged and USB client will see all devices.

Can you fix that so it doesn't matter if USB Server will start with or without USB OTG cable ?

Using:
USB Server for Android v 1.8.8 Free
Sony Xpiera Z2 (rooted)
USB ADATA thumbdrive
HP Photosmart 46xx (scanner, printer, card reader)

Michael
Im guessing that the kernel

Im guessing that the kernel on your sony is not loading the usb HOST subsystem until something is plugged into your USB OTG port in host mode. This kind of makes sense because its conserving system resources until that module is required. A OTG cable has a physical electrical line (ID pin) that signals its in host mode and this needs to occur before the virtualhere could hook into the usb subsystem.

Therefore i think you will need to plug in the OTG cable first then start virtualhere.

Log in or register to post comments