This question may be very broad but I'm trying to keep it platform agnostic.
If I connect a device to a USB port on a computer, is there a way for that device to uniquely identify the port it's connected to?
e.g. I have a PC with 10 USB ports. I have a smart phone that's programmed to run Function A if it's connected to Port 1 and Function B if it's connected to Port 2, etc...
Is there a way that the smartphone (the peripheral in this case) can identify the specific port on the host?
Is there a way it can identify the host device as a whole?
Basically, does the peripheral know anything about the host?