-
Notifications
You must be signed in to change notification settings - Fork 19
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
Device discovery still uses static port information #195
Comments
Quoted from #58 (comment) :
When doing
Which is
Which loads the static information. I don't know much about this part yet, but for port / device discovery it would be clean to not load the static information. However we could also make this more robust by making sure the info is overwritten when never info is received (that might lead to a less consistent state though). The first option seems best, we could make that a protocol feature (use dumps or discover) |
Discovery should start fresh. And an explicit operation. The protocol is IMHO from LEGO itself used without discovering the knowledge. Discovery takes far too long for a regular protocol usage, no matter use the case. 30 seconds or what it is, is just too long to start a remote. Discovery is for development or unknown devices. |
* Added special discovery mode to protocol to prevent use of static data when discovery devices and modes. #195 non-breaking --------- Co-authored-by: Menno Lodder <menno@lodder>
Thanks for fixing this. |
When running
device list
ordevice dump-static-port
the application seems to send all the port information requests but still uses the old static info.See the situation below where the motor had 6 modes in the static port info, but 5 in reality. Eventhough the motor reported 5 modes earlier, the 6th (index 5) is also requested and results in an error.
It goes wrong here:
The reply translates as: Error - Port Mode Information Request - Port 0 - Invalid use (e.g. parameter error(s)
Which makes sense, because it is requesting mode 5 (so the 6th mode) where earlier the device announced 5 modes (( checked, the bold number is 'Total Mode Count'_:
I didn't doublecheck this, but this probably is because the TechnicLargeLinearMotor.GetStaticPortInfoMessages announces 6 modes:
0B-00-43-00-01-0F-06-1E-00-1F-00
For my motor it outputs this version info. could this be two versions?
If I remove the static port info messages it works and I get:
Here are the differences with what is checked in:
The text was updated successfully, but these errors were encountered: