How to detect if USB device is connected?

Does anyone know how I can detect if my USB device is connected to a Host or not?

Thx
Steven

More questions in this forum