Bluetooth (plugin.bt) - Read data from buffer (smart wristband)

Hi,

Is it possible to read buffer data from a smart wristband with this plugin?

In the documentation I can not find a “bt.read()”

Thanks,

António

You can receive inside .init

bt.init(function (event) if (event.type == "message") then native.showAlert( "Message Received", "Name:"..event.message, {"Ok"} ) end end)

I had tried to sent data to device, but no event called. Have any suggest to this problem?

Phone type

Galaxy J7

Android 5.1.1

The plugin will only accept string data

Yes, I had used the “0123456789” string for testing via pc uart port.

Due to the froum info. It had seen no one have the same problem. May be I had been something wrong in programing or my hardware too old.XD

The bt.send is ok for checking connecting.

Have you tried using letters

Thanks your help.

It suddenly can work and I don’t know why. XD

“0123456789” and “ABCDEFGHabcdefgh” are ok both.  :stuck_out_tongue:

/*add info*/

I found my mistake. it should be add “\n”

I found my mistake. it should be add “\n”

Would you mind expanding on your solution? Thanks!