• Hello,

    I am trying to communicate with another device over Bluetooth.
    But everytime I receive a packet on the Puck.js it uses memory and don't release it.
    So after a few packets, the memory becomes less an I get an error Message --> MEMORY_BUSY.
    On the Screenshot you can see how the memory decreases. (it starts a 1800 free blocks)
    After I got the MEMORY_BUSY message it no longer receive every packet, so I miss most of the packets.

    I think there must be a Memory Leak in the "characteristicvaluechanged" function
    Do someone have simular problems and have found a solution for this problem ?

      NRF.connect("00:13:43:0A:EE:79").then(
        function(d) {
          print("connected");
          device = d;
          return device.getPrimaryService("180D");
        }
      ).then(
        function(s){
          service = s;
          return service.getCharacteristic("2A37");
        }
      ).then(
        function(rd){
          read_char = rd;
          read_char.on('characteristicvaluechanged­', function(e) {
            print("received");
            print(process.memory().free);
            event = e;
          });
          return read_char.startNotifications();
        }
      );
    

    1 Attachment

    • BLE_Memory_Leak.png
About

Avatar for user83157 @user83157 started