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

Not receiving data from Bluetooth device #15

Open
harshilp24 opened this issue Mar 18, 2021 · 6 comments
Open

Not receiving data from Bluetooth device #15

harshilp24 opened this issue Mar 18, 2021 · 6 comments

Comments

@harshilp24
Copy link

I am running the demo app, I am able to send data to device but not able to get data from it. The onMessageReceived method is not being called. Can you help me with this

@harryjph
Copy link
Owner

Can you verify with, say, a Windows PC or other app/device that the data is actually being transmitted?

@harshilp24
Copy link
Author

Can you verify with, say, a Windows PC or other app/device that the data is actually being transmitted?

@harry1453 its a ESP32 Bluetooth chip

@harryjph
Copy link
Owner

Could you check what message is being sent? The library expects messages to be delimited by a newline (\n) character. If you want a different delimiter, you need to use the raw outputStream.

@johnchtsai
Copy link

Have same question on ESP32. The device is actually transmitting. I wonder maybe the brud rate does not set right?

'

@harryjph
Copy link
Owner

harryjph commented May 25, 2021

@johnchtsai Please can you do the same as I said above? If you are just transmitting a data stream, you need to use the outputStream property to get a raw data stream. If you use openMessageStream, the library considers a newline to be the message delimiter, and if you aren't transmitting separate messages separated by newlines, this won't work and you won't receive any messages.

If you're using an ESP32 with built-in bluetooth, there is no baud rate AFAIK, as baud rate is only a property when using UART along a physical wire. When it's via Bluetooth or internally in the ESP32, there shouldn't be any baud rate, though I may be wrong. I know for a fact that this library does not take or use a baud rate.

@talhacomak
Copy link

talhacomak commented Dec 11, 2021

I have same problem too. When i try another program from google play, my device working currectly. When i try to debug the openMessageStream() function, the "synchronized(inputStream)" never worked. If someone has any solution can you help me?

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

4 participants