[Solved] Bluetooth LE Transmit Byte Array

edit 1: attached screenshots
edit 2: attached screenshot of the receiving blocks

@Paolo_Tealdi & @shawnmccazl thanks to this comment by @gaston_fabbietti I have also solved how to READ data over BLE - the answer is annoyingly self-explanatory: the characteristic has to be set up with the READ property and NOT the NOTIFY or INDICATE (which is usually the default).

As an example, I am (still) using the RN4871 module from Microchip - although the RN4870 is functionally identical for the purpose of this post. This module allows you to configure your own services with their own characteristics; however, it has a default service called “Device Information”. Within this, there is a characteristic (UUID: 00002A29-0000-1000-8000-00805F9B34FB) which contains the manufacturer string. As seen in the screenshot below, this string is “Microchip”. As also seen, this characteristic is READ ONLY (for comparison, there is a screenshot of a custom service that also has the “N” (notify) and “I” (indicate) properties).

Another screenshot shows the app correctly reading the manufacturer as “Microchip”. When trying to read from a characteristic with NOTIFY or INDICATE, however, the read fails because the client (your phone) has not subscribed to notifications… There is no way to do this currently with Thunkable?

So, in theory, if using the RN487x modules, you could create your own service with its own characteristics (and associated UUIDs) and make the property so that it’s READ ONLY. Then, by using the ‘LS’ & ‘SHW’ commands with the RN4871 (as described in the user guide on pages 45 & 51 respectively) you could program in your own data which can then be read by the app.

This is a very long post, I know, and probably very rambly, but hopefully it makes some degree of sense? I am also yet to test the whole ‘custom service’ part but will respond with more info when that is found… Also, this should probably be put into its own thread to help others… I will do this when I have a more concise explanation of the above information.

^ App correctly reading the manufacturer string with an empty error field (the “undefined” text)

^ The READ ONLY manufacturer string as shown in the BLE Scanner app, note there is only the “R” 'dot’

^The NOTIFY/INDICATE characteristic, note the additional “N” & “I” 'dots’

^ The blocks used for READing the (READ ONLY) manufacturer string, pretty simple really

1 Like