jpoet / HauppaugeUSB

MythTV wrapper around the Hauppauge HD-PVR2/Colossus2 driver
GNU General Public License v3.0
16 stars 5 forks source link

Unplugging and plugging in USB doesn't work #4

Closed stevenviola closed 6 years ago

stevenviola commented 6 years ago

When the USB cable is unplugged from the Hauppauge PVR2 and plugged back in, HauppaugeUSB doesn't gracefully resume recording when the cable is plugged back in, and stays in an error state constantly, outputting the following logs:

000:02:00.298116 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298140 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298161 E [Buffer] mchip_base.cpp:345 (UsbGetPortState) - UsbGetPortState(4) FAILED

000:02:00.298184 E [Buffer] CHapi.cpp:785 (powerDownHW) - CHapi::powerDownHW() UsbGetPortState() FAILED!!

000:02:00.298259 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298282 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298319 E [Buffer] mchip_base.cpp:307 (UsbSetPortState) - UsbSetPortState(4, 0x05) FAILED

000:02:00.298396 E [Buffer] USBif.cpp:474 (controlMessage) - cannot send control message: No such device (it may have been disconnected)
000:02:00.298411 E [Buffer] mchip_base.cpp:34 (UsbReadWrite) - UsbReadWrite(1, ) failed 0xFFFFFFFC

000:02:00.298423 E [Buffer] mchip_base.cpp:307 (UsbSetPortState) - UsbSetPortState(0, 0xb7) FAILED

000:02:00.298436 E [Buffer] mchip_port_a.cpp:228 (MCHIP_PortA_Set_POWER_ENABLE_H) - MCHIP_PortA_Set_POWER_ENABLE_H: UsbSetPortState failed!!

The only fix is to kill the application and start it up again.

Steps to Reproduce:

  1. Start up the application and leave it running

    sudo /opt/Hauppauge/bin/hauppauge2 -s <serial number> -i 1 -a 0 -o ~/test-unplug.ts

  2. Unplug the USB cable from the device

  3. Plug back in the USB cable into the device

  4. hauppauge2 continues to run, and just keeps outputting error logs, and does not continue to output video to the file

jpoet commented 6 years ago

Hi Steven,

Please submit this bug report to Hauppuage: http://www.hauppauge.com/pages/contact/contact_support.html

Thanks