Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
Why cant i see any notifications when i send data to device over BLE?

I'm trying to make an app that sends commands to a BLE device and i cant get any feedback. I am using a library called ble.plx which has an option to monitor characteristics but it wont output anything for me. I need to read values from notifications to use later in my code. This is my first time working with BLE in general so i have no idea what i am doing wrong. I know serviceUUID and characteristicUUID are correct. I am out of ideas.

Here is my code:

function scanAndConnect() {
BLTManager.startDeviceScan(null, null, (error, device) => {
    if (error) {
        // Handle error (scanning will be stopped automatically)
        return
    }

    // Check if it is a device you are looking for based on advertisement data
    // or other criteria.
    if (device.name=='Audio PCM Streamer') {
        console.log(device.name);
        // Stop scanning as it's not necessary if you are scanning for one device.
        BLTManager.stopDeviceScan();

        device.connect()
        .then((device) => {
          return device.discoverAllServicesAndCharacteristics()
        })
        .then( (device) => {
          device.monitorCharacteristicForService(SERVICE_UUID,CHARACTERISTIC_UUID,(err,result)=>{
            if(err) {
              console.log(err)
              return;
            }
            console.log(result);
          }); Subscription  
          device.requestMTU(251)
          let data = Uint8Array(9);
          data[0]=0xA5;
          data[1]=0xA5;
          data[2]=0xA5;
          data[3]=0xA5;
          var b64encoded = btoa(decoder.decode(data));
          device.writeCharacteristicWithoutResponseForService(SERVICE_UUID,CHARACTERISTIC_UUID,b64encoded);

        
        })
        .catch((error) => {
    // Handle errors
        });

       }
    });

}

almost 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I did this completely wrong do not use this or try to fix this its just bad.

almost 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda