Weird/Buggy behaviour on indi driver of UPBV2

Feature requests / 3rd party software development
Post Reply
dolguldur
Posts: 16
Joined: Tue Dec 14, 2021 3:28 pm

Weird/Buggy behaviour on indi driver of UPBV2

Post by dolguldur »

I am currently developing a small software to drive an automatic observatory, and the UPBV2 is a central piece of my setup.
Unfortunately, I recently came across a weird behaviour with regard to the switchvector called "USB_PORT_CONTROL"

My current strategy for every switchvector, is to send the vector to the indiserver, and then wait for the corresponding light to be set to Ok (or eventually idle, but that's another story). This is somehow an acknowledgment mechanism, and the light is set to Ok, independantly of wether any or none of the switch value have actually been changed.

Anyway, this acknowledgment strategy is working pretty ok on most of the drivers I have been playing with recently, also, it is working on the "POWER_CONTROL" and "POWER_ON_BOOT" switchvector. However, when it comes to "USB_PORT_CONTROL", I noticed that the driver is never acknowledging the switch reception in the case that the sent switchvector has no difference with the current switch values.

In addition, I noticed that the switchvector named "USB_HUB_CONTROL" always exhibit an "Alert" value when used. I suppose there is an issue somewhere with this feature inside the indi driver.

Is there anyway for someone to crosscheck if the behaviour can be reproduced, and if it is expected ?

Thank you in advance for your help
dolguldur
Posts: 16
Joined: Tue Dec 14, 2021 3:28 pm

Re: Weird/Buggy behaviour on indi driver of UPBV2

Post by dolguldur »

Ok sorry never mind, I checked the driver logs, and it looks like the issue is on my side.

EDIT: not sure actually, I am still trying to debug this, if someone can help with: https://github.com/indilib/indi/pull/1581 That could be great, thank you in advance
EDIT2: actually a copy of a message from github:

Ok I narrowed it down to that line:
https://github.com/indilib/indi/blob/ce ... b.cpp#L701

Il looks like this check consistently returns False for rc[0] i.e the first usb port. I think I need to get feedback from someone from pegasus on this, it looks too specific
ADDITIONAL INFO: Detected firmware 2.4
dolguldur
Posts: 16
Joined: Tue Dec 14, 2021 3:28 pm

Re: Weird/Buggy behaviour on indi driver of UPBV2

Post by dolguldur »

If someone, a developer that have access to the ascom source code (fully tested and validated I guess ?) can give a look to this: https://github.com/indilib/indi/issues/1580
and this PR: https://github.com/indilib/indi/pull/1581 That would be great.

Thank you a lot for your help
dolguldur
Posts: 16
Joined: Tue Dec 14, 2021 3:28 pm

Re: Weird/Buggy behaviour on indi driver of UPBV2

Post by dolguldur »

Ok I think I fixed the issue (there were actually 2 nested bugs). Hope the PR will be accepted.

Edit: PR accepted, now in master.
Post Reply