netlink: Issue #60, fix onewire not present, and hanging when it is. #61
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.
Fixes Issue #60, periph-cmd/onewire-list not working because the netlink package wasn't initialized.
There is a problem with loading netlink when the onewire bus drivers aren't loaded. If you run an executable with the netlink package loaded, and the onewire driver isn't loaded, the application hangs indefinitely. This was causing pipeline failures. It appears that netlink.Init() is sending a request on the netlink interface for onewire masters, but nothing is responding so it hangs.
My initial thought to resolve the hang was to put a network timeout on the request for onewire bus master. However, I think the approach of looking at the /sys/bus pseudo-filesystem is cleaner.
I'll follow up this PR with one to periph-cmd to do small fixes to onewire-list and add and ds18b20 program.