Skip to content
Discussion options

You must be logged in to vote

It's possible that Init is returning before something is properly set up. It should be fine, but it's possible it is the peripheral you are trying to write to that has the problem. You could add:

.then(new Promise(resolve => setTimeout(resolve,500));

to the end of the Init function to add a delay. Or in fact you could manually add a delay after charac.writeValue in the same way.

If your getservice function works though, I don't see a huge problem in using that. It'd be slightly slower but if as you say you're only occasionally writing then it'd be ok

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BangleBeginner
Comment options

@gfwilliams
Comment options

Answer selected by BangleBeginner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants