Skip to content
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

Subscribe documentation may be wrong? #435

Open
troindx opened this issue Dec 23, 2020 · 3 comments
Open

Subscribe documentation may be wrong? #435

troindx opened this issue Dec 23, 2020 · 3 comments

Comments

@troindx
Copy link

troindx commented Dec 23, 2020

Hi. I am trying to follow the docs regarding subscription mechanism https://github.com/don/BluetoothSerial
imagen

However, When I subscribe, my IDE indicates me the following:
imagen
Writes are working fine . If I jump to definition
imagen

The definition returns an observer, but if I subscribe to the observer nothing happens.
imagen

Is the documentation updated here?

@troindx
Copy link
Author

troindx commented Dec 29, 2020

anybody still alive here? :(

@dzanis
Copy link

dzanis commented Oct 25, 2021

anybody still alive here? :(
You subscribed to the data you receive in the callback until the end-of-line character '\n' and you will not receive it until this character is present.
Try this

this.bluetoothSerial.subscribe('\n',function(data){console.log(data)});
this.write("1\n");

@troindx
Copy link
Author

troindx commented Nov 2, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants