Samsung quirks

7 posts / 0 new
Last post
caseyboardman
Samsung quirks

In the http://virtualhere.com/quirks page, you mention that " VirtualHere will automatically generate the special events for iPad/iPhone/iPod2G and Galaxy S without requiring any changes by you." Can you share what the Samsung Galaxy special events are?

I am currently working through issues with a Samsung Galaxy Tab running Android 4.4.2.

Michael
The galaxy needs to have

The galaxy needs to have configuration 4 selected "onEnumeration"

onEnumeration.04e8.6877=echo '4' > $DEVPATH$/bConfigurationValue

The other galaxies might need similar settings...

caseyboardman
I added that line and now I

I added that line and now I get:
Mon Oct 5 16:58:19 2015 LOG_ERR Error -1 resetting device 0x04e8/0x6860 for capture
Mon Oct 5 16:58:19 2015 LOG_ERR Error -1 binding device 314 to connection 1
Mon Oct 5 16:58:19 2015 LOG_INFO Unmanaging device 314
Mon Oct 5 16:58:20 2015 LOG_INFO Found High speed device [04e8:6860] "SAMSUNG, SAMSUNG_Android" at address 314
Mon Oct 5 16:58:20 2015 LOG_INFO Executed "echo '4'>/sys//devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/bConfigurationValue" for onEnumeration.04e8.6860

The errors on the client are:
1) There was an error sharing this device
2) Error "Operation not permitted" (-1) trying to use this device.

I then tried adding a custom onReset and get:
Mon Oct 5 17:04:18 2015 LOG_INFO Set custom event "onReset.04e8.6860="

Then try to connect again:
Mon Oct 5 17:04:24 2015 LOG_INFO Executed "" for onReset.04e8.6860
Mon Oct 5 17:04:24 2015 LOG_INFO Device 314 BOUND to connection 1
Mon Oct 5 17:04:24 2015 LOG_INFO Device 314 SURPRISE UNBOUND from connection 1
Mon Oct 5 17:04:24 2015 LOG_INFO Unmanaging device 314
Mon Oct 5 17:04:24 2015 LOG_INFO Found High speed device [04e8:6860] "SAMSUNG, SAMSUNG_Android" at address 314
Mon Oct 5 17:04:24 2015 LOG_INFO Executed "echo '4'>/sys//devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/bConfigurationValue" for onEnumeration.04e8.6860
M

I don't get any client errors now, but it won't connect either.

Thoughts? Something else to try?

Linux server, Win7 client. Both latest and greatest versions.

Michael
.

One thing to make sure is that your actual server is not trying to grab the device via its udev rules which is interfering with virtualhere capturing the device. I don't know what your server is but if its a ubuntu desktop or something then it may already have udev rules that would capture and try to process the device (set configuration/interfaces) before its even given to the virtualhere server and this confuses the device. (If you are using a simple linux embedded board like a pi then they usually dont have complicated udev rules for ipads or phones built-in so there is no interference with virtualhere)

For example the ipad etc has rules in udev for ubuntu desktop, that perform capture and configuration of the device and these need to be disabled on a desktop server for virtualhere to work with these types of devices when performing complicated firmware updates or configuration changes on startup that the product requires.

The reason why quirks are needed occasionally is because the USB enumeration and configuration is split in two in virtualhere. Usually with direct cable connection the usb enumeration is done and then configuration is done immediately afterwards. Whereas in virtualhere the enumeration is done immediately and the configuration is done when the user begins "Use"ing the device remotely. Some devices are sensitive to this because they want the configuration set immediately so they know what type of device they need to be.

I find that devices which perform as different devices at different times have this requirement. e.g android can be a "Android debug device" or "USB disk" or "Android phone" etc. and ipad can be "Firmware update", or "usb disk" or "ipad"

I think from that vendor/id product id it is a samsung galaxy s2 or galaxy tab 10.1?

My advice would be this:

1. Download a usb tracing software e.g i use usblyzer (free demo is available which is all you need)
2. Run usblyzer or whatever one you use and capture all packets (check all boxes in the settings and check "Capture hot-plugged devices") and then click Start capture
2. Run that and plug the phone directly into your windows computer
3. Now what will happen is the first 20 or so USB messages are streamed on the the tracing screen, and you will see a message like "Set Configuration" and a value in the data section like 4 or something.
4. That setting has to be done as a quirk because the "Set Configuration 4" request as you see it only would happen after you use the device locally direclty connected.

That is the actual quirk that i told you to add, (Im guessing its configuration 4 like the old galaxy but could be something like 3)

If you need to remove a "quirk" you can Right click on the device in the client and use the work REMOVE instead for the quirk

e.g

onReset.$VENDOR_ID$.$PRODUCT_ID$=REMOVE and the server will tell you in the log its removed the quirk

I would recommend removing the reset quirk if it causes your device to jam, you probably only need the onEnumeration and onUse quirks.

Another thing to check if other people have had trouble mounting that device natively in linux. They usually have to add some udev rule to get it to work. You need to add that as a quirk to virtualhere instead of a udev rule.

caseyboardman
Hmm yeah no dice.

Hmm yeah no dice.

It's a Samsung Galaxy S Note Pro 12.2" / the bane of my existence.

I did need to update udev rules, as gvfs-gphoto2-volume-monitor was grabbing it - I noticed this by trying to share into a VM on the server (VirtualHere out of the equation). I was able to connect with android debug bridge locally, and also mount on VM and connect (both cases VirtualHere out of equation).

Booting directly into windows, I was able to capture data from usblyzer - it was showing "Select Configuration 1". Trying to echo that in onEnumeration put VirtualHere into a loop. I tried '2' and '3' as well but no dice - original error.

Honestly, getting this thing to mount properly on Windows, with no VM and no VirtualHere or anything else, wasn't as smooth as it should have been either. It seems like this is not uncommon based on internet searches. I have had zero problems sharing a couple different iPads, Arduino Uno, Arduino Due, USB flash drive, a USB Sound Card, a Nexus 9, and at least one other Nexus tablet with VirtualHere. At this point I am blaming Samsung and writing it off unless you have any bright ideas.

Let me know if there is something you'd like me to try / information you'd like me to capture if this is something you want to dig into further. I'd be happy to help if I can.

Thanks.
-Casey

Michael
Im out of ideas with this one

Im out of ideas with this one, if you have a usb protocol analyzer you might be able to figure it out but its probably quite time consuming... I dont have that device to test with here locally at the office so i cant really help

caseyboardman
No worries. Maybe someone

No worries. Maybe someone else will come along and solve this one, or I'll find the time and interest someday.

Thanks.

Log in or register to post comments