-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mock senso #138
Open
krksgbr
wants to merge
5
commits into
dividat:main
Choose a base branch
from
krksgbr:mock-senso
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mock senso #138
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This builds on the existing replay tool, extending it with a richer set of features to simulate a Senso: - Simulate DFU mode and firmware updates - Respond to device info and status with configurable information - Respond to multi-block commands Like the replayer, it still supports replaying flex and senso recordings.
By using the tftp port announced in the mDNS service entry, we can allow the mock senso to expose its tftp server on port 6969. This is necessary, because binding to the standard tftp port (69) would require root privileges.
Remove scripts and dependencies that have been moved to the `mock-senso` project.
Most of the documentation is removed from the Readme, as `mock-senso --help` provides both documentation and usage examples.
I am running the driver and
This is working with |
guyonvarch
added
details needed
Further information requested to better evaluate changes
and removed
reviewable
Ready for initial or iterative review.
labels
May 22, 2024
The driver is producing these logs:
|
Works well on OSX. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This extends the replay tool into a utility that can mock a Senso's functions more broadly. It retains the replay tool's original functionality, so it can still replay both Senso and Senso Flex recordings. Additional functionality:
The motivation was to not have to be completely dependent on the controller board while working on the firmware update feature, but I think it can be useful for testing any hardware related work on the client.
Usage:
I mostly tested on macOS, so I'm curious to see how well it works on Linux.
During the limited testing I did on nixOS, I noticed there can be issues with discovering the mock service. Sometimes the go library that the driver uses for mdns discovery returns the service entry without any ip addresses causing the entry to get thrown away. I think it's an issue with the go library, because avahi-browse has no trouble discovering the service. This only seems to happen on linux and the mock-senso. I haven't seen this on macOS or with the development controller board.
Checklist
[] Changelog updated