R richardw2 New Member Licensed User Longtime User Dec 5, 2018 #1 I'm not completely sure if this is a bug or a limitation with the current BLE version implementation. When using an app like CySmart to read the raw BLE characteristic data I can turn on notification and get data updates larger than 20 bytes from my BLE device so I know my phone supports notification data larger than 20 bytes. When connecting to my BLE device using B4A and the BLE2 library and I go through the process of discovering all of the services and characteristics and read their current data I can read more than 20 bytes from the characteristic but when the DataAvailable function is called during a notification event and it tries to read the data it only reads the first 20 bytes, the rest of the bytes get truncated.
I'm not completely sure if this is a bug or a limitation with the current BLE version implementation. When using an app like CySmart to read the raw BLE characteristic data I can turn on notification and get data updates larger than 20 bytes from my BLE device so I know my phone supports notification data larger than 20 bytes. When connecting to my BLE device using B4A and the BLE2 library and I go through the process of discovering all of the services and characteristics and read their current data I can read more than 20 bytes from the characteristic but when the DataAvailable function is called during a notification event and it tries to read the data it only reads the first 20 bytes, the rest of the bytes get truncated.
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2018 #2 It is not a bug or limitation in the library. Most devices are limited to 20 bytes. Anyway the library doesn't enforce any limit.
It is not a bug or limitation in the library. Most devices are limited to 20 bytes. Anyway the library doesn't enforce any limit.
R richardw2 New Member Licensed User Longtime User Dec 5, 2018 #3 Erel said: It is not a bug or limitation in the library. Most devices are limited to 20 bytes. Anyway the library doesn't enforce any limit. Click to expand... If the library doesn't enforce a limit then any idea why it is trucated to 20 bytes but does not get truncated with other software on the same phone that does not use the library? Or do you have any suggestions for a work around?
Erel said: It is not a bug or limitation in the library. Most devices are limited to 20 bytes. Anyway the library doesn't enforce any limit. Click to expand... If the library doesn't enforce a limit then any idea why it is trucated to 20 bytes but does not get truncated with other software on the same phone that does not use the library? Or do you have any suggestions for a work around?
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2018 #4 You should start a new thread in the questions forum.