Detect if usb device is connected on the other side of the cable
The device has a pullup on one of the data lines depending on its speed. Host has (weaker) pulldowns. When both lines are zero there is no device. When one is one there is a device. USB is 3.3V bus BTW, design your detector accordingly, and measure at the host connector.