-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Universal Videohub 288 #3
Comments
This is related to issue #5 : the default timeout for reading from the device is 15 msec (rather than 15 sec), which is not enough time to get the much larger response from a Videohub 288: increasing the timeout to the currently longest supported value of 60 msec with |
Now that the issue with read timeout is fixed, can you check if --timeout 60 works? |
I'll try soon and report back. It was working with --timeout 60 (msec), so presumably it should work with --timeout 60 (sec), but worth trying. |
It looks like commit 46b46e9 mostly breaks the app when talking to a Videohub 288. For instance when running without a The fundamental issue is that the Videohub Ethernet Protocol is broken by design, as connecting to port 9990 will just spew out formatted but unstructured ASCII, without any clear "end of message' confirmation. Older serial-based router control protocols would incorporate elaborate handshaking through ASCII control characters, a more modern design would spit out a clearly defined XML or JSON response, but in this case you are left with timing-based heuristics, or building in the knowledge that "for this specific type of router and software revision, I've received all the output I expect to receive for now". Some quick tracing in Even if the logic is reworked to make sure that poll() is only called once after there is no more input to be read, that would still introduce a 1 sec delay for each interaction with the router, which could break some more complicated workflows. My suggestion would be:
|
When I point the code at a Universal Videohub 288 running firmware 2.3, although the code recognizes the device, it prints all empty listings for the inputs and outputs.
If I add a call to sleep(1); after calling connect_client(), that seems to leave enough time for the router network interface to "wake up" and return the information expected by the code. I then get mostly sensible output from
--list-inputs
for instance, but I also get some debugging output such as:I'll try to dig a bit more into this and hopefully submit some PRs.
The text was updated successfully, but these errors were encountered: