• Hi

    I am attempting to make a display that shows the status of a BLE device, using a Pixel.JS.
    The BLE device is a relay working much like an eggtimer.
    In the advertisement package the timer value is included.
    So the display just needs to listen to the advertisements, filter out the right device, and show this value on the screen.

    Add in a menu for the use to select the device to show.

    I have been over this for a week now and as soon as I put it all together I quickly get "Execution Interrupted" and "New interpreter error: MEMORY" along with some more messages.

    The idéa is based on the example for the Pixel.JS

    I have attached the current version of the code.
    This does not print the values on the display yet, I simple connect over BLE and run consol.log(macs,TimerValue) to view what the current collected values are.

    I have done several version of this.
    This one only uses NRF.findDevices with a filter for manufacturer 0xFFFF, as that is what this device advertises as at this stage.
    I have also tried making a variant uset NRF.setScan() with simmilar filters, where I exit as soon as one advertisement packets has arrived, then wait 30s before doing this again.
    The result is the same.

    I have also tried running this by "download to ram", "download to flash" and changing things to use save() to free up more ram.
    The result is the same.
    After a short while, say 2-3minutes, the device is gone and out of memory.

    When I tested the Pixel.js example I could get the "same" problem. The example updates the display every 60s. Setting the update to say 10s would make that example fail to.

    Any help or comments would be appreciated.

    1 Attachment

  • So I have found an issue.
    Pixel.js firmware v1.12 does not get out of memory, but it can not find the names of the devices.
    v1.13 finds the names of my devices but runs out of memory quick.
    Will download earlier version an see if I can find a firmware version where both work.

  • Please can you try installing firmware 2v14? I believe 2v13 did have a memory leak (of the device's address when doing bluetooth scanning), but 2v14 should have fixed that as well as having added a bunch of other stuff.

  • Just to add - the issue was that in earlier firmwares (2v12 and before), bluetooth scanning didn't 'aggregate' multiple bluetooth packets from the same device properly (so if one packet had a manufacturer ID, and one had device name, the name might not appear if you had a filter).

    2v13 fixed that, but in the process added a memory leak - but 2v14 should work for both.

  • 2v14 works like a charm :-)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Running out of memory and "Execution Interrupted"

Posted by Avatar for user127454 @user127454