BTRead


BTRead channel, data$ {,maxBytes}

This command reads character bytes from a specified Bluetooth serial channel. Any data read is returned in the data$ parameter. If no data is available to read an empty string will be returned. An optional maxBytes parameter specifies the maximum number of bytes to read. It is important to note that only the lower eight bits of each character is read. The strings returned by this command should be thought of as containing bytes.

After each BTRead command it is important to check if the read succeeded. All serial communication is subject to interruption at any time so check the BTGetError$(n) after each Bluetooth command you execute. BTGetError$(n) will return an empty string if the read succeeded.





Bluetooth On|Off


Bluetooth device pairing


BTClose


BTConnect


BTDiscoverable


BTGetAddress$()


BTGetError$()


BTGetName$()


BTGetPaired$()


BTGetSize()


BTGetState()


BTListen


BTRead$()


BTReadln


BTReadUTF


BTWrite


BTWriteln


BTWriteUTF







Become a Patron