Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Characteristiic throwing error org.bluez.Error.InProgress #26

Open
RobsonRojas opened this issue Feb 23, 2021 · 1 comment
Open

Characteristiic throwing error org.bluez.Error.InProgress #26

RobsonRojas opened this issue Feb 23, 2021 · 1 comment

Comments

@RobsonRojas
Copy link

I have tested the readValue to a readable characteristic and it worked fine:

  const characteristic1 = await service1.getCharacteristic(TEST_CHARACTERISTIC_WRITE)
  const buffer = await characteristic1.readValue()
  console.log('read', buffer, buffer.toString())

But, when I try to execute writeValue in an writable characteristic with the following code, it is throwing the exception:

  const characteristic2 = await service1.getCharacteristic(TEST_CHARACTERISTIC_WRITE)
  
  await characteristic2.writeValue(Buffer.from('s'))

The error:

{ DBusError: In Progress
    at _methodReturnHandlers.(anonymous function) (/home/ica/git/ica/fecon_beta/node-ble/node_modules/dbus-next/lib/bus.js:337:27)
    at handleMessage (/home/ica/git/ica/fecon_beta/node-ble/node_modules/dbus-next/lib/bus.js:96:11)
    at EventEmitter.MessageBus.conn.on (/home/ica/git/ica/fecon_beta/node-ble/node_modules/dbus-next/lib/bus.js:146:9)
    at EventEmitter.emit (events.js:182:13)
    at /home/ica/git/ica/fecon_beta/node-ble/node_modules/dbus-next/lib/connection.js:116:14
    at Socket.<anonymous> (/home/ica/git/ica/fecon_beta/node-ble/node_modules/dbus-next/lib/message.js:63:9)
    at Socket.emit (events.js:182:13)
    at emitReadable_ (_stream_readable.js:540:12)
    at process._tickCallback (internal/process/next_tick.js:174:19)
  name: 'DBusError',
  type: 'org.bluez.Error.InProgress',
  text: 'In Progress',
  reply: 
   Message {
     type: 3,
     _sent: false,
     _serial: 2677,
     path: undefined,
     interface: undefined,
     member: undefined,
     errorName: 'org.bluez.Error.InProgress',
     replySerial: 37,
     destination: ':1.165',
     sender: ':1.12',
     signature: 's',
     body: [ 'In Progress' ],
     flags: 1 } }

Could someone help me to solve this? Any sugestion or idea?

@EricHier
Copy link

Hi there! I've got the same problem - did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants