You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • so I have commented out all the ignored error codes to let it throw exception and I rewrote the loop to retry

        try {
          NRF.updateServices(s);
          i+=len;l-=len;
        } catch (e) {
          print(e);
        }
    

    and now it works well, I get everything sent and the error is 0x13 = NRF_ERROR_RESOURCES
    the output to console looks like

    0 {"VERSION":"2v16.294
    20 ","GIT_COMMIT":"2522
    40 6e526","BOARD":"NRF5
    Error: Error: ERR 0x13 (:1604)
    40 6e526","BOARD":"NRF5
    60 2840Dongle","RAM":26
    80 2144,"FLASH":1048576
    Error: Error: ERR 0x13 (:1604)
    80 2144,"FLASH":1048576
    100 ,"STORAGE":393216,"S
    120 ERIAL":"05950628-564
    Error: Error: ERR 0x13 (:1604)
    120 ERIAL":"05950628-564
    140 410a7","CONSOLE":"US
    160 B","MODULES":"Flash,
    180 Storage,heatshrink",
    Error: Error: ERR 0x13 (:1604)
    180 Storage,heatshrink",
    200 "EXPTR":415444,"APP_
    220 RAM_BASE":536882880}
    Error: Error: ERR 0x13 (:1604)
    220 RAM_BASE":536882880}
    

    I wonder what is the reason for ignoring errors when trying to send notifications? Isn't it better to throw exception so it can be handled. I'd remove all those ignored errors starting here https://github.com/espruino/Espruino/blo­b/master/libs/bluetooth/jswrap_bluetooth­.c#L1606

    EDIT: I retested with 52832/SDK12 and I see it too. It mostly does not happen when maxchars is 20 so I did not notice before but when I set it to 50 I see something very similar

About

Avatar for fanoush @fanoush started