Coder Social home page Coder Social logo

Comments (6)

farfromrefug avatar farfromrefug commented on September 22, 2024

@jkh675 you have a build issue. the JS is not finding java class com.nativescript.bluetooth.Bluetooth. You can try a clean build. Also are you using native--api-usage.json?

from ble.

normalid-awa avatar normalid-awa commented on September 22, 2024

thanks for your reply! I've tried clean build and I have also tried to update all packages to the newest version, but the problem was not solved instead, when the write function called it didn't show up any message, it just crashed, without any information.
here is the log

  JS: CONSOLE INFO: NativescriptBle: startNotifying {"characteristicUUID":"0739","serviceUUID":"1b2c","peripheralUUID":"B0:B2:1C:A7:F6:0A"}
  JS: CONSOLE INFO: NativescriptBle: startNotifying ---- peripheralUUID:B0:B2:1C:A7:F6:0A serviceUUID:1b2c characteristicUUID:0739
  JS: CONSOLE INFO: NativescriptBle: TNS_BluetoothGattCallback.onDescriptorWrite ---- gatt: android.bluetooth.BluetoothGatt@6d7b00d, descriptor: android.bluetooth.BluetoothGattDescriptor@52f0594, status: 0
  JS: CONSOLE INFO: NativescriptBle: TNS_BluetoothGattCallback.onCharacteristicChanged ---- gatt: android.bluetooth.BluetoothGatt@6d7b00d, characteristic: android.bluetooth.BluetoothGattCharacteristic@9e3d01, device: B0:B2:1C:A7:F6:0A
  JS: CONSOLE INFO: NativescriptBle: write {"characteristicUUID":"0739","serviceUUID":"1b2c","peripheralUUID":"B0:B2:1C:A7:F6:0A","value":["1"]}
  JS: CONSOLE INFO: NativescriptBle: actual write ---- peripheralUUID:B0:B2:1C:A7:F6:0A serviceUUID:1b2c characteristicUUID:0739

from ble.

farfromrefug avatar farfromrefug commented on September 22, 2024

@jkh675 if there is a crash it will appear in thé logcat

from ble.

normalid-awa avatar normalid-awa commented on September 22, 2024

nope it just crash, no any informations

from ble.

farfromrefug avatar farfromrefug commented on September 22, 2024

@jkh675 then it is hard to help you. Might be related to the data you are trying to write

from ble.

CatchABus avatar CatchABus commented on September 22, 2024

@jkh675 In the past, I think I had similar problems when my device specified characteristic was not writable.
Also, make sure to add encoding property to write. I set it to utf-8.

from ble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.