Closed Frondall closed 4 years ago
Hi, Firstly — there is a wiki page on how to get most of the error. Secondly — it is your peripheral that does not support the action you try to perform (google 'ble prepared write' or 'ble queued write'). You have not specified it but I assume the negotiated MTU is <150. Consult the specification of your peripheral how it expects data of this length delivered. Best regards
Expected Behavior
Module should be able to handle all size of packets that are written. If packets are too large for the MTU, break them up automatically.
Current Behavior
When trying to send large packets (148 bytes in this case) the following non-descriptive error is seen
This occurs when using writeCharactersticWithResponseForDevice. I have tried to use writeCharactersticWithoutResponseForDevice but the device never receives the data. Everything works correctly up until this large packet is sent Sending smaller packets have no issues.
Immediately prior to the failed packet the device successfully received and responded to multiple smaller packets (5 to 18 bytes).
I have tried changing the MTU to 150 and 300 but receive the same error.
Originally the package used was 1.0.1, after upgrading to 2.0.1 the problem still remains.
I found this bug report for a similar issue but it doesn't explain if or how it was fixed https://github.com/Polidea/react-native-ble-plx/issues/549
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via setLogLevel function call.
package.json
file: