Restart bluetooth.service after each boot #6
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 should not be needed. But we tested that if the hotspot provider changed since last boot, restarting
bluetooth.servicebefore trying to connect to Varia seems to make things work. Would be good to revisit this and find the real cause.It's a change with very little negative impact, but maybe still needs more testing before merging.
Testing
Just change that line in
bicycleinit/bicycleinit.shlocally on the RaspberryPi and:It should happily send Varia data to the server. But one can check locally that there is the following error in the logs of
systemctl status bicycleinit.service.Manually (after failed start of the varia script), one can check that a paired and trusted Varia cannot be connected to even from
bluetoothctl. But as soon as one restarts BT service, things work as they should. Not sure what it is about the restart that works. It clearly isn't cache issues as cache isn't cleared on restart (and clearing it without restart doesn't help either).