cordovarduino: Error writing 337 bytes at offset 0 length=337

Hey, I’m trying to write something from my android app to the payment terminal iWL250. Application should send json with data and then terminal prints something.

serial.requestPermission({
                vid: '079B',
                pid: '0028'
            },
                function (successMessage) {
                    serial.open(
                        { baudRate: 57600 },
                        function (successMessage) {

                            serial.writeHex(
                                JSON.stringify(text),
                                function (successMessage) {
                                    $cordovaToast.showLongBottom(succesMessage);
                                    alert(successMessage);
                                },
                                errorCallback
                            );
                        },
                        errorCallback
                    );
                },
                errorCallback
            );

application connects to the terminal, but when it tries to write data I get an error: “Error writing 337 bytes at offset 0 length=337”

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 35 (16 by maintainers)

Most upvoted comments

How to change the endpoint as mentioned above ?